> For the complete documentation index, see [llms.txt](https://docs.firstledger.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.firstledger.net/slippage.md).

# Slippage

## Slippage: How We Do It & Why It Matters

### What Is Slippage?

Slippage is the tolerance you set to account for the difference between the price you expect when you submit a trade and the price at which it actually executes. On any decentralized exchange, market conditions can shift between the moment you quote a trade and the moment your transaction settles on-chain. Slippage tolerance is your buffer for that movement.

How that buffer is calculated, however, varies significantly between platforms — and the difference has real consequences for your trades.

***

### Our Approach: Slippage Relative to Market Price

We calculate slippage relative to the **current market price**, not the quoted price impact of your trade.

Here's what that means in practice:

When you enter a trade, we show you the current market price and the expected price impact of your order. Your slippage setting is then applied directly against the live market price — independently of the price impact figure.

**Example:**

* Market price of Token A: $1.00
* Your trade has a price impact of 5% (execution price \~$0.95)
* You set slippage to 4%

In this scenario, we will warn you that your trade is unlikely to execute. Why? Because your slippage tolerance of 4% only covers price down to $0.96, but your own trade's price impact is already pushing the execution price to $0.95. You're not giving yourself enough room relative to where the market is actually moving. You'd need to set at least 5% slippage for this trade to go through.

**Pros of this approach:**

* **Transparent and predictable.** You always know exactly what price range you're authorizing relative to a real market reference point.
* **No silent over-tolerance.** You can't accidentally approve a trade at a far worse price than intended just because a large price impact was already baked in.
* **User warnings on low-probability trades.** If your slippage setting isn't wide enough to cover the price impact, we tell you before you waste a transaction fee.
* **Full user control.** We do not automatically adjust your trade size or minimum output based on price impact. Market conditions on the XRPL can change rapidly, and we believe traders should retain direct control over their parameters rather than having the platform silently modify their intent.
* **XRPL-native philosophy.** On the XRP Ledger there is no Miner Extractable Value (MEV). Validators cannot reorder transactions to extract profit, and front-running is a matter of chance rather than a structural attack vector. This means the slippage tolerance you set is genuinely yours — it's not being gamed against you by sophisticated bots the way it can be on chains where MEV is prevalent.

***

### The Alternative Approach: Slippage Relative to Quoted Price Impact

Many other DEX platforms calculate slippage on top of the quoted price impact, not on top of the current market price.

**Example using the same scenario:**

* Market price of Token A: $1.00
* Your trade has a quoted price impact of 5% (quoted execution price: $0.95)
* You set slippage to 3%

On platforms using this method, your 3% slippage is applied on top of the already-impacted price of $0.95. This means you're authorizing execution at up to $0.9215 — more than 7.8% below the current market price — even though you only set 3% slippage.

**Cons of this approach:**

* **Slippage feels smaller than it is.** A 3% slippage setting can expose you to far larger losses once price impact is stacked underneath it, without it being obvious at a glance.
* **Harder to reason about your actual risk.** Your effective worst-case price is price impact + slippage combined, but that math isn't always surfaced clearly.
* **Can mask bad trades.** Because slippage is layered on top of an already-moved price, it's easy to approve a trade at a significantly worse level than intended, particularly on low-liquidity pairs.
* **No warning on low-probability trades.** If your price impact already consumes most of the realistic price movement, adding slippage on top just extends your authorization further into unfavorable territory rather than flagging the trade as unlikely to succeed.

***

### Summary

|                                      | Our Platform              | Other Platforms                          |
| ------------------------------------ | ------------------------- | ---------------------------------------- |
| Slippage calculated relative to      | Current market price      | Quoted price impact price                |
| Effective worst-case price           | Market price − slippage % | Market price − price impact − slippage % |
| Warning if trade unlikely to execute | Yes                       | No                                       |
| Trade size auto-adjusted by platform | No — full user control    | Often yes                                |
| XRPL MEV risk                        | None (no MEV on XRPL)     | N/A                                      |

Our goal is to keep slippage exactly what it should be: a clear, honest tolerance relative to where the market actually is — not a hidden multiplier stacked on top of an already-impacted quote.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.firstledger.net/slippage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
