Trading 101 — Order books & slippage · Lesson 3 of 5

Slippage — what it actually costs you

3 min · interactive

When you swap on an AMM (Automated Market Maker — like the XRPL AMM), you don't trade against another person. You trade against a pool — a constant-product curve where price is set by the ratio of two reserves. The bigger your trade relative to the pool, the more you move the curve, and the worse the price.

That difference between the price you expected and the price you got is slippage.

!info The XRPL AMM uses the constant-product formula x · y = k. If a pool holds 100,000 XRP and 50,000 USD, your trade changes those reserves — and the new ratio is your new price. !endinfo

Try it yourself

The simulator below is real math, not a video. Drag the sliders and watch the slippage number change.

{% widget slippage %}

What you should learn from playing with it

  1. Slippage scales nonlinearly with size. Doubling your trade more than doubles the slippage. Halving it more than halves it. This is why splitting big trades into smaller chunks is a huge win.

  2. Slippage scales nonlinearly with pool depth. A €1,000 trade against a €1M pool is invisible. The same trade against a €20k pool is brutal.

  3. The cheap-feeling 1% is more than you think. A 1% slippage on a €5,000 swap is €50 — the cost of a decent dinner. The same percentage applied to a €50,000 swap is a small flight.

The number that should make you stop

Most pros use 1% as a soft ceiling and 3% as a hard one. Above 3%, something is off:

  • Either the pool is much too small for your trade size,
  • Or there's a news event making liquidity providers nervous and pulling out,
  • Or you're being front-run (someone seeing your transaction in the mempool and arbitraging it).

The Gopnik wallet shows you slippage before you sign. If it's above your threshold, walk away. The trade can wait five minutes. Your money can't.

Limit orders solve this

Instead of saying "I'll take whatever price the AMM gives me", a limit order says "I'll only trade if the price is at least X." The order book matches you only when someone else is willing to meet that price. No slippage. No surprises. The trade-off: it might not fill at all if the price never gets there.

We cover limit orders properly in the next lesson. They're the most under-used tool in retail crypto, and the most over-used by professionals. Same wallet, same DEX — different outcomes.

Live simulator · XRP → USD

interactive
100,000 XRP
5,000 XRP
2,500.00 USD
expected · spot
2,381.00 USD
actual · AMM curve
4.76%
slippage
Drag the sliders to see how slippage changes.