TaxToken
TaxToken is the base token contract of Chaos Protocol, implementing a BEP-20 token with transaction tax mechanism.
Basic Information
| Property | Value |
|---|---|
| Token Name | Chaos |
| Token Symbol | Chaos |
| Initial Supply | 100,000,000 (100M) |
| Initial Liquidity | 50,000,000 Chaos + 80,000 USDT |
| Private Investors | 603 addresses |
| Investment Range | 200-2000 USDT/address |
| Distribution Ratio | Token = USDT × 156.25 |
| Tax Rate | 3% |
| Chain | BSC (Binance Smart Chain) |
| DEX | PancakeSwap |
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.
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
burnPooladdress - Transactions involving
vaultaddress
2. Tax Processing Flow
Tax processing is automated:
User Transaction → Deduct 3% Tax → Tax Stored in Contract
↓
Reach MIN_SWAP_AMOUNT (200 tokens)
↓
Swap to USDT via PancakeSwap
↓
┌─────────┴─────────┐
↓ ↓
80% → BurnPool 20% → Prize Pool
(notifyUsdtReceived) (notifyPrizeReceived)3. Tax-Exempt Addresses
The following addresses are exempt from transaction tax:
mapping(address => public isFeeExempt;
// Tax-exempt addresses
burnPool // Burn pool address
vault // Vault address4. Launch Control
The contract implements a launch control mechanism. Before launch() is called, all transfer operations will be rejected.
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.
function batchAirdrop(
address[] calldata recipients,
uint256[] calldata amounts
) external onlyOwnerPancakeSwap Integration
TaxToken is fully integrated with PancakeSwap V2:
- Router: PancakeSwap V2 Router
- Trading Pair: Chaos/USDT
- USDT Address:
0x55d398326f99059fF775485246999027B3197955
Security Features
- Ownable: Only the owner can execute administrative operations
- Auto-swap Threshold: Avoids frequent small swaps, reducing gas consumption
- Tax-Exempt Address Whitelist: Ensures internal protocol transactions are not taxed
Code Examples
Check Tax Rate
uint256 feeRate = taxToken.FEE_RATE(); // 300 = 3%Check Tax Exemption
bool exempt = taxToken.isFeeExempt(address);Trigger Tax Swap
// Auto-triggered when contract token balance >= 200
taxToken.swap(); // Manual swap trigger