The Staking Manager is the primary contract for validator-related activities in Shibarium, including stake management, reward distribution, and signature verification. All proof verification and staking operations are executed on Ethereum, while computation-heavy tasks are handled on L2.

Roles in Staking

  • Validator: Stakes BONE, validates blocks, can accept delegation.
  • Delegator: Delegates BONE to validators for a share of rewards.
  • Watcher: Reports fraud.
A single Ethereum address can only be a validator or a delegator, not both.

Key Concepts

  • NFT Ownership: Each stake mints a unique NFT (ERC721) representing validator ownership. Ownership changes do not impact system integrity.
  • Validator Threshold: Maximum number of validators (slots) allowed.
  • AccountStateRoot: Used for accounting and reward claims; submitted with each checkpoint.

Staking Functions

  • Stake BONE to become a validator (if below threshold).
  • Transfers amount + heimdallFee.
  • Mints a unique NFT for each new stake.
  • acceptDelegation deploys a ValidatorShare contract for delegation.
  • Unstake: Removes validator from set in next epoch; updates timeline and locks delegation contract.
  • UnstakeClaim:
  • After withdrawal delay, allows settlement (rewards, staked tokens, NFT burn).
  • Increase stake with new amount or rewards.
  • Updates timeline for active stake.
  • Withdraw accumulated rewards (including from delegation contract if applicable).
  • Update validator’s signer address for block and checkpoint validation.
  • Top Up Heimdall Fee:
  • Claim Fee:
  • Withdraw fee from Heimdall using proof of inclusion in accountStateRoot.
  • startAuction:
  • confirmAuctionBid:
  • Periodic auctions allow replacement of poor-performing validators.
  • Bidding and confirmation logic ensures dynamic security and fair validator selection.
  • Validates checkpoint signatures (BFT 2/3+1 agreement).
  • Ensures rewards are distributed proportionally to stake.
  • Tracks active validators and staking per epoch/checkpoint.
  • StakingInfo: Centralized logging contract for validator and delegation events.
  • ValidatorShareFactory: Deploys ValidatorShare contracts for validators accepting delegation.

Notes & Additional Info

  • NFT is standard ERC721 with restrictions (one per user, sequential minting).
  • jail, unJail, and slash functions are not currently used.
  • Some mechanisms are inspired by Polygon’s open-source design.