Back to all notes

Test the math before the contract

By ENTYPER

Published November 10, 2026

A bonding curve looks like one formula. Once it is deployed it is a promise nobody can edit.

A small change in a fee or a curve parameter moves the price a buyer gets, the reserves at graduation, and whether the quote on the screen matches what the contract will actually do.

So I model it first. The Bonding Curve Simulator runs buys, sells, fees and slippage with integer math and checks the same invariants after every action. If reserves, supply and fees stop adding up, I find out in a test and not in a transaction.

The frontend then quotes from the same logic. Two implementations of the same math always drift apart, and the user is the one who pays for the difference.

Have a product to build or fix?

Tell me what it is and where it is stuck. I reply with how I would approach it and what it would take.