Defines the ValidatorVault contract that distributes block rewards to validators proportional to their stake weight. Rewards accumulate in the vault per epoch (1 day). Validators claim their share via claim(). Delegation is supported: delegators receive their proportional share minus a commission fee set by the validator.
Epoch length: 86,400 seconds (1 day)
Reward per epoch: determined by issuance schedule (LP-083)
Distribution: proportional to stake weight at epoch start
function claim(uint256 epoch) external;
function claimBatch(uint256[] calldata epochs) external;
function pendingRewards(address validator) external view returns (uint256);
function setCommission(uint256 bps) external; // validator sets delegator commission
Delegators call claim() against the vault directly. The vault calculates their share as:
delegator_reward = (delegator_stake / total_validator_stake) * epoch_reward * (1 - commission_bps / 10000)
The vault receives newly minted LUX from the P-Chain issuance mechanism at the end of each epoch. The P-Chain RewardManager calls vault.deposit{value: epochReward}().
If a validator is slashed (double-signing, prolonged downtime), their pending rewards are burned:
function slash(address validator, uint256 penalty) external onlyPChain;
Slashed rewards are sent to DeadBurn (LP-079).
1. Claiming is pull-based. The vault never pushes funds, preventing reentrancy issues.
2. Epoch snapshots use P-Chain validator set state. EVM-side manipulation cannot alter stake weights.
3. Commission changes take effect next epoch, not retroactively.
4. Unclaimed rewards persist indefinitely. No expiration.
github.com/luxfi/standard/contracts/staking/ValidatorVault.sol |github.com/luxfi/node/vms/platformvm/reward/ |github.com/luxfi/node/vms/platformvm/txs/add_delegator_tx.go |Copyright (C) 2025-2026, Lux Partners Limited. All rights reserved.
Licensed under the MIT License.