Appearance
Error Codes
Core Errors (0–12)
| Code | Name | Description |
|---|---|---|
| 0 | InternalError | Unexpected internal error |
| 1 | InvalidInputAmount | Negative or invalid input amount |
| 2 | DependencyContractError | Error from an external contract |
| 3 | MarketIsNotOwned | Operation requires owned market |
| 4 | BorrowForbiddenOnMarket | Market status prohibits borrowing |
| 5 | DepositForbiddenOnMarket | Market status prohibits depositing |
| 6 | MarketIsFrozen | Market is fully frozen |
| 7 | InvalidMarketConfigOrUpdate | Invalid market configuration |
| 8 | IncorrectRequestType | Wrong request type in batch |
| 9 | OverOrUnderflow | Arithmetic overflow or underflow |
| 10 | TooManyPositions | Obligation exceeds max positions |
| 11 | MinCollateralValueIsNotMet | Collateral below minimum |
| 12 | NonPositiveSharesAmount | Would mint zero or negative shares |
Pool Errors (100–113)
| Code | Name | Description |
|---|---|---|
| 100 | InvalidInitialization | Pool already exists |
| 101 | PoolDoesNotExist | Invalid pool address |
| 102 | InvalidLoanPoolConfig | Invalid pool configuration |
| 103 | NotEnoughPoolFunds | Insufficient pool liquidity |
| 104 | DepositPoolDoesNotExist | Deposit pool not found |
| 105 | BorrowPoolDoesNotExist | Borrow pool not found |
| 106 | CollateralPoolDoesNotExist | Collateral pool not found |
| 107 | PoolAlreadyContainsQueuedPoolSet | Pool already has a pending update |
| 108 | PoolDoesNotHaveQueuedPoolSet | No pending pool set to apply/cancel |
| 109 | PoolSetIsNotYetApplicable | Time-lock period not elapsed |
| 110 | OperationForbiddenOnPool | Pool status flags prohibit operation |
| 111 | MarketAlreadyContainsQueuedInConfigUpdate | Market already has a pending update |
| 112 | MarketDoesNotHaveQueuedInConfigUpdate | No pending market update |
| 113 | MarketConfigUpdateIsNotYetApplicable | Market time-lock not elapsed |
Obligation Errors (200–207)
| Code | Name | Description |
|---|---|---|
| 200 | ObligationDoesNotExist | No obligation for this user/seed |
| 201 | DepositPositionDoesNotExist | No deposit in this pool |
| 202 | BorrowPositionDoesNotExist | No borrow in this pool |
| 203 | WithdrawScarcityOverLimit | Withdrawal exceeds scarcity limit |
| 204 | ScarcityCooldownPeriod | Must wait before next scarcity withdrawal |
| 205 | BorrowPositionForAssetExists | Cannot have deposit and borrow in same pool |
| 206 | DepositPositionForAssetExists | Cannot have borrow and deposit in same pool |
| 207 | UnhealthyOperation | Operation would make position unhealthy |
Balance Errors (400–401)
| Code | Name | Description |
|---|---|---|
| 400 | PoolSupplyLimitExceeded | Pool supply cap reached |
| 401 | PoolUtilizationRatioCapExceeded | Borrow would exceed utilization limit |
Oracle Errors (500–502)
| Code | Name | Description |
|---|---|---|
| 500 | OracleDoesNotKnowAssetPrice | Oracle has no price for asset |
| 501 | OracleStalePrice | Oracle price is too old |
| 502 | NonPositiveOraclePrice | Oracle returned zero/negative price |
Liquidation Errors (600–605)
| Code | Name | Description |
|---|---|---|
| 600 | InvalidLiquidationInputs | Invalid liquidation parameters |
| 601 | ObligationIsHealthy | Cannot liquidate a healthy position |
| 602 | ObligationContainsOpenCoverBadDebtRequests | Must resolve bad debt requests first |
| 603 | BadDebtCoverageCriterionIsNotMet | Bad debt criteria not met |
| 604 | AssetCannotBeUsedAsCollateral | Pool has close_ltv_bps = 0 |
| 605 | LiquidationExcessiveDemandedCollateral | Demanded collateral exceeds available |
Batch Errors (700–702)
| Code | Name | Description |
|---|---|---|
| 701 | InvalidSwap | Swap operation failed |
| 702 | FlashBorrowAlreadyRegistered | Only one flash borrow per batch |