Skip to main content

Module settlement_pool

Module settlement_pool 

Source

Structsยง

PmAccountSettlementFacts
Account facts used by pure settlement classification.
PmFixtureOptionKey
Deterministic option key used by settlement-pool fixtures and mark maps.
PmFixturePosition
Deterministic fixture position. Negative quantity represents short exposure.
PmMarketMarks
Spot and option marks required by deterministic Phase 1 fixtures.
PmSettlementFixture
Deterministic scenario fixture for Phase 1 settlement-pool tests.
PmSettlementObligation
Settlement obligation for one account and expiry market.
PmSettlementPoolConfig
Phase 1 settlement-pool policy knobs.
PmSettlementPoolSnapshot
Point-in-time settlement-pool balances for one underlying.

Enumsยง

PmLiquidityClassification
Pure Phase 1 liquidity outcome for a settlement obligation.
PmSettlementModelError
Errors returned by pure PM settlement-pool helpers.

Functionsยง

classify_liquidity_gap
Classify a settlement liquidity gap without mutating runtime state.
ensure_underlying ๐Ÿ”’
in_unit_interval ๐Ÿ”’
pool_capacity_usdc
Calculate total pool capacity as available cash plus active liabilities.
pool_target_usdc
Calculate the target pool size from short OI and active liabilities.
pool_utilization
Calculate active-liability utilization. Zero capacity returns Ok(None).
reject_negative ๐Ÿ”’
short_option_oi_usdc
Calculate short-option open interest in USDC.
utilization_apr
Calculate utilization APR using a piecewise linear kink curve.
validate_facts ๐Ÿ”’
validate_obligation ๐Ÿ”’
validate_pool_config
Validate Phase 1 settlement-pool config invariants.
validate_pool_snapshot ๐Ÿ”’
validate_utilization ๐Ÿ”’