Skip to main content
Error codes are defined in common/src/errors.rs. Clients should match numeric codes, not variant display text.

Common Generic Errors

CodeNameMeaning
1AssetNotSupportedAsset is not active or not listed for this flow.
2AssetAlreadySupportedAsset is already listed.
5PoolAlreadyDeployedCentral pool already exists.
10InvalidPoolTemplatePool template hash is invalid.
12PairNotActiveAsset has no active oracle configuration for this operation.
13AccountNotInMarketAccount is missing, caller is unauthorized, or self-liquidation was attempted.
30PoolNotInitializedPool or market pool row is missing.
35TokenNotApprovedToken was not approved before market creation.
36InvalidPositionLimitsPosition limits are outside allowed bounds.
41InvalidRoleGovernance role is not recognized.
42BlendPoolNotApprovedBlend pool is not on the allow-list.

Collateral And Pool Errors

CodeNameMeaning
100InsufficientCollateralLTV gate fails.
101HealthFactorTooHighAccount is not liquidatable.
102HealthFactorTooLowPost-operation health factor is below threshold.
104NotCollateralSpoke asset cannot count as collateral.
107AssetNotBorrowableAsset is not borrowable in the account’s spoke config.
109PositionLimitExceededAccount would exceed position limits.
112InsufficientLiquidityPool cash is below required amount.
114CannotCleanBadDebtAccount is not eligible for bad-debt cleanup.
126MinBorrowCollateralNotMetCollateral floor is not met while debt remains.
127UtilizationAboveMaxOperation would exceed max utilization.

Spoke Errors

CodeNameMeaning
300SpokeNotFoundSpoke id does not exist.
301SpokeDeprecatedSpoke has been deprecated.
307AssetNotInSpokeHub asset is not listed on the spoke.
308AssetAlreadyInSpokeHub asset already listed on the spoke.
309SpokeAssetsLimitReachedSpoke asset count limit reached.
310SpokeMismatchRequested spoke does not match the account’s spoke.
311SpokeSupplyCapReachedSpoke supply cap would be exceeded.
312SpokeBorrowCapReachedSpoke borrow cap would be exceeded.
314SpokeCapBelowUsageSpoke cap would fall below current spoke usage.
315SpokeAssetPausedSpoke asset is paused for risk-increasing use.
316SpokeAssetFrozenSpoke asset blocks position increases.

Oracle Errors

CodeNameMeaning
201InvalidAggregatorAggregator address is invalid.
210NoLastPriceSource has no usable price.
216OracleNotConfiguredRequired oracle configuration is absent.
217InvalidPriceSource returned invalid price.
219TwapInsufficientObservationsTWAP history is insufficient.
223SanityBoundViolatedPrice is outside sanity bounds.

Flash Loan And Strategy Errors

CodeNameMeaning
400FlashLoanOngoingReentrant mutator attempted during guarded flow.
401FlashloanNotEnabledHub asset is not flashloanable.
412InvalidFlashloanReceiverReceiver is not a deployed WASM contract.
500ConvertStepsRequiredmultiply needs convert_swap for the supplied initial payment.

Integration Handling

  • Treat oracle errors as retryable only after source recovery or configuration change.
  • Treat cap and utilization errors as amount/headroom problems.
  • Treat auth and spoke-listing errors as request construction problems.
  • Use controller views to preflight, but treat mutation results as authoritative.