# Optional

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2F2WADW8jH5UAgn2MyhHf4%2Fimage.png?alt=media&#x26;token=6cab386b-9fcf-4240-9124-80a762562eb8" alt=""><figcaption></figcaption></figure>

### Default exchange

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2F9sVhiBdh6eebWGRXCwvZ%2Fimage.png?alt=media&#x26;token=3b1c1f8a-6fb8-47b7-8abe-734656987d7e" alt=""><figcaption></figcaption></figure>

Default exchange allows you to choose which DEX (decentralized exchange) your token smart contract will be connected to.

While it doesn't add important functionality by itself, it unlocks many more features in the token generator. All features that require DEX connectivity need this connection to work properly. For example, the Anti-bot cooldown feature requires a DEX connection to track the buys and sells of each address and apply cooldowns accordingly.

{% hint style="info" %}
**Note:** Each blockchain has different DEXes available. After connecting your wallet, you will see the available options to choose from.
{% endhint %}

### Anti-bot cooldown

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2FuXl40cTz6fkDaKNwSWwt%2Fimage.png?alt=media&#x26;token=135c4e15-449b-4ada-a8d2-35c5e327da2c" alt=""><figcaption></figcaption></figure>

Anti-bot cooldown is an easy way to prevent bots from buying and selling immediately to make quick profits. By setting a cooldown time, you specify how long an address should be frozen after making a buy or sell transaction.

**Example:** If someone buys tokens on your default exchange and your cooldown time is 2 minutes, they will not be able to send or receive tokens until that cooldown period has passed.

{% hint style="warning" %}
**Important:** Some automated testing websites may incorrectly identify your token as a honeypot if they do not detect the Anti-bot cooldown feature properly.
{% endhint %}

#### Adding Other Exchanges

If you want to add liquidity to other exchanges (not your default exchange), this is possible. You can add other pair smart contracts so they can be recognized by your token smart contract. This can be done after deployment in the token owner dashboard using the setAMM() function.

Check the addresses that are **excluded from "Anti-bot cooldown"** by default:

{% content-ref url="excluded-addresses" %}
[excluded-addresses](https://docs.20lab.app/features/excluded-addresses)
{% endcontent-ref %}

### EnableTrading function

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2FnXp2srY0FDAwIrouCi8r%2Fimage.png?alt=media&#x26;token=1786515e-2a00-4bd3-aebd-b2fdf4fdf38f" alt=""><figcaption></figcaption></figure>

This feature adds an enableTrading() function to your token's code. It will restrict any interaction with the DEX until the owner enables trading permanently. No one other than excluded addresses can buy, sell, or add liquidity until trading is enabled.

This is useful for preventing trading before you're ready to launch, such as during initial liquidity setup.

Check the addresses that are **excluded from "EnableTrading function"** by default:

{% content-ref url="excluded-addresses" %}
[excluded-addresses](https://docs.20lab.app/features/excluded-addresses)
{% endcontent-ref %}

### Max amount per wallet

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2FD9R739bIXKUXsr5fpwHq%2Fimage.png?alt=media&#x26;token=0f73f63e-6ba6-494c-b02d-eb1985ed9d74" alt=""><figcaption></figcaption></figure>

This feature restricts the maximum amount of tokens each address can hold by preventing them from buying more tokens or receiving them from others once they reach the limit.

This helps prevent whale accumulation and promotes more distributed token ownership.

Check the addresses that are **excluded from "Max amount per wallet"** by default:

{% content-ref url="excluded-addresses" %}
[excluded-addresses](https://docs.20lab.app/features/excluded-addresses)
{% endcontent-ref %}

### Max transaction limits

Max transaction limits block transactions from users who exceed the specified limit, causing their transactions to revert with an error.

#### Default Exchange: Disabled

When default exchange is turned off, this feature allows you to specify a limit that affects all types of transactions made with the token. Some addresses are excluded from this limit by default.

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2FcTKJ2uVIrru7Qs3Ws3hI%2Fimage.png?alt=media&#x26;token=409f5e33-36c8-491f-baaa-feaf5be1785b" alt=""><figcaption></figcaption></figure>

#### Default Exchange: Enabled

When default exchange is enabled, Max transaction limits provide more configuration options. Because your token smart contract can now connect with a DEX, you can specify exact limits for each transaction type:

* **Buys**: Buying tokens on the selected default exchange
* **Sells**: Selling tokens on the selected default exchange
* **Transfers**: All other token transactions

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2F2Z5dAgKUfePRIiZ0GTOF%2Fimage.png?alt=media&#x26;token=3c21b830-ecf1-467c-887e-2867b8c2bba1" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Important:** You cannot add new limit types after deployment. For example, if you create a token with only max buy limits, you cannot add max sell and max transfer limits later.
{% endhint %}

#### Adding Other Exchanges

If you want to add liquidity to other exchanges, you can add other pair smart contracts using the setAMM() function in your token owner dashboard after deployment.

Check the addresses that are **excluded from "Max transaction limits"** by default:

{% content-ref url="excluded-addresses" %}
[excluded-addresses](https://docs.20lab.app/features/excluded-addresses)
{% endcontent-ref %}

### Pausable

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2FyRpR161VXZDapbuwcg5W%2Fimage.png?alt=media&#x26;token=776880a5-d211-4b5b-b6c7-66486d41d1b5" alt=""><figcaption></figcaption></figure>

The Pausable feature includes 2 owner-restricted functions: pause() and unpause(). Enabling this feature allows the owner to freeze all balances and pause all transactions (including the owner's own transactions). During a pause, NO ONE can move tokens from their address or receive them.

This is useful for emergency situations or when you need to temporarily halt all token activity.

### Blacklist

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2FqhwNJZoYegSzwac6Mfm3%2Fimage.png?alt=media&#x26;token=34d91c5c-dbdc-4edf-a5a9-a17aa3ccd33f" alt=""><figcaption></figcaption></figure>

The Blacklist feature adds an owner-restricted blacklist() function, which allows the owner to freeze specific addresses. Blacklisted addresses cannot send or receive tokens until they are removed from the blacklist (unblacklisted).

This feature is useful for preventing malicious actors from interacting with your token.

### Token recovery

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2F9b4nm0Kiy8jqfXPUqgDt%2Fimage.png?alt=media&#x26;token=588a4ba3-94b4-4ed4-a3b7-6b50e02088ef" alt=""><figcaption></figcaption></figure>

Token recovery adds owner-restricted functions: recoverForeignERC20() and recoverToken(). Using these functions, the owner can retrieve stuck tokens from the token smart contract balance.

We recommend always keeping this feature enabled in your token in case someone accidentally sends tokens to your contract address.

### Permit

<figure><img src="https://2227986809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiXsnL20jyBNNxpiEbHVU%2Fuploads%2FfTsSxVwI24uxBYUUh6n8%2Fimage.png?alt=media&#x26;token=98466b93-7959-4789-9138-5c6fa876ac1e" alt=""><figcaption></figcaption></figure>

The Permit function (ERC-2612) adds an option for gasless approvals, allowing token holders to approve their tokens by simply signing a message from their wallet. This message can later be executed in the Permit function to approve the tokens by any address or smart contract.

This improves user experience by eliminating the need for a separate approval transaction that costs gas.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.20lab.app/features/optional.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
