Error codes
This documents provides a list of error codes that may occur while interacting with the Veax smart contract. The list is not exhaustive.
Non-errors
These errors are expected during normal DEX operation. These may happen if the DEX state changes between estimation and transaction execution.
ERROR | DESCRIPTION |
---|---|
Slippage | Slippage error. |
InsufficientLiquidity | Insufficient liquidity in the pool to perform the swap. |
WrongRatio | Wrong token ratio (same as Slippage ). |
Input errors
ERROR | DESCRIPTION |
---|---|
AccountNotRegistered | Account is not registered. |
TokensStorageNotEmpty | Account's storage of tokens is not empty. |
TokenNotRegistered | Token is not registered. |
NotEnoughTokens | Not enough tokens in deposit. |
NonZeroTokenBalance | Non-zero token balance. |
IllegalWithdrawAmount | Withdraw amount is illegal. |
DepositSenderMustBeSigner | Deposit sender must be transaction signer or initiator... |
UnexpectedRegisterAccount | RegisterAccount action can be only first in batch. |
DepositAlreadyHandled | Deposit action already handled, should be present... |
DepositNotHandled | Deposit action not handled, should be present... |
DepositNotAllowed | Deposit action is not allowed in this batch action context. |
AtLeastOneSwap | At least one swap. |
InvalidParams | Invalid params. |
PoolNotRegistered | Liquidity pool is not registered. |
TokenDuplicates | Token is duplicated. |
PermissionDenied | Permission is denied. |
GuardChangeStateDenied | Guard change state is denied. |
IllegalFee | Fee is illegal. |
PositionDoesNotExist | Position does not exist. |
UserHasPositions | User has opened positions. |
NotYourPosition | Not your position. |
PriceTickOutOfBounds | Tick value is either too large or too small. |
Other errors
ERROR | DESCRIPTION |
---|---|
WithdrawInProgress | Operation cannot be performed... Please retry later. |
WrongActionResult | Wrong action result type. |
LiquidityTooSmall | Resulting liquidity is too small. |
PositionAlreadyExists | Position already exists. |
ConvOverflow | Numeric conversion error: overflow—source number... |
ConvSourceNaN | Numeric conversion error: source number is NaN. |
ConvNegativeToUnsigned | Numeric conversion error: attempt to convert negative... |
ConvPrecisionLoss | Numeric conversion error: loss of precision... |
PayableAPISuspended | Payable API is suspended. |
Internal errors
These errors indicate a bug in smart contracts implementation.
ERROR | DESCRIPTION |
---|---|
InternalTickNotFound | Tick not found. |
InternalTickNotDeleted | Tick not deleted. |
InternalDepositMoreThanMax | Evaluated deposited amount is larger than specified... |
InternalLossOfPrecisionInSwap | Too large numeric error in evaluation of swapped... |
InternalTopPoolsNumberMismatch | Logic error: number of picked pools doesn't match... |
InternalLogicError | Internal logic error. |