Page cover

2️⃣Optional

Features available in "Optional" section in 20lab token generator for ERC-20 tokens.

Default exchange

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.

Note: Each blockchain has different DEXes available. After connecting your wallet, you will see the available options to choose from.

Anti-bot cooldown

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.

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:

🔓Excluded addresses

EnableTrading function

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:

🔓Excluded addresses

Max amount per wallet

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:

🔓Excluded addresses

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.

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

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:

🔓Excluded addresses

Pausable

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

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

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

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.

Last updated

Was this helpful?