Skip to content

Error Codes

Core Errors (0–12)

CodeNameDescription
0InternalErrorUnexpected internal error
1InvalidInputAmountNegative or invalid input amount
2DependencyContractErrorError from an external contract
3MarketIsNotOwnedOperation requires owned market
4BorrowForbiddenOnMarketMarket status prohibits borrowing
5DepositForbiddenOnMarketMarket status prohibits depositing
6MarketIsFrozenMarket is fully frozen
7InvalidMarketConfigOrUpdateInvalid market configuration
8IncorrectRequestTypeWrong request type in batch
9OverOrUnderflowArithmetic overflow or underflow
10TooManyPositionsObligation exceeds max positions
11MinCollateralValueIsNotMetCollateral below minimum
12NonPositiveSharesAmountWould mint zero or negative shares

Pool Errors (100–113)

CodeNameDescription
100InvalidInitializationPool already exists
101PoolDoesNotExistInvalid pool address
102InvalidLoanPoolConfigInvalid pool configuration
103NotEnoughPoolFundsInsufficient pool liquidity
104DepositPoolDoesNotExistDeposit pool not found
105BorrowPoolDoesNotExistBorrow pool not found
106CollateralPoolDoesNotExistCollateral pool not found
107PoolAlreadyContainsQueuedPoolSetPool already has a pending update
108PoolDoesNotHaveQueuedPoolSetNo pending pool set to apply/cancel
109PoolSetIsNotYetApplicableTime-lock period not elapsed
110OperationForbiddenOnPoolPool status flags prohibit operation
111MarketAlreadyContainsQueuedInConfigUpdateMarket already has a pending update
112MarketDoesNotHaveQueuedInConfigUpdateNo pending market update
113MarketConfigUpdateIsNotYetApplicableMarket time-lock not elapsed

Obligation Errors (200–207)

CodeNameDescription
200ObligationDoesNotExistNo obligation for this user/seed
201DepositPositionDoesNotExistNo deposit in this pool
202BorrowPositionDoesNotExistNo borrow in this pool
203WithdrawScarcityOverLimitWithdrawal exceeds scarcity limit
204ScarcityCooldownPeriodMust wait before next scarcity withdrawal
205BorrowPositionForAssetExistsCannot have deposit and borrow in same pool
206DepositPositionForAssetExistsCannot have borrow and deposit in same pool
207UnhealthyOperationOperation would make position unhealthy

Balance Errors (400–401)

CodeNameDescription
400PoolSupplyLimitExceededPool supply cap reached
401PoolUtilizationRatioCapExceededBorrow would exceed utilization limit

Oracle Errors (500–502)

CodeNameDescription
500OracleDoesNotKnowAssetPriceOracle has no price for asset
501OracleStalePriceOracle price is too old
502NonPositiveOraclePriceOracle returned zero/negative price

Liquidation Errors (600–605)

CodeNameDescription
600InvalidLiquidationInputsInvalid liquidation parameters
601ObligationIsHealthyCannot liquidate a healthy position
602ObligationContainsOpenCoverBadDebtRequestsMust resolve bad debt requests first
603BadDebtCoverageCriterionIsNotMetBad debt criteria not met
604AssetCannotBeUsedAsCollateralPool has close_ltv_bps = 0
605LiquidationExcessiveDemandedCollateralDemanded collateral exceeds available

Batch Errors (700–702)

CodeNameDescription
701InvalidSwapSwap operation failed
702FlashBorrowAlreadyRegisteredOnly one flash borrow per batch