John Bergschneider


John Bergschneider

GitHub
Email

Selected Work

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.

Links

MIP-8: Page-ified Storage State

I designed and led the implementation of MIP-8. This improvement aligns EVM storage with database pages. The design replaces one-slot-per-page storage with pages holding up to 128 adjacent slots.

Project Summary

There was a known mismatch between the EVM’s individual 32-byte storage accesses and the database’s 4 KB pages. I introduced a page abstraction to the EVM that addressed this gap while retaining existing execution semantics.

MIP-8 aligns storage commitments and access pricing with these pages. Accessing one slot warms the page which makes subsequent accesses to nearby slots cheaper. The design connects application data layout and physical storage costs to improve page utilization for densely populated storage.

To handle sparsely populated pages efficiently, I developed a sparse Merkle commitment scheme that computes page commitments without storing intermediate hashes.

I worked with the database team on the production C++ implementation and the formal verification team on mechanizing the commitment’s security properties in Rocq.

Links

Topology research

My mathematical research is in low dimensional topology. I am interested in studying topological properties and algebraic invariants of low dimensional spaces. I studied the classification of topologically stratified spaces called 2-stratifolds. These spaces appear in many different areas. But in particular this spaces arise when you look the classification of 3-dimensional Lens Spaces. Further, their fundamental group is a particular nice algebraic family: surface groups that are amalgamated along cyclic subgroups. This family of groups is a nice setting to ask questions about group structure such as residual finiteness.

A four-sheet local model of a 2-stratifold

Research