Skip to content

TaxToken ​

TaxToken is the base token contract of Chaos Protocol, implementing a BEP-20 token with transaction tax mechanism.

Basic Information ​

PropertyValue
Token NameChaos
Token SymbolChaos
Initial Supply100,000,000 (100M)
Initial Liquidity50,000,000 Chaos + 80,000 USDT
Private Investors603 addresses
Investment Range200-2000 USDT/address
Distribution RatioToken = USDT × 156.25
Tax Rate3%
ChainBSC (Binance Smart Chain)
DEXPancakeSwap

Initial Distribution ​

Token distribution plan:

  • 50% (50,000,000 Chaos) for initial liquidity
  • 50% distributed proportionally to 603 private investors

See Tokenomics - Private Investor Distribution for details.

Core Features ​

1. Transaction Tax Mechanism ​

TaxToken implements an automatic transaction tax mechanism, only charging tax on transfers involving PancakeSwap trading pairs.

solidity
uint256 public constant FEE_RATE = 300; // 3%

Trigger Conditions:

  • Buy (buying tokens from the trading pair)
  • Sell (selling tokens to the trading pair)

Tax-Exempt Scenarios:

  • Regular wallet-to-wallet transfers
  • Minting
  • Burning
  • Transactions involving burnPool address
  • Transactions involving vault address

2. Tax Processing Flow ​

Tax processing is automated:

StepDescription
User TransactionDeduct 3% tax
Tax Stored in ContractTokens accumulate
Reach Threshold>= MIN_SWAP_AMOUNT (200 tokens)
Auto SwapSwap to USDT via PancakeSwap
80% → BurnPoolDividend Pool (notifyUsdtReceived)
20% → Prize PoolBoost acceleration rewards (notifyPrizeReceived)

3. Tax-Exempt Addresses ​

The following addresses are exempt from transaction tax:

solidity
mapping(address => public isFeeExempt;

// Tax-exempt addresses
burnPool  // Burn pool address
vault     // Vault address

4. Launch Control ​

The contract implements a launch control mechanism. Before launch() is called, all transfer operations will be rejected.

solidity
function launch() external onlyOwner {
    _launched = true;
}

function _transfer(...) internal override {
    if (!_launched) revert NotLaunched();
    // ...
}

Purpose: Ensure tokens cannot be traded before the project officially launches.

5. Batch Airdrop ​

The owner can use the batchAirdrop feature to distribute tokens to multiple addresses in bulk.

solidity
function batchAirdrop(
    address[] calldata recipients,
    uint256[] calldata amounts
) external onlyOwner

PancakeSwap Integration ​

TaxToken is fully integrated with PancakeSwap V2:

  • Router: PancakeSwap V2 Router
  • Trading Pair: Chaos/USDT
  • USDT Address: 0x55d398326f99059fF775485246999027B3197955

Security Features ​

  1. Ownable: Only the owner can execute administrative operations
  2. Auto-swap Threshold: Avoids frequent small swaps, reducing gas consumption
  3. Tax-Exempt Address Whitelist: Ensures internal protocol transactions are not taxed

Code Examples ​

Check Tax Rate ​

solidity
uint256 feeRate = taxToken.FEE_RATE(); // 300 = 3%

Check Tax Exemption ​

solidity
bool exempt = taxToken.isFeeExempt(address);

Trigger Tax Swap ​

solidity
// Auto-triggered when contract token balance >= 200
taxToken.swap(); // Manual swap trigger

Chaos Protocol Documentation