The Imua Protocol contracts form the foundation of a multi-chain restaking ecosystem that works in conjunction with Imuachain. These contracts enable users across different blockchains to participate in restaking without moving their assets to Imuachain directly.
Imuachain serves as the central coordination layer for the protocol, while these client-side contracts handle asset custody and cross-chain communication. Together, they create a unified system where:
- Assets remain secured on their native chains through specialized custody contracts
- Staking operations and delegation decisions are coordinated by Imuachain
- Cross-chain messaging enables seamless communication between client chains and Imuachain
This document details the contract addresses, architecture, and workflows that make omni-chain restaking possible through the integration between client-side contracts and Imuachain.
Please visit Deployed Contracts for detailed addresses.
Most contracts in the Imua protocol are upgradeable, following a proxy pattern:
- Proxy Contract: Entry point that users interact with
- Logic Contract: Contains the implementation code
- Beacon Contract: For beacon proxy pattern used by Vaults and Capsules
The proxy delegates calls to the logic contract while maintaining its own storage, allowing for upgrades without losing state.
The initial entry point before Imuachain is spawned:
- Accepts validator registrations with commission settings
- Allows LST deposits and delegations to validators
- Manages NST (native ETH) staking setup
- Stores all information needed for Imuachain genesis
- Important: After spawn time, Bootstrap is upgraded in-place to ClientChainGateway
The upgraded version of Bootstrap after Imuachain is spawned:
- Inherits all state from Bootstrap
- Adds cross-chain messaging capabilities via LayerZero
- Serves as the primary interface for ongoing staking operations
- Manages both LST and NST restaking
- deposit: Locks tokens in token-specific Vault and sends cross-chain message
- depositThenDelegateTo: Combines deposit and delegation in one transaction
- delegateTo: Delegates previously deposited tokens to an operator
- undelegateFrom: Undelegates tokens from an operator, initiating unbonding
- claimPrincipalFromImuachain: Initiates withdrawal request to Imuachain to get approval and unlock tokens
- withdrawPrincipal: Transfers unlocked tokens from Vault to recipient
- createImuaCapsule: Creates a Capsule contract for staker's ETH
- stake: Stakes 32 ETH to Ethereum beacon chain using Capsule as withdrawal credentials
- verifyAndDepositNativeStake: Verifies beacon chain proof and registers validator
- processBeaconChainWithdrawal: Processes beacon chain withdrawals with proofs
- withdrawNonBeaconChainETHFromCapsule: Withdraws ETH not related to beacon chain staking
Each whitelisted LST has its own dedicated Vault:
- Tracks user balances and enforces TVL limits
- Handles token deposits and withdrawals
- Manages unlocking of principal
- Implemented as beacon proxies sharing the same implementation
A single RewardVault per client chain handles all reward tokens:
- Tracks reward balances by token and AVS
- Handles deposit and withdrawal of rewards
- Manages unlocking of reward tokens
Contract for managing ETH staked on the beacon chain:
- Verifies deposit and withdrawal proofs
- Manages withdrawal credentials for validators
- Handles unlocking and withdrawing ETH
Deployed on Imuachain to handle cross-chain messaging:
- Registers client chains and their metadata
- Manages whitelisted tokens
- Processes messages from client chains
-
Validator Registration:
- Validators register with commission settings and consensus keys
- Users deposit LSTs to Bootstrap contract
- Users delegate tokens to registered validators
- Native ETH stakers create Capsules and stake ETH
-
Genesis Generation:
- After spawn time, Bootstrap is upgraded to ClientChainGateway
- All registrations, deposits, and delegations form Imuachain genesis
- Deposit: Call
depositordepositThenDelegateTowith token address, amount, and relay fee - Delegate: If using separate calls, call
delegateTowith operator name, token, and amount - Withdrawal:
- Call
claimPrincipalFromImuachainwith token and amount - Wait for cross-chain confirmation
- Call
withdrawPrincipalto receive tokens
- Call
- Setup:
- Call
createImuaCapsuleto create withdrawal credentials - Call
stakewith validator details and 32 ETH
- Call
- Activation:
- Call
verifyAndDepositNativeStakewith validator proofs
- Call
- Withdrawal:
- Initiate withdrawal on beacon chain
- Call
processBeaconChainWithdrawalwith proofs - ETH is unlocked in Capsule
- Call
withdrawPrincipalto receive ETH - Call
withdrawNonBeaconChainETHFromCapsuleto withdraw ETH received via direct transfer
Imua protocol is designed to support both EVM and non-EVM chains:
- Bitcoin: Staking support in testing phase
- Solana: Integration under testing phase
- XRP: Integration under testing phase
These non-EVM integrations will allow users to stake assets from multiple blockchain ecosystems through the Imua protocol, expanding the cross-chain restaking capabilities.
- Same Address, Different Functionality: Bootstrap and ClientChainGateway share the same proxy address but switch functionality at spawn time
- Upgradeable Architecture: All core contracts use proxy patterns for future upgrades
- Token-Specific Vaults: Each LST has its own dedicated Vault contract
- Single Reward Vault: All reward tokens share a single RewardVault per client chain
- Cross-Chain Operations: All operations after spawn time require LayerZero fees in ETH
- TVL Limits: Each token vault has configurable TVL limits for risk management