Expand description
Price-chain settlement helper for AdminInstantSettlement.
Reads the open reference from Treasury::last_close_*, reads the Pyth close price,
resolves UP/DOWN, emits PeriodSettled, and writes the close price back to Treasury.
All market pool math and USDC distribution happen off-chain.
Structs§
Constants§
- SIDE_
DOWN - DOWN outcome constant (close <= open, including ties).
- SIDE_UP
- UP outcome constant (close > open).
Functions§
- commit_
settlement - Write close price back to Treasury and emit the
PeriodSettledevent. - resolve_
settlement - Read open from Treasury, read close from Pyth, return outcome + both prices.
Returns
Err(GenesisNotSet)if the price chain has not been seeded.