Skip to main content

ErrorsLib

ErrorsLib

Centralized library for reusable custom errors across the protocol.

NotAuthorized

error NotAuthorized()

Caller is not authorized to perform the requested action.

ZeroAddress

error ZeroAddress()

Address parameter is the zero address.

AlreadyRegistered

error AlreadyRegistered()

Address or token is already registered or whitelisted.

InvalidAddress

error InvalidAddress()

Provided address is invalid for the specified context.

TokenNotWhitelisted

error TokenNotWhitelisted(address token)

Token is not whitelisted for the requested operation.

Parameters

NameTypeDescription
tokenaddressThe token address that is not whitelisted.

AmountMustBeGreaterThanZero

error AmountMustBeGreaterThanZero(address asset)

The amount specified must be greater than zero.

Parameters

NameTypeDescription
assetaddressThe asset address associated with the amount.

InvalidTotalWeight

error InvalidTotalWeight()

The total weight assigned to assets or allocations is invalid.

OrderIntentCannotBeEmpty

error OrderIntentCannotBeEmpty()

The order intent list is empty and must contain at least one entry.

TokenAlreadyInOrder

error TokenAlreadyInOrder(address token)

Token has already been added to the order intent list.

Parameters

NameTypeDescription
tokenaddressThe duplicate token address.

InsufficientAmount

error InsufficientAmount()

Insufficient amount to complete the operation.

AdapterNotSet

error AdapterNotSet()

Expected adapter address is not set.

InvalidUnderlyingDecimals

error InvalidUnderlyingDecimals()

The underlying asset has an unsupported or invalid number of decimals.

InvalidArguments

error InvalidArguments()

One or more function arguments are invalid.

InvalidAdapter

error InvalidAdapter(address asset)

The adapter is not compatible with the asset.

Parameters

NameTypeDescription
assetaddressThe asset address that is not compatible with the adapter.

SystemNotIdle

error SystemNotIdle()

Operation cannot be performed because the system is not idle.

VaultDecommissioned

error VaultDecommissioned()

Vault is decommissioned and cannot accept new requests.

BelowMinimumDeposit

error BelowMinimumDeposit(uint256 amount, uint256 minimum)

The deposit amount is below the minimum required amount.

Parameters

NameTypeDescription
amountuint256The amount that was provided.
minimumuint256The minimum amount required.

BelowMinimumRedeem

error BelowMinimumRedeem(uint256 amount, uint256 minimum)

The redeem amount is below the minimum required amount.

Parameters

NameTypeDescription
amountuint256The amount that was provided.
minimumuint256The minimum amount required.

DepositNotAllowed

error DepositNotAllowed()

Deposit not allowed due to access control restrictions.

SlippageExceeded

error SlippageExceeded(address asset, uint256 actual, uint256 expected)

Slippage exceeds the configured tolerance.

Parameters

NameTypeDescription
assetaddressThe asset address where slippage was detected.
actualuint256The actual value observed.
expecteduint256The expected value.