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§
- LpClaim
Component - 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.