Pool
The following table outlines potential errors that may occur during interactions with the pool contract in GnoSwap:
GNOSWAP-POOL-001
Unsupported fee tier
Occurs when an unsupported fee tier is specified for pool operations.
GNOSWAP-POOL-002
Pool already created
Occurs when there is an attempt to create a pool that already exists with the same token pair and fee tier.
GNOSWAP-POOL-003
Out of range for numeric value
Occurs when a numeric input exceeds the allowed range for liquidity or token amounts.
GNOSWAP-POOL-004
Invalid input data
Occurs when input data does not meet the expected format or parameters, making the operation invalid.
GNOSWAP-POOL-005
Requested data not found
Occurs when the system is unable to locate the requested data for the operation, such as a specific pool or liquidity position.
GNOSWAP-POOL-006
Invalid liquidity calculated
Occurs when the calculated liquidity value is incorrect, possibly due to invalid inputs or calculation errors.
GNOSWAP-POOL-007
Zero liquidity
Occurs when an operation that requires positive liquidity is attempted with zero liquidity.
GNOSWAP-POOL-008
Same token used in single pool
Occurs when the same token is used twice in a single pool, which is invalid in a pool configuration.
GNOSWAP-POOL-009
TickLower is invalid
Occurs when request tickLower does not match to the tickSpacing.
GNOSWAP-POOL-010
TickUpper is invalid
Occurs when request tickUpper does not match to the tickSpacing.
GNOSWAP-POOL-011
Invalid swap amount
Occurs when the swap amount provided is invalid, such as a negative value or an amount that exceeds available liquidity.
GNOSWAP-POOL-012
Invalid protocol fee percentage
Occurs when an invalid protocol fee percentage is provided, such as a value outside the acceptable range.
GNOSWAP-POOL-013
Invalid withdrawal fee percentage
Occurs when the withdrawal fee percentage is outside the allowed range or is otherwise invalid.
GNOSWAP-POOL-014
Cannot swap while pool is locked
Occurs when a user attempts to perform a swap operation while the pool is locked, making swaps temporarily unavailable.
GNOSWAP-POOL-015
Swap price out of range
Occurs when the specified swap price falls outside the acceptable range defined by the pool's parameters.
GNOSWAP-POOL-016
Token transfer failed
Occurs when a token transfer fails due to issues such as insufficient gas, network issues, or restrictions on the token itself.
GNOSWAP-POOL-017
Invalid tick and tick spacing requested
Occurs when an invalid tick value or tick spacing is provided, which does not align with the pool's tick configuration requirements.
GNOSWAP-POOL-018
TickLower is greater than or equal to tickUpper
Occurs when tickLower is equal or greater than tickUpper while it should be always less.
GNOSWAP-POOL-019
Underflow
Occurs when mathematical results underflow numeric range.
GNOSWAP-POOL-020
Overflow
Occurs when mathematical results overflow numeric range.
GNOSWAP-POOL-021
Balance update failed
Occurs when token transfer succeeds, but pool's balance did not update.
GNOSWAP-POOL-022
Invalid payer
Occurs when the payer address is invalid or unauthorized.
GNOSWAP-POOL-023
Not access EOA
Occurs when the caller is not an externally owned account (EOA).
GNOSWAP-POOL-024
Insufficient payment
Occurs when the payment amount is insufficient for the operation.
GNOSWAP-POOL-025
Not initialized observation
Occurs when an observation has not been initialized.
GNOSWAP-POOL-026
Target timestamp before oldest observation
Occurs when the target timestamp is before the oldest available observation.
Last updated