Skip to main content

System Architecture

Omni.fun is a hub-and-spoke architecture with Base as the home chain and 7 remote chains connected via LayerZero V2 messaging and Across Protocol bridging. Every cross-chain operation ultimately settles on Base, where the bonding curves and Uniswap V3 pools live.

High-Level Topology

LayerZero Integration Points

Omni.fun uses LayerZero V2 through four distinct integration patterns. Each one uses _lzReceive() or lzCompose() as the entry point on Base.

1. Cross-Chain Buy (LZ OApp)

A user on any remote chain initiates a buy. The adapter encodes the buy parameters and sends an LZ message to CCBuyerV3 on Base.
Key detail: After buying tokens on the bonding curve, CCBuyerV3 automatically bridges tokens back to the buyer’s origin chain via OFT send(). The buyer receives tokens on their home chain — not on Base.

2. Cross-Chain Sell (LZ OApp + Across)

A user burns their OFT tokens on a remote chain. The LZ message triggers a sell on Base, and USDC returns via Across Protocol.
Key detail: The seller auto-detects whether the token is still on the bonding curve or has graduated to Uniswap V3, and routes accordingly. No user intervention needed.

3. Cross-Chain Launch (LZ OApp)

A user on BSC, Ethereum, or Solana launches a token that deploys on Base.
Key detail: The Solana Token Launcher ABI-encodes the launch parameters in an Anchor program and sends them via LZ. The CrossChainLauncher on Base decodes and calls the factory — enabling cross-VM token launches from Solana to EVM.

4. OFT Factory Deployment (LZ OApp)

A single Base transaction deploys an OFTAdapter locally and sends LZ messages to 6 remote OFTFactoryRemote contracts, each of which CREATE2-deploys an OmniOFT.
Key detail: OFTFactory predicts all 6 remote OFT addresses using CREATE2 determinism before sending the messages. This allows it to set bidirectional peers on the adapter in the same transaction. Total cost: ~$1.60 in LZ fees for 6-chain deployment.

LZ Configuration

All Omni.fun OFT deployments use the following LayerZero V2 configuration:

Cross-Chain Routing Summary

Every row with “LayerZero V2” generates LZ messages that flow through LayerZero’s DVN and executor infrastructure.