Skip to content

ExitPolicy

new ExitPolicy(cfg): ExitPolicy

Parameter Type
cfg ExitPolicyConfig

ExitPolicy

readonly cfg: ExitPolicyConfig

record(usdmOut, at?): void

A NIGHT → USDM fill settled: count it against today's budget.

Parameter Type
usdmOut bigint
at? number

void


evaluate(inv, mid, at?): PolicyState

Parameter Type
inv { night: bigint; usdm: bigint; }
inv.night bigint
inv.usdm bigint
mid Mid
at? number

PolicyState


discountBps(night, usdmOut, st): number | null

Discount for selling night now, or null (closed, beyond the ladder's depth, or the payout would exceed today's budget). usdmOut is the payout at mid.

Parameter Type
night bigint
usdmOut bigint
st PolicyState

number | null


publication(st): Record<string, unknown>

What policy.publish sends: the terms, the live bands, the hedge recommendation.

Parameter Type
st PolicyState

Record<string, unknown>