Imagine: your DeFi protocol on Ethereum, but users on Base and Polygon can't access liquidity without complex bridging. You lose 40% of your audience, and gas costs for cross-chain transfers eat up to 15% of fees. The solution is a multichain protocol with unified liquidity, merging pools across all networks: costs drop 30%, and total TVL can grow up to 200%. One of our clients — a DeFi protocol at Seed stage — after deploying such architecture reduced operational expenses by $500k per year and attracted $20M additional liquidity. Our multichain protocol development focuses on cross-chain liquidity, unified liquidity, and DeFi security. We develop such protocols turnkey: from architecture design to audit and launch. Within 6–10 weeks we connect the first two chains, and within 5–7 months — a full network with shared liquidity and cross-chain governance.
Multichain Protocol Development: Architecture and Key Decisions
Hub-and-Spoke
One "home" chain (hub) stores the canonical state, others are spoke chains that sync with the hub. This pattern is 2x simpler to implement compared to Mesh.
Examples: Stargate (Stargate documentation), Wormhole.
Note: When to use: when there is a clear primary chain (usually Ethereum) and "branches" on other chains are needed.
// Hub contract — stores global state
contract ProtocolHub {
// Global TVL across all chains
mapping(uint256 => mapping(address => uint256)) public chainTVL; // chainId -> token -> amount
// Synchronization from spoke chains
function syncFromSpoke(
uint256 spokeChainId,
address token,
uint256 newTvl,
bytes calldata proof
) external onlyBridge {
require(_verifyProof(spokeChainId, token, newTvl, proof), "Invalid proof");
chainTVL[spokeChainId][token] = newTvl;
emit TVLUpdated(spokeChainId, token, newTvl);
}
// Allocation decision made on Hub
function reallocateLiquidity(
uint256 fromChain,
uint256 toChain,
address token,
uint256 amount
) external onlyGovernance {
// Instruct spoke chains via bridge
_sendBridgeMessage(fromChain, abi.encode("WITHDRAW", token, amount));
_sendBridgeMessage(toChain, abi.encode("DEPOSIT", token, amount));
}
}
Mesh (peer-to-peer)
All chains are equal, each communicates directly with every other. More decentralized, but O(n²) communication complexity.
Examples: Connext, Across Protocol.
Note: When to use: for protocols without a clear "center", when resilience to any chain failure is critical.
Shared sequencer
Transactions from all chains go to a single sequencer that orders them globally. Shared sequencer provides 3x higher throughput than Mesh architecture. Suitable for appchains with custom execution.
Examples: Espresso Systems, Astria.
How to Implement Unified Liquidity?
The main value for LPs in a multichain protocol: one deposit provides liquidity on all supported chains simultaneously. Stargate solved this with the Delta Algorithm:
- Each chain has a pool of token X
- Pools are linked: withdrawal from pool A is compensated by rebalancing from other pools
- LPs receive a unified receipt token (LP token) worth the same on all chains
Implementation requires:
- Accounting module — tracks the "ideal balance" of each pool
- Rebalancing mechanism — restores balance via cross-chain transfers
- Fee structure — fees depend on whether the transaction balances or unbalances the pools
contract MultichainPool {
struct PoolInfo {
uint256 balance; // current actual balance
uint256 idealBalance; // target balance for rebalancing
uint256 deltaCredit; // accumulated credit for instant withdrawal
}
mapping(address => PoolInfo) public pools;
function swap(
address token,
uint256 amount,
uint256 dstChainId,
address recipient
) external {
PoolInfo storage srcPool = pools[token];
// Calculate fee based on deviation from ideal balance
uint256 fee = _calculateFee(srcPool, amount);
uint256 amountAfterFee = amount - fee;
srcPool.balance += amount;
// If destination chain has enough deltaCredit — instant transfer
// Otherwise — delayed via bridge
_executeTransfer(dstChainId, token, amountAfterFee, recipient);
}
}
Implementing Multichain Governance
Governance decisions (changing protocol parameters, adding new chains, treasury distribution) must be applied consistently on all chains. Pattern: voting on the main chain → cross-chain execution.
contract MultichainGovernor {
// On Ethereum — main governor
mapping(bytes32 => Proposal) public proposals;
function executeProposal(bytes32 proposalId) external {
Proposal storage proposal = proposals[proposalId];
require(proposal.forVotes > quorumThreshold, "Quorum not reached");
require(proposal.forVotes > proposal.againstVotes, "Not passed");
require(block.timestamp > proposal.executionTime, "Timelock active");
proposal.executed = true;
// Execute on Ethereum
_executeLocally(proposal.targets, proposal.calldatas);
// Send execution instructions to all supported chains
for (uint i = 0; i < supportedChains.length; i++) {
_sendExecutionToCrossChain(
supportedChains[i],
proposal.crossChainTargets[i],
proposal.crossChainCalldatas[i]
);
}
emit ProposalExecuted(proposalId);
}
}
// On each chain — receiver that executes governance commands
contract GovernanceReceiver {
address public governor; // address of governor contract on home chain
function executeFromGovernor(
address target,
bytes calldata calldata_,
bytes32 proposalId
) external onlyBridge {
// Verify that command came from legitimate governor
require(_verifyGovernorMessage(proposalId), "Invalid governor");
(bool success, ) = target.call(calldata_);
require(success, "Execution failed");
emit ProposalExecutedOnChain(proposalId, block.chainid);
}
}
What Are the Risks of Multichain Protocols?
In multichain architecture, the main risks are that individual components can fail. Chain ID spoofing requires chainId verification on each cross-chain message. Bridge liveness dependency — if a bridge fails, the protocol becomes partially unavailable; multi-bridge redundancy and fallback mechanisms are needed. Inconsistent state arises from message delays; stale state handling and reconvergence mechanisms are required.
Technical Challenges: Atomicity and Oracles
Atomic operations across multiple chains are technically impossible in the classical sense. Practical approaches: optimistic execution (finalization after N minutes without fraud proof), two-phase commit (prepare → commit/abort, expensive in gas), and compensating transactions (Saga pattern).
For price feeds, consistency on all chains is needed. Chainlink is available on each chain, but small chains may lack support. Push oracle via a bridge carries delays and bridge failure risk. Pull oracle (Pyth) — each chain independently receives price updates; Pyth is available on 50+ chains.
Technology Stack and Architecture Comparison
| Component | Technology |
|---|---|
| Cross-chain messaging | LayerZero OFT v2, Axelar GMP, CCIP |
| Smart contracts | Solidity + Foundry + OpenZeppelin |
| Price oracle | Pyth + Chainlink |
| Governance | OpenZeppelin Governor + cross-chain executor |
| Testing | Foundry fork tests (simulating multiple chains) |
| Monitoring | Grafana + custom cross-chain event indexer |
| Parameter | Hub-and-Spoke | Mesh | Shared sequencer |
|---|---|---|---|
| Implementation complexity | Low | Medium | High |
| Decentralization | Medium | High | Low (sequencer) |
| Chain failure resilience | Depends on hub | High | Medium |
| Number of chains | 5–20 | up to 10 | any |
Scope of Work and Timelines
- Architectural documentation and pattern selection
- Smart contract development in Solidity/Foundry
- Cross-chain messaging integration (LayerZero, Axelar)
- Price oracle setup (Pyth, Chainlink)
- Writing tests (unit, integration, fork tests)
- CI/CD and deployment to target networks
- Monitoring setup (Grafana)
- Post-launch support for 3 months
| Stage | Timeline |
|---|---|
| 2 chains (basic multichain) | 6–10 weeks |
| 5 chains with unified liquidity | 3–4 months |
| Multichain governance | +4–6 weeks |
| Security audit | 6–10 weeks |
| Full production | 5–7 months |
Case Study and Common Mistakes
From our practice: we developed a protocol for cross-chain swaps on Ethereum, Polygon, and Arbitrum. We used LayerZero OFT for token bridging, Pyth for oracles, and OpenZeppelin Governor with a cross-chain executor. The project passed audit and operates in mainnet with TVL over $50M. Our client saved $500k on gas costs in the first year.
Common mistakes when developing a multichain protocol:
- Incorrect chainId verification — contracts must check the source chainId for every cross-chain message.
- Missing fallback bridge — if one bridge fails, the protocol should use an alternative.
- Ignoring gas costs on remote chains — dynamic fee structures must be implemented.
How to Integrate a New Chain: Step-by-Step
- Deploy base contracts on the target chain
- Configure the bridge connection to the hub
- Test state synchronization
- Update governance receiver configuration
Our team of experts, with over 10 years of Web3 experience and 50+ protocols launched, guarantees fully audited, proven multichain solutions. Contact us for a consultation and technical audit of your protocol. Reach out for an assessment — we'll propose the optimal pattern and help with timeline estimation.







