⁉️Earn Error Codes

BlueberryError.sol - Technical Documentation

ErrorDescriptionType of Error

ZERO_AMOUNT

Thrown when the amount is zero

Common

ZERO_ADDRESS

Thrown when the address is zero

Common

INPUT_ARRAY_MISMATCH

Thrown when the array input has a mismatch for token length

Common

TOO_LONG_DELAY(uint256 delayTime)

Thrown when the delay time is too long

Oracle

NO_MAX_DELAY(address token)

Thrown when there is no maximum delay set for the token

Oracle

PRICE_OUTDATED(address token)

Thrown when the price is larger than the maximum delay

Oracle

NO_SYM_MAPPING(address token)

Thrown when there is no

Oracle

OUT_OF_DEVIATION_CAP(uint256 deviation)

Thrown when the deviation is greater than the cap.

Oracle

EXCEED_SOURCE_LENGTH(uint256 length)

Thrown when the source length is too long

Oracle

NO_PRIMARY_SOURCE(address token)

Thrown when there is no primary price feed for the token

Oracle

NO_VALID_SOURCE(address token)

Thrown when the input for a token is not valid

Oracle

EXCEED_DEVIATION()

Thrown when the amount of deviation is greater than the cap

Oracle

TOW_LOW_MEAN(uint256 mean)

Thrown when the mean is below the required

Oracle

NO_MEAN(address token)

Thrown when there is no mean price for a token

Oracle

NO_STABLEPOOL(address token)

Thrown when there is no stable pool for a token

Oracle

PRICE_FAILED(address token)

Thrown when unable to get a price for a token

Oracle

LIQ_THRESHOLD_TOO_HIGH(uint256 threshold)

Thrown when the input is too large for the liquidation threshold

Oracle

LIQ_THRESHOLD_TOO_LOW(uint256 threshold)

Thrown when the input is too small for the liquidation threshold

Oracle

ORACLE_NOT_SUPPORT(address token)

Thrown when a token does not have oracle support

Oracle

ORACLE_NOT_SUPPORT_LP(address lp)

Thrown when a LP token does not have oracle support

Oracle

ORACLE_NOT_SUPPORT_WTOKEN(address wToken)

Thrown when a wtoken does not have oracle support

Oracle

ERC1155_NOT_WHITELISTED(address collToken)

Thrown when an invalid ERC1155 is provided as input as it is not whitelisted

Oracle

NO_ORACLE_ROUTE(address token)

Thrown when the token does not have a set oracle routing

Oracle

NOT_BANK(address caller)

Thrown when a caller is not the bank address

Spell

REFUND_ETH_FAILED(uint256 balance)

Thrown when unable to refund the balance in ETH

Spell

NOT_FROM_WETH(address from)

Thrown when an invalid WETH address is provided

Spell

LP_NOT_WHITELISTED(address lp)

Thrown when an invalid LP address is provided as input

Spell

COLLATERAL_NOT_EXIST(uint256 strategyId, address colToken)

Thrown when an invalid Collateral token is provided as input for a strategy

Spell

STRATEGY_NOT_EXIST(address spell, uint256 strategyId)

Thrown when attempting to enter a non-supported strategy

Spell

EXCEED_MAX_POS_SIZE(uint256 strategyId)

Thrown when attempting to make a position larger than cap

Spell

EXCEED_MAX_LTV()

Thrown when attempting to make a position larger than the supplied collateral

Spell

INCORRECT_LP(address lpToken)

Thrown when an invalid LP address is provided as input

Ichi Spell

INCORRECT_PID(uint256 pid)

Thrown when an invalid pool ID is provided as input

Ichi Spell

INCORRECT_COLTOKEN(address colToken)

Thrown when the collateral token is not the appropriate one

Ichi Spell

INCORRECT_UNDERLUING(address uToken)

Thrown when the underlying token is not the appropriate one

Ichi Spell

NOT_FROM_UNIV3(address sender)

Thrown when the sender address is not a Uniswap V3 address

Ichi Spell

BORROW_FAILED(uint256 amount)

Thrown when borrowing has failed

Vault

REPAY_FAILED(uint256 amount)

Thrown when repaying debt has failed

Vault

LEND_FAILED(uint256 amount)

Thrown when lending has failed

Vault

REDEEM_FAILED(uint256 amount)

Thrown when redeeming has failed

Vault

INVALID_TOKEN_ID(uint256 tokenId)

Thrown when an invalid token ID is provided as input

Wrapper

BAD_PID(uint256 pid)

Thrown if supplied an invalid pool ID

Wrapper

BAD_REWARD_PER_SHARE(uint256 rewardPerShare)

Thrown if there is a mismatch in rewards per share of a vault

Wrapper

FEE_TOO_HIGH(uint256 feeBps)

Thrown if supplied value is too large for feeBps

Bank

NOT_UNDER_EXECUTION()

Thrown if attempting use function during execution

Bank

BANK_NOT_LISTED(address token)

Thrown if the supplied token address is not supported by that bank

Bank

BANK_ALREADY_LISTED()

Thrown if the Bank address is already supported in the protocol

Bank

BANK_LIMIT()

Thrown if the amount of banks has reached its limit

Bank

CTOKEN_ALREADY_ADDED()

Thrown if the cToken is already supported in the protocol

Bank

NOT_EOA(address from)

Thrown if the address is not an externally owned account (EOA)

Bank

LOCKED()

Thrown if the _IN_EXEC_LOCK variable is not equal to _NOT_ENTERED

Bank

NOT_FROM_SPELL(address from)

Thrown if the sender is not the spell address

Bank

NOT_FROM_OWNER(uint256 positionId, address sender)

Thrown when the sender is not the owner of a position

Bank

NOT_IN_EXEC()

Thrown when the function is called outside of execution.

Bank

ANOTHER_COL_EXIST(address collToken)

Thrown when the collToken already exists in the protocol

Bank

NOT_LIQUIDATABLE(uint256 positionID)

Thrown when a position is still healthy

Bank

BAD_POSISTION(uint256 posId)

Thrown when the position Id provided is not supported

Bank

BAD_COLLATERAL(uint256 positionId)

Thrown when the supplied collateral address is not supported

Bank

INSUFFICIENT_COLLATERAL()

Thrown when the collateral required is too small.

Bank

SPELL_NOT_WHITELISTED(address spell)

Thrown when the Spell address is not whitelisted

Bank

TOKEN_NOT_WHITELISTED(address token)

Thrown when the Token address is not whitelisted

Bank

REPAY_EXCEEDS_DEBIT(uint256 repay, uint256 debt)

Thrown when repay value is larger than debt value

Bank

LEND_NOT_ALLOWED()

Thrown when lending is turned off

Bank

BORROW_NOT_ALLOWED()

Thrown when borrowing is turned off

Bank

INVALID_UTOKEN(address uToken)

Thrown when the uToken provided is not approved

Bank

INVALID_FEE_DISTRIBUTION()

Thrown when the fee distribution is not set

Config

NO_TREASURY_SET()

Thrown when there is no treasury set

Config

Last updated