StakeManager is the main contract for validator-related activities including checkPoint signature verification, reward distribution, and stake management on Ethereum. Ownership is tracked via NFT IDs; transferring ownership or changing the signer does not affect system state.
Stakers are divided into validators, delegators, and watchers (for fraud reporting).
Source: StakeManager.sol
From a single Ethereum address, a staker can only function as either a validator or a delegator (design choice, not a technical constraint).
Validator admissions and replacement
Admissions
The system allows a maximum of 105 active validators at any given time. New validators join the active set only when a currently active validator unbonds or is removed for low performance.- Applications: Polygon validators hub
- Becoming a validator: becoming-a-validator guide
Replacement
PIP4 introduced validator performance management. Validators in an unhealthy state for an extended period are off-boarded; the slot is made available to the next in the waitlist.- Performance requirements: validator performance requirements
Methods and variables
validatorThreshold
Stores the maximum number of validators (slots) accepted by the system.
AccountStateRoot
- Account root for validator and delegator accounting on Heimdall, submitted with each
checkpoint. - Used by
claimRewardsandunStakeClaim.
stake / stakeFor
StakeManager.sol
- Allows staking if
amountexceedsminDepositandcurrentValidatorSetSizeis less thanvalidatorThreshold. - Requires transfer of
amount + heimdallFee. updateTimeLineupdates the timeline data structure tracking active validators and stake per epoch/checkpoint.- Mints one unique NFT per
stakeorstakeForcall (one NFT per Ethereum address). - Setting
acceptDelegationtotruedeploys aValidatorSharecontract for the validator.
unstake
- Removes validator from validator set in the next epoch.
- Updates the timeline data structure; records exit epoch.
- If delegation is active, collects all rewards and locks the delegation contract against new delegations.
unstakeClaim
WITHDRAWAL_DELAY period, validators call this function to settle with stakeManager: collect remaining rewards, retrieve staked tokens, and burn the NFT.
restake
- Allows validators to increase stake using new tokens, accumulated rewards, or both.
- Updates the timeline for active stake.
withdrawRewards
updateSigner
stakeManager.
topUpForFee
claimFee
accountStateRoot is updated on each checkpoint; validators provide a proof of inclusion in this root to withdraw fees. accountStateRoot is re-written per checkpoint to prevent double exits.
Staking NFT
Standard ERC721 contract with one token per user, minted sequentially.checkSignatures
- Called by the RootChain contract when submitting checkpoints.
- Validates unique signatures and checks for stake weight on
voteHash. currentValidatorSetTotalStakeprovides the current active stake.- Rewards are distributed proportionally to validator stake.
isValidator
Checks whether a given validator is active in the current epoch.
Timeline data structure

StakingInfo
Centralized logging contract for validator and delegation events. Includes read-only functions.
Source: StakingInfo.sol
ValidatorShareFactory
Factory contract that deploys a ValidatorShare contract for each validator that opts into delegation.
Source: ValidatorShareFactory.sol