Skip to main content

Module lp

Module lp 

Expand description

Closed-form AMM f-position + LP claim-component math.

Ports the closed-form helpers from @the-situation/optimizer/lp.ts. See that file for the full economic derivation; the formulas here are verbatim ports.

Structs§

LpClaimComponent
A single LP deposit’s claim parameters.

Functions§

compute_lp_claim_component_value
Component of an LP’s settlement claim, evaluated at outcome x.
compute_total_lp_claim_value
Sum of LP claim-component values across multiple deposits.
f_at
The AMM’s f-position evaluated at outcome x.