Tx Doctor / Solana error library / Pair insufficient liquidity
Solana error: Pair insufficient liquidity (0x177c)
There is not enough liquidity in the reachable bins to complete the swap, even allowing for slippage. The pool ran out of tokens on the side you are buying.
Why it happens
- LPs concentrated liquidity far from the current price, so the reachable bins hold very little.
- A large share of liquidity was withdrawn after your quote.
- The trade is simply bigger than the pool's depth.
- The active bin is at the edge of the populated range, so only one direction has liquidity.
How to fix it
- Reduce the amount until it fits the pool's depth; the quote shows the maximum fillable size.
- Check the pool's bin distribution before trading — a pool with 90% of liquidity in a narrow band cannot absorb size.
- Split the order or route through an aggregator that spans several pools.
- If you are an LP, this is the signal that the pool needs liquidity in the active range.
What it looks like in the logs
Program LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo failed: custom program error: 0x177c RPC simulation: Transaction simulation failed: Error processing Instruction: custom program error: 0x177c Wallet UI: "Transaction failed" — custom program error 0x177c (6012)
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.
The same number means something else on another program
Anchor assigns custom error codes by enum order starting at 6000, so this number is local to this program. The rows below show what the very same number means on the other programs.
| Program | 0x177c = 6012 |
|---|---|
| Jupiter | Token ledger account mismatch |
| Raydium CPMM | Insufficient vault |
| Orca | Liquidity amount must be greater than zero |
| Raydium LaunchLab | Vesting has not started |
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 transactionRelated Solana errors
Zero trading tokens
Meteora AMM 6006 (0x1776)
Not the owner of the LP token account
Meteora AMM 6064 (0x17b0)
Zero liquidity
Meteora DLMM 6007 (0x1777)
Position is not empty
Meteora DLMM 6030 (0x178e)
Cannot find non-zero liquidity bin array id
Meteora DLMM 6037 (0x1795)
Position not empty — cannot close
Raydium CLMM 6003 (0x1773)