Free functions
| constant_product_out | Calculates output amount for a constant product swap. Given reserves x, y and input dx, returns dy such that (x+dx)(y-dy) = xy. Formula: dy = y × dx / (x + dx) |
| constant_product_in | — |
| price_from_reserves | — |
| slippage | — |
| liquidity_share | — |
| calculate_k | — |
| initial_lp_tokens | — |
| remove_liquidity | — |