Guides › Exchanges

Swaps in more than one step

Why a swap through other coins isn't guaranteed, and how padding helps.

Simple

Some coins can't be swapped straight into each other. Then the swap goes through a coin in between: for example USDC into DOGE, then DOGE into BNB.

Each step is its own trade, made a few minutes after the one before. Prices keep moving in between, so the last step can cost more than it did when you checked.

If it costs too much, that step stops. Nothing is lost: the coin in between stays in your wallet, and you can finish the swap later.

Padding

Padding gives the later steps room for the price to move. Each step of padding adds 0.5%.

  • Paying someone a set amount, padding buys a little more of the coin in between. They still get exactly what you typed, and what isn't needed stays in your wallet.
  • Swapping for yourself, padding lets the later steps accept a slightly worse price instead of stopping.

More padding makes the swap more likely to finish. It can't make it certain: a big enough price move, or a network that pauses, can still stop a step.

Detailed

Why there's no direct swap

Each exchange network only trades the coins it holds pools or market makers for. When no single network trades both coins, the swap goes through a coin that two of them share, and each step is a separate trade on its own network.

Why a later step can stop

A step only starts once the coin from the step before has arrived, which can take minutes. The price for the next step is fixed only when that step is sent, and the exchange then pays out only if it can still meet the least the step was allowed to pay. If the market moved past that, the exchange refunds the step instead of filling it at a worse price.

What padding changes

Padding widens that allowance. When the last step pays a set amount to someone, it buys more of the coin in between up front, so the last step can still afford that amount after a move. When it doesn't, it lowers the least each later step will accept.

Neither changes what the exchanges do. They are still independent trades that can each fail, which is why a multi-step swap is never guaranteed.

In depth

Sequential execution risk

A route of n trades executed one after another is exposed to price movement over the whole time between the first quote and the last fill. With each step's price roughly a random walk, the spread of outcomes grows with the square root of that time, so a route whose steps take minutes each carries noticeably more risk than one trade.

Slippage limits as a guarantee

Each step carries a minimum output. The exchange fills the step only if it can deliver at least that, and refunds the input otherwise. That makes every step all-or-nothing on its own, but it makes the route as a whole conditional: the probability that it finishes is the product of each step's probability of clearing its limit.

The effect of padding

Loosening a step's limit by a fraction p raises the chance that it clears. Overbuying the intermediate asset by p, when the final output is fixed, does the same from the other side: the final step needs less than it holds. Either way the gain shows up in the tail, against moves larger than the limit would otherwise allow, and it never reaches certainty, because the size of a move is unbounded.