Soroban AMM

A constant-product (x · y = k) simulator. The numbers below come from the exact integer math the on-chain contract runs — no rounding differences.

POOL STATE

SWAP

Amount out Effective price Price impact New reserves (A / B) k after / k before

The fee stays in the pool, so k never shrinks — that growth is exactly what liquidity providers earn.

ADD LIQUIDITY

LP shares minted Pool share