Module hydra_dx_math::lbp

source ·

Macros

Functions

Calculating buying price given reserve of selling asset and reserve of buying asset. Formula :
Calculating weight at any given block in an interval using linear interpolation.
Calculating selling price given reserve of selling asset and reserve of buying asset.
Calculating spot price given reserve of selling asset and reserve of buying asset. Formula : BUY_RESERVE * AMOUNT / SELL_RESERVE