Tx Doctor / Solana error library / Swapped amount is exceeded max swapped amount
Solana error: Swapped amount is exceeded max swapped amount (0x17a5)
The swap is larger than the pool's configured per-transaction cap. DLMM pools can enforce a maximum swap size as an anti-manipulation guard.
Why it happens
- The pool sets a cap relative to its liquidity so a single transaction cannot drain a range.
- Your amount exceeds that cap after fees and bin walk are accounted for.
- The cap was lowered by the operator after you last traded.
- A routed order was combined into one swap that is larger than any single leg should be.
How to fix it
- Split the order into several swaps under the cap.
- Route through an aggregator that splits across pools.
- Read the pool's cap from state if you are integrating, and size legs accordingly.
- Check whether the cap changed if your usual size suddenly fails.
What it looks like in the logs
Program LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo failed: custom program error: 0x17a5 RPC simulation: Transaction simulation failed: Error processing Instruction: custom program error: 0x17a5 Wallet UI: "Transaction failed" — custom program error 0x17a5 (6053)
One failure, three places it shows up: the raw transaction log, the RPC simulation error, and the wallet's short message. Match on the code, never on the wording.
What this means for your funds
Solana transactions are atomic: if any instruction fails, every state change in that transaction is reverted, so token balances end exactly where they started. The network fee is still charged, because validators did the work of executing and rejecting it. A failed transaction never moves your tokens to someone else.
Seeing this error right now? Paste your transaction signature and get the exact instruction, program and code that failed.
Diagnose my transaction