Errors
Anchor numbers custom errors from 6000 in the order they are declared.
| Code | Name | Message | When |
|---|---|---|---|
| 6000 | NotUpgradeAuthority | only the program upgrade authority may create the market | init_market signed by anyone else |
| 6001 | BadParams | parameters out of range | funding period or TWAP window outside its bounds |
| 6002 | Unauthorized | not allowed | a vault or LP position used by someone who does not own it |
| 6003 | Disabled | disabled in this build | a test-only instruction on the mainnet build |
| 6004 | Zero | amount must be above zero | zero deposits, mints, swaps or shares |
| 6005 | TooMuch | amount too large | burning more than the debt, withdrawing more than the collateral, liquidating more than half |
| 6006 | Undercollateralized | vault would fall under 150% | a mint or withdraw that would end under the line |
| 6007 | NotLiquidatable | vault is at or above 150% | liquidating a healthy vault |
| 6008 | Slippage | price moved past the limit | swap output under min_out, or liquidity over max_tokens |
| 6009 | EmptyPool | pool is empty | a swap before anyone added liquidity |
| 6010 | WrongOracle | not a SOL/USD price account | an oracle account not owned by the |
| 6011 | WrongFeed | price account is not SOL/USD | another |
| 6012 | PartialVerification | price update is only partially verified | verification level is not Full |
| 6013 | BadPrice | bad price data | wrong layout or a price of zero or less |
| 6014 | StalePrice | price is older than 120 seconds | post a fresher |
| 6015 | PriceTooUncertain | price confidence is wider than 2% | wait for a tighter update |
| 6016 | Math | math overflow | a value that does not fit |
There is no error for liquidating a holder, because there is no instruction that could try.