Skip to main content
Hadron pools do not update the midprice automatically based on reserves. As an operator, you are responsible for pushing price updates from your own price engine. This is what makes Hadron a propAMM rather than a passive AMM.

updateMidprice

Update your pool’s midprice. Midprice can be updated when pools are in the RejectSwaps mode.
Q32 (more precisely Q32.32) is a fixed-point number format where the value is stored as an integer scaled by 2^32.In short: stored = realValue * 2^32The SDK offers a .toQ32() helpers to convert numbers to fixed point numbers

updateMidpriceAndBaseSpread

Atomic update of both midprice and base spread in a single instruction. Prefer this over two separate calls when updating both together.

updateDeltaStaleness

Delta staleness is a kill-switch. If no oracle update has been received within this many slots, the pool stops quoting.
Recommended usage Set delta_staleness to a value slightly above your oracle update frequency. If your crank pushes updates every 10 slots, a staleness of 30–50 slots gives headroom for missed updates without leaving the pool quoting a stale price for too long.