Errors
Title: Custom Errors library.
Author: Axicon Labs Limited
Contains all custom error messages used in Panoptic.
Errorsβ
AccountInsolventβ
PanopticPool: The account is not solvent enough to perform the desired action
error AccountInsolvent(uint256 solvent, uint256 numberOfTicks);
CastingErrorβ
Casting error
e.g. uint128(uint256(a)) fails
error CastingError();
BelowMinimumRedemptionβ
CollateralTracker: Attempted to withdraw/redeem less than a single asset
error BelowMinimumRedemption();
ChunkHasZeroLiquidityβ
SFPM: Mints/burns of zero-liquidity chunks in Uniswap are not supported
error ChunkHasZeroLiquidity();
AlreadyInitializedβ
Smart contract has already been initialized
error AlreadyInitialized();
DepositTooLargeβ
CollateralTracker: The amount of shares (or assets) deposited is larger than the maximum permitted
error DepositTooLarge();
DuplicateTokenIdβ
PanopticPool: The list of provided TokenIds has a duplicate entry
error DuplicateTokenId();
EffectiveLiquidityAboveThresholdβ
PanopticPool: The effective liquidity (X32) is greater than min(MAX_SPREAD, USER_PROVIDED_THRESHOLD) during a long mint or short burn
Effective liquidity measures how much new liquidity is minted relative to how much is already in the pool
error EffectiveLiquidityAboveThreshold();
ExceedsMaximumRedemptionβ
CollateralTracker: Attempted to withdraw/redeem more than available liquidity, owned shares, or open positions would allow for
error ExceedsMaximumRedemption();
InputListFailβ
PanopticPool: The provided list of option positions is incorrect or invalid
error InputListFail();
InvalidTickβ
Tick is not between MIN_TICK and MAX_TICK
error InvalidTick();
LiquidityTooHighβ
Liquidity in a chunk is above 2**128
error LiquidityTooHigh();
InsufficientCreditLiquidityβ
CollateralTracker: There is not enough available liquidity to fulfill a credit in the PanopticPool
error InsufficientCreditLiquidity();
InvalidBuilderCodeβ
RiskEngine: invalid builder code
error InvalidBuilderCode();
InvalidTokenIdParameterβ
The TokenId provided by the user is malformed or invalid
error InvalidTokenIdParameter(uint256 parameterType);
Parameters
| Name | Type | Description |
|---|---|---|
parameterType | uint256 | poolId=0, ratio=1, tokenType=2, risk_partner=3, strike=4, width=5, two identical strike/width/tokenType chunks=6 |
InvalidUniswapCallbackβ
A mint or swap callback was attempted from an address that did not match the canonical Uniswap V3 pool with the claimed features
error InvalidUniswapCallback();
LengthMismatchβ
RiskEngine: There is a mismatch between the length of the positionIdList and positionBalanceArray
error LengthMismatch();
NetLiquidityZeroβ
PanopticPool: The Net Liquidity is zero due to small positions and cannot be used to compute the liquiditySpread
error NetLiquidityZero();
NoLegsExercisableβ
PanopticPool: None of the legs in a position are force-exercisable (they are all either short or ATM long)
error NoLegsExercisable();
NotALongLegβ
PanopticPool: The leg is not long, so premium cannot be settled through settleLongPremium
error NotALongLeg();
NotBuilderβ
builderWallet: can only be called by the Builder
error NotBuilder();
NotEnoughLiquidityInChunkβ
PanopticPool: There is not enough available liquidity in the chunk for one of the long legs to be created (or for one of the short legs to be closed)
error NotEnoughLiquidityInChunk();
NotEnoughTokensβ
CollateralTracker: The user does not own enough assets to open/close a position
error NotEnoughTokens(address tokenAddress, uint256 assetsRequested, uint256 assetBalance);
NotGuardianβ
RiskEngine: can only be called by the guardian
error NotGuardian();
NotMarginCalledβ
PanopticPool: Position is still solvent and cannot be liquidated
error NotMarginCalled();
NotPanopticPoolβ
CollateralTracker: The caller for a permissioned function is not the Panoptic Pool
error NotPanopticPool();
PoolNotInitializedβ
The Uniswap Pool has not been created, so it cannot be used in the SFPM or have a PanopticPool created for it by the factory
error PoolNotInitialized();
PositionCountNotZeroβ
CollateralTracker: The user has open/active option positions, so they cannot transfer collateral shares
error PositionCountNotZero();
PositionNotOwnedβ
PanopticPool: A position with the given token ID is not owned by the user and has positionSize=0
error PositionNotOwned();
PositionTooLargeβ
SFPM: The maximum token deltas (excluding swaps) for a position exceed (2^127 - 5) at some valid price
error PositionTooLarge();
PriceBoundFailβ
The current tick in the pool (post-ITM-swap) has fallen outside a user-defined open interval slippage range
error PriceBoundFail(int24 currentTick);
PriceImpactTooLargeβ
The Price impact of that trade is too large
error PriceImpactTooLarge();
StaleOracleβ
An oracle price is too far away from another oracle price or the current tick
This is a safeguard against price manipulation during option mints, burns, liquidations, force exercises, and premium settlements
error StaleOracle();
TooManyLegsOpenβ
PanopticPool: The position being minted would increase the total amount of legs open for the account above the maximum
error TooManyLegsOpen();
TransferFailedβ
ERC20 or SFPM (ERC1155) token transfer did not complete successfully
error TransferFailed(address token, address from, uint256 amount, uint256 balance);
InvalidTickBoundβ
The tick range given by the strike price and width is invalid
because the upper and lower ticks are not initializable multiples of tickSpacing
or one of the ticks exceeds the MIN_TICK or MAX_TICK bounds
error InvalidTickBound();
UnauthorizedUniswapCallbackβ
An unlock callback was attempted from an address other than the canonical Uniswap V4 pool manager
error UnauthorizedUniswapCallback();
UnderOverFlowβ
An operation in a library has failed due to an underflow or overflow
error UnderOverFlow();
Reentrancyβ
The function has triggered a reentrancy check
error Reentrancy();
WrongPoolIdβ
PanopticPool: The supplied poolId does not match the poolId for that Uniswap Pool
error WrongPoolId();
WrongUniswapPoolβ
SFPM: The poolId's don't match
error WrongUniswapPool();
ZeroAddressβ
PanopticFactory: the zero address was supplied as a parameter
error ZeroAddress();
ZeroCollateralRequirementβ
CollateralTracker: Mints/burns of a position returns no collateral requirement
error ZeroCollateralRequirement();
TokenIdHasZeroLegsβ
PanopticMath: The supplied tokenId has no valid legs
error TokenIdHasZeroLegs();