# Errors overview

All errors in the project are represented as string codes. The main purpose of this decision is the reduction of gas to be paid by users. Here you can find all errors codes and their explanation.

### DexCore errors

* `100` - unknown lambda function ID.
* `101` - lambda function is already set.
* `102` - wrong lambda function index (too high).
* `103` - can't unpack lambda function.
* `104` - wrong order of a tokens from parameters.
* `105` - zero token A amount in.
* `106` - zero token B amount in.
* `107` - pair (pool) with the specified `token_id` already listed.
* `108` - pair (pool) with the specified `token_id` not listed.
* `109` - pair doesn't have a liquidity.
* `110` - zero amount of LP tokens (shares) expected.
* `111` - low token A amount in.
* `112` - low token B amount in.
* `113` - a [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract not found (not TOK/TEZ LP pair).
* `114` - insufficient liquidity.
* `115` - dust output (zero tokens amount expected).
* `116` - high expectations of output tokens.
* `117` - empty route of swaps.
* `118` - zero amount in was passed as the parameter.
* `119` - wrong route of a swap.
* `120` - wrong TEZ amount were passed to the transaction.
* `121` - [***pour\_out***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/pour_out) entrypoint of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `122` - [***pour\_over***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/pour_over) entrypoint of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `123` - [***ban\_baker***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/ban_baker) entrypoint of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `124` - [***vote***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/vote) entrypoint of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `125` - [***is\_banned\_baker***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/on-chain-views-overview/is_banned_baker) view of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `126` - [***default***](https://docs.quipuswap.com/smart-contracts/dex-2.0/flashswapsproxy-contract/entrypoints-overview/default) entrypoint of [FlashSwapsProxy](https://docs.quipuswap.com/smart-contracts/dex-2.0/flashswapsproxy-contract) contract isn't found.
* `127` - [***get\_tez\_balance***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/on-chain-views-overview/get_tez_balance) view of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `128` - [***flash\_swap\_callback***](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract/entrypoints-overview/callbacks/flash_swap_callback) entrypoint of [DexCore](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract) contract isn't found.
* `129` - wrong amount of flash swap returns.
* `130` - referring on yourself is forbidden.
* `131` - [***withdraw\_rewards***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/withdraw_rewards) entrypoint of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `132` - insufficient interface fee balance.
* `133` - [***get\_user\_candidate***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/on-chain-views-overview/get_user_candidate) view of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `134` - [***launch\_callback***](https://docs.quipuswap.com/smart-contracts/dexcore-contract/entrypoints-overview/callbacks/launch_callback#launch_callback_t) entrypoint of [DexCore](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract) contract isn't found.
* `135` - [***receive\_fee***](https://docs.quipuswap.com/smart-contracts/dex-2.0/auction-contract/entrypoints-overview/auction-entrypoints/receive_fee) entrypoint of [Auction](https://docs.quipuswap.com/smart-contracts/dex-2.0/auction-contract) contract isn't found.
* `136` - reentrancy.
* `137` - [***close***](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract/entrypoints-overview/callbacks/close) entrypoint of [DexCore](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract) contract isn't found.
* `138` - only entered (transaction must be not the first transaction in the chain of calls).
* `139` - too few swaps.
* `140` - can't perform voting because of zero LPs balance of the user.
* `141` - wrong amount of TEZ tokens were attached to transaction.
* `142` - wrong reserves state after execution of the operation.
* `143` - `pair_id` parameter not provided (in case of withdrawing TEZ tokens).
* `144` - action outdated (the time until which the transaction remained valid was passed).

### Bucket errors

* `200` - [***validate***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bakerregistry-contract/entrypoints-overview/validate) entrypoint of [BakerRegistry](https://docs.quipuswap.com/smart-contracts/dex-2.0/bakerregistry-contract) contract isn't found.
* `201` - [***get\_total\_supply***](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract/on-chain-views-overview/get_total_supply) view of [DexCore](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract) contract isn't found.
* `202` - [***get\_collecting\_period***](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract/on-chain-views-overview/get_collecting_period) view of [DexCore](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract) contract isn't found.

### Auction errors

* `300` - unknown lambda function ID.
* `301` - can't unpack lambda function.
* `302` - wrong lambda function index (too high).
* `303` - lambda function is already set.
* `304` - auction with the specified ID not found.
* `305` - token for auction is whitelisted. It is not possible to start an auction with whitelisted tokens.
* `306` - token for withdrawing is NOT whitelisted.
* `307` - [Auction](https://docs.quipuswap.com/smart-contracts/dex-2.0/auction-contract) contract have insufficient balance of tokens for a new auction launch.
* `308` - user's bid is less than minimum bid for an auction launch or less that previous bid.
* `309` - auction is already finished or rewards are already claimed.
* `310` - auction is not finished.
* `311` - wrong auction duration (less than or equal to 0).

### Common errors

* `400` - `sender` of the transaction is not current administrator.
* `401` - `sender` of the transaction is not current pending administrator (not the address that was assigned by the current administrator to the shift).
* `402` - `sender` of the transaction is not a manager.
* `403` - `sender` of the transaction is not [DexCore](https://docs.quipuswap.com/smart-contracts/dex-2.0/dexcore-contract) contract.
* `404` - ***transfer*** entrypoint of FA12 token isn't found.
* `405` - ***transfer*** entrypoint of FA2 token isn't found.
* `406` - not a nat (not an unsigned integer).
* `407` - wrong token type.
* `408` - division by zero.
* `409` - TEZ tokens receiver contract not found (not user account or contract doesn't have a `default` entrypoint).
* `410` - [***fill***](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract/entrypoints-overview/fill) entrypoint of [Bucket](https://docs.quipuswap.com/smart-contracts/dex-2.0/bucket-contract) contract isn't found.
* `411` - `pending_admin` in the storage of a contract is `None` (admin didn't call ***set\_admin*** entrypoint).
* `412` - non payable entrypoint (can't accept TEZ tokens during call of an entrypoint).
