Why Did My Swap Fail?

A swap fails when the deal you agreed to on screen is no longer possible by the time the network actually runs it. Your tokens are safe - they never left your wallet. What you do lose is the network fee, because the computers that tried to run your swap did the work either way. Nearly every failed swap comes down to one of five things.
A swap is like booking a table at a restaurant. You agree a time and a size; if the place has changed by the time you arrive, the booking does not stand.
The five usual causes
- Slippage. You set a limit on how far the price may move against you. Someone else traded first, the price moved past that limit, and your swap cancelled itself rather than fill at a worse rate. This is the most common cause by far.
- Not enough gas. The fee token - ETH on Ethereum, SOL on Solana - has to cover the fee separately from the tokens you are swapping. A wallet holding only USDC cannot pay for anything.
- A missing approval. Before a protocol can move a token out of your wallet, you sign a one-off permission for that token. Swap without it and the attempt reverts.
- Thin liquidity. A small token may not have enough in its pool to fill the size you asked for.
- An expired deadline. Swaps carry a time limit, often twenty or thirty minutes. Sign it, walk away, and it lapses.
What happens to your money
Nothing is taken and nothing is swapped. Look the transaction up on a block explorer and you will see it marked failed, with the gas spent and no token transfer. That gas is gone. It is the cost of the attempt, not of the trade.
Before retrying, change one thing - raise slippage a little, top up the fee token, or cut the amount - rather than pressing the same button again. The step-by-step fixes for a swap failed error on Uniswap works through them in order, and why a transaction fails in general explains what the explorer is telling you.