Error Handling
tradePAMM and getQuote revert on failure. There is no HTTP error envelope on this path.
Swap and quote reverts
DirectSwapDisabled
directSwapEnabled is off for the pair, or the pair has no engine assigned. A quote may still succeed if an engine exists.
InvalidNativePool
Pool not whitelisted on this router.
QuoteExpired
deadlineTimestamp passed.
PriceExpired
The engine price is no longer valid. V2 engines expire by block number (validUntil); V1 engines expire by timestamp. Re-quote and retry.
PriceOutsideAllowedRange
Fill is below amountOutMinimum (the engine's slippage check). Widen slippage, reduce size, or re-quote.
InsufficientDepth
Size larger than remaining ladder/curve.
BelowMinimumTradeSize
Under minBaseInputRaw / minQuoteInputRaw, or the net amount rounds to zero.
UnsupportedPair
The sell/buy tokens are not this engine's baseAsset() / quoteAsset().
InvalidPrice / ZeroAmountOut
Zero input amount, or the quote resolves to zero output.
InsufficientVaultCash
Quote-time only. The treasury does not hold enough of the buy token to pay the output.
PositionLimitExceeded
The pair's inventory cap would be exceeded. Try a smaller size or the opposite direction.
ZeroInput
Router rejected the call: zero recipient, sellerToken == buyerToken, or zero amount.
UnexpectedMsgValue
msg.value > 0 while selling an ERC-20. Send msg.value = 0.
InvalidAmount
Selling native and msg.value != sellerTokenAmount, or the received amount differs from the requested amount (for example a fee-on-transfer token).
EnforcedPause
The router is paused.
Last updated