Fees, gas, slippage: how not to overpay
A swap can include pool fees and network gas. You control slippage—so set it intentionally.
Two costs in a swap
- Pool fee (paid to LPs): part of the trade amount.
- Gas (paid to the network): fee to execute the transaction.
Slippage: don’t set it randomly
- Too low: swaps may fail during volatility.
- Too high: execution can be worse and MEV risk increases.
Related: Security basics and Troubleshooting.
Gas: the part you don’t get back
Gas pays for computation on the network. If a transaction reverts, the swap does not happen, but gas is still consumed. That’s why diagnosing failures matters.
Choosing slippage in practice
- For deep liquidity pairs: start low and only increase if you see failures.
- For volatile pairs: consider smaller trade sizes rather than high slippage.
- For thin liquidity: treat high slippage as a warning and verify the token carefully.
When to consider L2s
If you swap frequently or in small amounts, L2 networks can reduce gas costs significantly. The trade-off is that assets live on that L2, and bridging adds extra steps.
What makes gas change?
Gas cost depends on network congestion and the complexity of the transaction. Swaps that touch multiple pools or include additional steps can cost more than a simple transfer. On some networks you can adjust a priority fee; higher priority can reduce waiting, but it costs more.
Failed swaps: the hidden cost
A failed transaction can still spend gas. Before retrying repeatedly, identify the cause (slippage, allowance, gas). One correct retry is cheaper than five blind retries.
Setting slippage like a pro
- Start with the lowest value that reliably executes for that pair and size.
- During fast price moves, reduce size first; raise slippage only if necessary.
- If you need very high slippage, treat it as a warning sign and re-check the token.