Skip to main content

Invariant Errors

This section outlines error codes essential for maintaining the integrity of Invariant operations. These codes provide insights into specific issues encountered during interactions with the platform.

CodeDescription
NotAdminUnauthorized user attempts to invoke an admin-only message.
NotFeeReceiverUnauthorized user attempts to withdraw protocol fee.
PoolAlreadyExistAttempted creation of a pool with the same tokens (order does not matter) and the same fee tier that already exists.
PoolNotFoundUnable to retrieve the state of the specified pool.
TickAlreadyExistAttempted to create a tick that already exists.
InvalidTickIndexOrTickSpacingAttempt to create a tick with an out-of-bounds index or incorrect spacing.
PositionNotFoundUnable to retrieve the state of the specified position.
TickNotFoundUnable to retrieve the state of the specified tick.
FeeTierNotFoundUnable to retrieve the state of the specified fee tier.
PoolKeyNotFoundUnable to retrieve the state of the specified pool key.
AmountIsZeroAttempted swap with zero tokens on input or output, depending on swap direction.
WrongLimitAttempted swap with an incorrect price limit.
PriceLimitReachedSwap would exceed the specified limit.
NoGainSwapUser would receive zero tokens after the swap.
InvalidTickSpacingAttempted creation of a fee tier with incorrect tick spacing.
FeeTierAlreadyExistAttempted to create a fee tier that already exists.
PoolKeyAlreadyExistAttempted to create a pool key that already exists.
UnauthorizedFeeReceiverAttempted to claim fee without being a fee receiver.
ZeroLiquidityAttempted opening of a position with zero liquidity.
TransferErrorGRC-20 token transfer could not be performed.
TokensAreSameAttempted creation of a pool with exactly the same tokens.
AmountUnderMinimumAmountOutSwap amount out will not fit into the next swap amount to achieve the specified amount out.
InvalidFeeAttempted to create a fee tier with a fee over 100%.
NotEmptyTickDeinitializationAttempted to remove a tick with liquidity on it.
InvalidInitTickAttempted to create a pool with invalid init tick.
InvalidTickIndexAttempted to create a position with identical lower and upper tick
TickLimitReachedAttempted to swap above the current liquidity
NotEnoughGasToExecuteAttempted to execute an endpoint with insufficient gas
NotEnoughGasToUpdateAmount of gas left after cross program calls was insufficient to update the state