Monad Staking Module
I designed and implemented the staking precompile for Monad. The system shipped to mainnet and has secured up to $400M in staked assets.
Project Summary
I developed numerous prototypes and presented design tradeoffs to build agreement around the design. The work covered the interface between consensus and execution, validator signature-verification requirements, and accounting for delegation, rewards, and withdrawals.
Monad’s consensus and execution advance asynchronously and can have different views of the current epoch. I designed a snapshotting system to define when execution-side staking changes become effective in consensus. Afterwards, delegation and reward accounting were adapted to this snapshot progression. Reward distribution scales with the number of validators, avoiding the need to update every delegator whenever rewards are distributed.
With substantial value held in escrow, the protocol required explicit solvency invariants connecting delegator positions, validator stake, and the net staking liabilities. I defined these invariants and assisted with model-based differential testing to validate the implementation against an executable model.
I worked with three other engineers on the production implementation and the model-based invariant validation.
