Context & Motivation
This series was originally authored during my tenure at Cosmostation, working with the Validator Team. The primary goal of this research was to provide a technical foundation for developing in-house validator monitoring and reward management tools.
To build robust infrastructure, we needed to go beyond the surface and understand the exact mathematical and programmatic flow of rewards across different blockchain architectures. This series documents that journey, covering Cosmos, Sui, Kaia, and Namada.
Series Index
1. Walrus: The Secret of Staking Rewards
- Focus: The reward distribution mechanism of the Walrus protocol, including epoch changes and exchange rate calculations.
- Key Insight: deeply analyzes
initiate_epoch_changeandprocess_pending_staketo explain how rewards are determined by the exchange rate difference between staking and withdrawal.
2. Sui: How are Epoch Rewards Delivered to Stakers?
- Focus: The native staking reward mechanism of the Sui protocol, driven by epoch changes and the
sui_systemMove package. - Key Insight: Explains how the
StakingPool’s exchange rate tracks the compounding value of SUI rewards, allowing delegator rewards to be calculated based on the rate difference between staking and withdrawal.
3. Cosmos: How do Inflation and Fees become Delegator Rewards?
- Focus: The organic interaction of
x/mint,x/auth,FeeCollector,x/distribution, andx/stakingmodules to source, aggregate, and distribute rewards. - Key Insight: Explains the flow from sourcing (inflation/fees) to the
FeeCollector, then to validator pools, and finally to delegators via share-based calculation using the ‘cumulative reward ratio’ (F1 Fee Distribution).
4. Kaia: Staking Rewards in Public Delegation Contract
- Focus: The staking reward mechanism centered around the
PublicDelegation.solsystem contract and ERC-20 based share tokens. - Key Insight: Describes how
stake()triggers auto-compounding, increasing the pool’s total KAIA while keeping shares constant, thus raising the share value (Value Accrual) which becomes the delegator’s reward.
5. Namada: PoS Staking and Inflation in Namada
- Focus: Namada’s epoch-based PoS inflation and the unique ‘Reward Product’ mechanism for tracking rewards.
- Key Insight: Explains how the
reward_product(reward ratio per stake) is recorded each epoch, allowing delegator rewards to be calculated as the sum ofdelegated_amount * reward_productover the delegation period.
Reflection
Building tools for a top-tier validator team requires a “don’t trust, verify” mindset toward protocol specifications. These articles served as the technical blueprint for our engineering team to ensure reward calculation accuracy and operational excellence.
I hope this archive remains a useful resource for anyone diving deep into the economics of Proof-of-Stake networks.