Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Free functions

constant_product_outCalculates output amount for a constant product swap. Given reserves x, y and input dx, returns dy such that (x+dx)(y-dy) = xy…
constant_product_in
price_from_reserves
price_impact
slippage
liquidity_share
calculate_k
initial_lp_tokens
mint_lp_tokens
add_liquidity
remove_liquidity