Page cover

3️⃣Taxes

Features available in "Taxes" 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.

Liquidity tax

Liquidity tax allows you to take transaction fees and automatically add them to the main liquidity pool on your default exchange.

How It Works

Liquidity tax works like wallet tax, but the recipient is always the liquidity pool on your default exchange that was automatically created during token deployment. The pair receiving liquidity is always (Your token)/(Native coin). For example, on BNB Smart Chain, it will be (Your token)/BNB.

LP tokens minted by the DEX as a result of adding liquidity are permanently burned, making this part of the liquidity irremovable forever.

Transaction Types

Because your token will be connected to your default exchange, you can specify different rates for:

  • Buys: Buying tokens on the selected default exchange

  • Sells: Selling tokens on the selected default exchange

  • Transfers: All other transactions

Swap Threshold Required

Liquidity tax requires a swap threshold to work. It needs to swap collected tokens to native coins (e.g., BNB) before adding both your token and the obtained native coins to the liquidity pool. Check more information about swap threshold here:

🔶Swap threshold ratio

Check the addresses that are excluded from fees by default:

🔓Excluded addresses

Dividend tax

Dividend tax allows you to take transaction fees and distribute them back to token holders based on their holdings. Dividends are distributed proportionally - a holder with twice as many tokens will receive twice as many dividends.

Dividend tax provides lots of configuration, allowing you to personalize it for your needs.

Dividend Currency

In the "Dividends sent in" field, you need to choose which currency holders will receive as dividends - either native coin or a custom token.

Callback Gas Limit (Native Coin Only)

If you choose native coin, you can also adjust the default callback gas limit used for auto-claiming dividends.

Increasing the callback gas limit is rarely necessary unless you want to support auto-claiming by smart contracts that need more gas to receive dividends. This might be needed if many holders use on-chain multi-signature wallets like GnosisSafe. In such cases, increasing it to around 7,000 might help, but this means fewer holders will receive dividends in each distribution cycle.

Note: If smart contracts still can't receive auto-dividends, they can manually claim them at any time.

Transaction Types

You can specify different dividend tax rates for:

  • Buys: Buying tokens on the selected default exchange

  • Sells: Selling tokens on the selected default exchange

  • Transfers: All other transactions

Dividend Eligibility

The "Dividend eligibility amount" determines how many tokens each holder must have to qualify for dividends. Holders with less than this amount will never receive dividends.

Auto-Distribution Settings

Two settings control automatic dividend distribution:

  1. Auto-claim interval: How often dividends are automatically distributed

  2. Gas for auto-claims: Amount of gas used for automatic distribution

Since every blockchain transaction costs gas, the token smart contract uses a "lazy" distribution method. It takes additional gas from each transaction to distribute as many pending dividends as possible.

  • Higher interval: Dividends sent less frequently, but holders save gas

  • Lower interval: Dividends sent more frequently, but at higher gas cost

Note: Holders can always claim pending dividends immediately using the claim() function.

Swap Threshold Required

Dividend tax requires a swap threshold to work. It swaps accumulated tokens to the chosen dividend currency before sending them to the dividend tracker contract for distribution. Check more information about swap threshold here:

🔶Swap threshold ratio

Check the addresses that are excluded from fees & receiving dividends by default:

🔓Excluded addresses

Wallet taxes

Wallet tax allows you to take transaction fees and send the collected tokens to a specified address.

Default Exchange: Disabled

When default exchange is disabled, wallet tax applies to every transaction type. For example, if someone buys 100 tokens and your wallet tax is 2%, the user receives 98 tokens and the remaining 2 tokens are immediately transferred to the wallet tax recipient.

Default Exchange: Enabled

When default exchange is enabled, wallet tax provides additional configuration options for tax charging and the currency in which fees are sent to the recipient.

You can specify different rates for:

  • Buys: Buying tokens on the selected default exchange

  • Sells: Selling tokens on the selected default exchange

  • Transfers: All other transactions

Currency Conversion

If the wallet tax is sent in a currency other than your token, your smart contract will perform an internal swap. It converts the collected tokens into the desired currency before sending them to the tax recipient's address. When wallet tax is sent in a different currency, the swap threshold controls how often these swaps occur. Check more information about swap threshold here:

🔶Swap threshold ratio

Check the addresses that are excluded from fees by default:

🔓Excluded addresses

Auto-burn tax

Auto-burn tax allows you to take transaction fees and burn them permanently using the _burn() function, reducing the total token supply.

Default Exchange: Disabled

When default exchange is disabled, auto-burn tax applies to every transaction. For example, if someone buys 100 tokens and your auto-burn tax is 2%, the user receives 98 tokens and the remaining 2 tokens are immediately burned.

Default Exchange: Enabled

When default exchange is enabled, auto-burn tax provides additional configuration options for different transaction types:

  • Buys: Buying tokens on the selected default exchange

  • Sells: Selling tokens on the selected default exchange

  • Transfers: All other transactions

Immediate Burning

Regardless of your default exchange setting, auto-burn is always immediate - it happens in the same transaction as the original transfer.

Check the addresses that are excluded from fees by default:

🔓Excluded addresses

Last updated

Was this helpful?