Cross-chain OFT staking protocol using LayerZero & Circle CCTP across ETH, Base and Arbitrum Sepolia
Project Overview Our project is an MVP demo of a cross-chain staking protocol built on LayerZero and Circle CCTP, supporting Ethereum Sepolia, Base Sepolia, and Arbitrum Sepolia testnets with Base Sepolia serving as our hub chain.
Core Technologies & Architecture
2.1 LayerZero Integration
2.1.1 OFT (Omnichain Fungible Token) Standard: Implemented LayerZero's OFT SDK to create cross-chain staking tokens that seamlessly move between Ethereum, Base, and Arbitrum Sepolia networks.
2.1.2 Message Compose: Built cross-chain staking unlock mechanisms and reward distribution using LayerZero's Message Compose functionality for reliable cross-chain communication.
2.1.3 Cross-chain Messaging: Engineered secure message passing between testnets for staking operations and reward claims.
2.2 Circle CCTP & Gas Master
2.2.1 CCTP for Rewards: Integrated Circle's Cross-Chain Transfer Protocol to distribute USDC rewards across all supported testnets - users can claim rewards on their preferred network.
2.2.2 Gas Master Integration: Implemented Circle's Gas Master allowing users to pay transaction fees in USDC instead of native ETH, improving UX across all three testnets.
3.1 Centralized Processing: All core staking logic, reward calculations, and cross-chain message orchestration happens on Base Sepolia, leveraging its efficiency as our hub chain.
3.2 Cross-chain State Management: Built comprehensive state tracking system that maintains staking positions across Ethereum, Base, and Arbitrum Sepolia.
4.1 Smart Contract Architecture
The project consists of three main contract groups:
4.1.1 OFT-related contracts including native ERC20 contracts deployed on Ethereum Sepolia, corresponding Adapter contracts, and OFT contracts distributed across Ethereum Sepolia, Arbitrum Sepolia, and Base Sepolia.
4.1.2 Staking-related contracts include Staking EntryPoint contracts (codenamed "Waiter") deployed on Ethereum Sepolia and Arbitrum Sepolia, and the Staking Pool contract (codenamed "Chef") deployed on Base Sepolia as the hub chain.
4.1.3 USDC-related contracts are pre-deployed by Circle, providing CCTP cross-chain services for staking rewards distribution.
4.2 Cross-Chain Flow Design
4.2.1 Stake Flow: Users call the Stake interface on Waiter contracts through the frontend, sending staking OFT tokens to the hub chain (Base Sepolia) with an attached cross-chain StakeMessage to the Chef contract. This triggers token locking and begins reward calculation for the staking position without fixed staking periods.
4.2.2 Unstake Flow: Users call the Unstake interface on Waiter contracts, sending UnstakeMessage cross-chain to the Chef contract on the hub chain. This triggers a fixed withdrawal lock period (7 days in production, 30-60 seconds for demo purposes) while the Chef contract stops calculating rewards for that position.
4.2.3 Withdraw Flow: After the withdrawal lock period expires, users can call the Withdraw interface on Waiter contracts, sending WithdrawMessage cross-chain to the Chef contract. This triggers the Chef contract's ABA (Atomic Bridge Action) flow to return the previously staked OFT tokens to the user.
4.2.4 Claim Reward Flow: Users call the ClaimReward interface on Waiter contracts, sending ClaimRewardMessage to the Chef contract on the hub chain. Upon receiving this message, the Chef contract triggers a BurnUSDC Event, burning USDC from the hub chain's USDC Reserve allocated for that staking position's rewards. Through the USDC contract's CCTP functionality deployed on the hub chain, user USDC rewards are minted to the user's wallet address on the chain where they submitted the ClaimReward request (which doesn't need to be the same chain where they initiated staking).
LayerZero confirms cross-chain synchronization across all networks
5.1 Testnet-Optimized Design: Designed specifically for testnet environments with robust error handling and recovery mechanisms, allowing for easy testing and demonstration of cross-chain staking concepts.
5.2 USDC-Centric Reward System: Created a unified reward system where all staking rewards are distributed in USDC via Circle's CCTP, regardless of which testnet users stake from, providing consistent value across chains.
5.3 Future-Ready Architecture: Built with integration points for 1inch's cross-chain swap functionality, enabling users to swap any token into staking tokens directly within the protocol interface when implemented.
6.1 LayerZero OFT & SDK: Enabled true omnichain token behavior across three testnets without complex bridge management.
6.2 Circle CCTP: Provided reliable, programmable USDC reward distribution across all supported networks.
6.3 Circle Gas Master: Eliminated native token gas requirements, allowing pure USDC-based interactions.
6.4 Base Sepolia: Offered efficient hub chain operations with low fees and reliable testnet infrastructure.
This MVP demonstrates core cross-chain staking functionality across three major testnet environments, showcasing how modern cross-chain infrastructure can create seamless multi-chain DeFi experiences. The protocol successfully handles token transfers, staking operations, and reward distribution across Ethereum, Base, and Arbitrum ecosystems using LayerZero and Circle's cutting-edge technologies.
We built this cross-chain staking protocol using a modern full-stack development approach. The frontend leverages Next.js deployed on Vercel for fast, reliable hosting, with web3.js/ethers.js handling blockchain interactions and RainbowKit/ThirdWeb providing seamless wallet connectivity. The backend runs on Node.js for off-chain operations and API management.
For smart contract development, we used Hardhat as our primary development framework combined with Foundry for comprehensive testing and deployment scripts. LayerZero's SDK was essential for implementing OFT functionality and cross-chain messaging capabilities.
We integrated LayerZero's OFT standard and SDK as the backbone for cross-chain token functionality, using their Message Compose feature to handle complex cross-chain staking operations and reward distribution messages. Circle's CCTP was integrated for USDC reward distribution across chains, while Circle's Gas Master enables users to pay fees in USDC rather than native tokens.
Base Sepolia was chosen as our hub chain for centralizing all staking logic and cross-chain message processing, providing cost-effective operations while maintaining security.
We implemented a three-tier smart contract architecture: OFT contracts for cross-chain token functionality, Staking EntryPoint contracts ("Waiter") on spoke chains for user interactions, and a central Staking Pool contract ("Chef") on Base Sepolia for core logic processing. This separation allows lightweight user-facing contracts while keeping heavy computational work on the efficient hub chain.
We created a configurable timeframe system that switches between production settings (7-day withdrawal locks) and demo settings (30-60 seconds) for real-time hackathon demonstrations. Our dual-contract messaging system optimizes gas costs by handling user interactions on spoke chains while processing complex logic on the hub chain.
The reward claim mechanism uses Circle's burn-and-mint functionality combined with LayerZero messaging to enable users to claim USDC rewards on any supported chain, regardless of their original staking chain - a technically challenging cross-chain coordination that required careful message sequencing.
LayerZero eliminated the need for custom bridge development and provided secure cross-chain token transfers. Circle's infrastructure gave us enterprise-grade USDC functionality and gas abstraction. The combination allowed us to focus on staking logic rather than solving cross-chain infrastructure challenges from scratch.
Future-ready architecture includes integration points for 1inch's cross-chain swap functionality, designed to enable direct token swapping within the staking interface when implemented.