DeDust Hub
Technical Reference

Error Codes

Below is a reference of error codes that may be returned by the CPMM V2 contracts (Pool, Deposit, and Position).

NameCodeDescription
NotUninitialized20Thrown during pool initialization if the pool is not in the Uninitialized state.
NotInitializing21Thrown when receiving a wallet resolution notification but the pool is not in the Initializing state.
NotInitialized22Thrown when an operation (like swap or withdrawal) is attempted on a pool that hasn't completed initialization.
SenderUnauthorized23Thrown when a message is received from an address that does not have the required permissions for the operation.
WalletCannotBeResolved24Thrown during TEP-89 discovery if the resolver returns a non-internal address (e.g., addr_none).
MessageValueTooLow25Thrown when the attached TON value is insufficient to cover gas, storage fees, or required forward fees.
DuplicateOfAssets26Thrown during pool initialization if Asset X and Asset Y are the same.
UnrelatedAsset28Thrown when a payment or deposit is made using an asset that is not part of the pool's asset pair.
ValueTooLow29Thrown when an amount or value provided in the message is lower than the logic requires.
SlippageExceeded30Thrown when the actual output amount or liquidity is less than the minimal_amount_out or minimal_liquidity specified by the user.
AssetNotSupported31Thrown when trying to interact with an asset type that the contract logic cannot handle.
WrongWorkchain32Thrown when an address (asset root or wallet) is not in the expected workchain (Basechain).
DeadlineExceeded33Thrown when a swap or operation is executed after the user-specified deadline timestamp.
ZeroLiquidity34Thrown when attempting a swap in a pool that has no liquidity.
MaxCreatorFeeExceeded35Thrown during initialization if the creator_fee_bps exceeds the allowed maximum (5000 BPS).
NotEnoughLiquidity36Thrown when a position attempts to withdraw more liquidity than it currently holds or more than is available (unlocked).
SwapNotActive37Thrown when a swap is attempted but the pool's swap activation conditions (time or initiator) are not yet met.
DepositNotActive38Thrown when a deposit is attempted but the pool's deposit activation conditions are not yet met.
WalletAlreadyRegistered39Internal error thrown if an attempt is made to register a jetton wallet for an asset that already has one registered.
WalletNotRegistered40Thrown when trying to find a jetton wallet for an asset, but it hasn't been discovered/registered yet.
UnknownResolver41Thrown during initialization if a wallet resolution is received from an address not expected by the pool.
RewardIsNotAllowed42Thrown when attempting to fund or claim a reward asset that is not in the pool's allowed_rewards map.
MaxRewardDurationExceeded43Thrown when funding a reward with a duration longer than the maximum allowed duration configured for that reward.
ZeroDurationReward44Thrown when attempting to create a new reward distribution with zero duration.
RewardBudgetDilution45Thrown when prolonging a reward if the new funding rate would significantly dilute the current reward rate.
RewardIsNotActive46Thrown when attempting to interact with a reward index that has no active distribution.
ZeroInputAmount47Thrown when a swap or deposit is initiated with an input amount of zero.
UnknownOperation65535Thrown when the contract receives a message with an unknown opcode (0xffff).