Constant-product AMM (x*y=k) with add/remove liquidity and swap instructions.
initialize_pool
add_liquidity
token_a_amount: u64, token_b_amount: u64
remove_liquidity
lp_amount: u64
swap
amount_in: u64, min_amount_out: u64
A basic automated market maker using the constant product formula. Supports adding liquidity, removing liquidity, and token swaps with LP token minting.
No reviews yet. Fork it and be the first.