Pool state (x,y) Reserve A bar Reserve B bar x·y = k curve
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

DeFi Automated Market Maker (AMM) Pool Simulator

This simulation models the constant-product Automated Market Maker at the heart of decentralized exchanges like Uniswap: a liquidity pool holding two token reserves, A and B, that always satisfies x·y = k. Trade against the pool and watch the reserve curve, spot price, execution slippage and pool depth respond exactly as they do on-chain — the larger a trade relative to the pool, the steeper the price impact. A fee slider shows how liquidity-provider revenue accrues into the invariant itself, an "Add/Remove Liquidity" control demonstrates how depth changes slippage without moving price, and an "External Price Shock" button simulates arbitrage forcing the pool back to a moved market price — the exact mechanism that produces impermanent loss for real liquidity providers.