0x02 ETH Omnibus Staking

Implement ETH staking in an omnibus architecture - one wallet and many users, with 0x02 validators

📘

Who is this for?

Exchanges, ETPs, banks, LST and LRT protocols, and anyone staking on behalf of many users with a single or few wallets who wants to create a great UX and accurately distribute rewards

🚧

If you're new to ETH staking...

Check out our ETH staking guides first, starting from The Lifecycle of a Validator

Omnibus details

An omnibus setup consolidates multiple users' off-chain staking requests into a single wallet to enhance UX.

Omnibus requirements:

  • Batching system that consolidates users’ staking and unstaking requests, creates or tops up validators (32-2048 ETH per validator)
  • Balance monitoring system to track each validator's effective balance and optimize top-ups vs new validator creation (off-chain)
  • Accounting system for each user’s balance (off-chain)
  • Rewards distribution based on users’ proportional stakes in active validators (off-chain)

Solution: daily batching


Part 1: Process Daily Batch

  1. Set up omnibus wallet
    1. This wallet will be the withdrawal address and fee recipient address for validators creation

    2. This wallet will manage all validators and receive Consensus layer (CL) and Execution layer (EL) rewards

    3. Ensure sufficient ETH balance for transaction fees

    4. Determine target balance per validator based on your rebalancing preference: The target balance determines how long each validator can compound rewards before reaching the 2048 ETH maximum and requiring rebalancing. Higher target balances maximize rewards per validator but require more frequent management. Lower targets reduce operational overhead.

      (Read more about 0x02 ETH validator balance management)

      Choose a target balance based on how frequently you want to manage validator balances:

      Compounding YearsTarget BalanceWhat this means
      11984 ETHValidators will reach 2048 ETH cap within ~1 year, requiring frequent rebalancing
      21920 ETHRebalance every ~2 years
      31856 ETHRebalance every ~3 years
      41760 ETHRebalance every ~5 years
      51536 ETHMinimal maintenance - validators won't hit cap for ~10 years
  2. Aggregate requests
    1. Aggregate off-chain user staking and withdrawal requests throughout the day until 00:00 UTC
    2. Calculate available ETH: the day’s new staking requests deposits + ETH carried over from previous batch - withdrawal requests for the day
  3. Process liquid withdrawal requests
    1. If requested withdrawal amount ≤ available ETH: Transfer funds to users within 24 hours of their request

Part 2: Process Partial Withdrawals or Exit Validators Exits

  1. If requested withdrawal amount > available ETH
    1. Identify validators with balances above target balance for partial withdrawal
    2. Calculate withdrawal amounts from selected validators (ensure validators don't go below 32 ETH)
    3. Initiate partial withdrawals via POST /ethereum/withdrawal
    4. Monitor withdrawal progress via POST /ethereum/withdrawals, display status updates in user interface
    5. Transfer withdrawn ETH to users once partial withdrawals are complete
  2. If partial withdrawals insufficient, exit full validators
    1. Calculate number of validators to be exited
    2. Initiate validators exit via POST /ethereum/validators/exit or POST /ethereum/broadcast_exit_message
    3. Monitor exit progress via GET /ethereum/validators, display withdrawal status updates in user interface
    4. Transfer withdrawn ETH to users once validator exits are complete

Part 3: Top-up or Create Validators with Remaining ETH

  1. Check existing validator balances new validators
    1. Query all validators via POST /ethereum/rewards to get effective balances
    2. Identify validators below target balance
  2. Top-up existing validators (priority)
    1. If validators exist below target balance, top them up via POST /ethereum/compound
    2. Prioritize validators with lowest balances to maintain even distribution
    3. Compounding is subjected to activation queue (similar to new validator creation)
    4. Check updated balance of validators via POST /ethereum/rewards
  3. Create new validators (if all at target)
    1. If all validators are at target balance, create new validators at target balance via POST /ethereum/validators
    2. Track validator activation via GET /ethereum/validators
    3. Monitor for validators approaching 2048 ETH cap (no longer compounding) via POST /ethereum/rewards

Part 4: Fetch Rewards and Redeposit EL Rewards

  1. Fetch reward data
    1. If you're using Figment Onchain Billing product, use POST /ethereum/rewards_net to check EL and CL rewards amount received by omnibus wallet.
    2. If you're not using Figment Onchain Billing product, use POST /ethereum/rewards for EL rewards and POST /ethereum/withdrawals for CL rewards swept to omnibus wallet.
    3. Fetch previous day rewards data after UTC 03:00, e.g. on January 27, 2025, specify “2025-01-26” as both the start and end dates. Update the off-chain accounting system daily.
  2. Redeposit EL rewards
    1. EL rewards are sent to your specified address and do not auto-compound
    2. Include EL rewards in available ETH calculation for daily batch processing in Part 1
    3. These will be redeposited through top-ups or new validator creation in Part 3
  3. Rewards calculation:
    1. CL rewards auto-compound on validators and are included in effective balance
    2. Calculate each user's daily rewards: (user_eth_amount / total_active_eth) × total_daily_rewards
    3. All depositors earn rewards proportionally, until they request to withdraw
  4. User interface:
    1. Display current stake, rewards accrual, and historical daily rewards data to each user