Clanker Fee Burn Skill
Purpose: Automated end-to-end Clanker fee claim → rebalance → burn → treasury pipeline.
What It Does
Executes a complete burn cycle for Clanker tokens in one command:
- Claims fees — WETH + token from Clanker fee contract
- Gets prices — WETH from CoinGecko, token from DexScreener
- Rebalances — Swaps only the value difference to reach 50/50 WETH/token split
- Burns tokens — Sends ALL token balance to 0xdead
- Treasury split — Swaps remaining WETH 50/50 into USDC + BNKR, sends to treasury
- Reports — JSON output with full pipeline results
Usage
Basic Command
node burn.mjs \
--token 0xf3ce5ddaab6c133f9875a4a46c55cf0b58111b07 \
--treasury 0x19fe674a83e98c44ad4c2172e006c542b8e8fe08
With Custom Pool Parameters
node burn.mjs \
--token 0xf3ce5ddaab6c133f9875a4a46c55cf0b58111b07 \
--treasury 0x19fe674a83e98c44ad4c2172e006c542b8e8fe08 \
--hooks 0xCustomHooksAddress \
--fee 0x800000 \
--tick-spacing 200
Dry Run (Simulate)
node burn.mjs \
--token 0xf3ce5ddaab6c133f9875a4a46c55cf0b58111b07 \
--treasury 0x19fe674a83e98c44ad4c2172e006c542b8e8fe08 \
--dry-run
CLI Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--token | ✅ | — | Token address (Clanker token) |
--treasury | ✅ | — | Treasury address for USDC+BNKR |
--currency0 | ❌ | 0x4200...0006 (WETH) | V4 pool currency0 |
--fee | ❌ | 0x800000 | V4 pool fee (dynamic) |
--tick-spacing | ❌ | 200 | V4 pool tick spacing |
--hooks | ❌ | 0xb429d62f... | V4 pool hooks address |
--dry-run | ❌ | false | Simulate without sending TXs |
Environment Variables
NET_PRIVATE_KEY=0x... # Wallet private key
BASE_RPC_URL=https://... # Base RPC endpoint (optional)
Output
Prints a JSON report with:
{
"fees_claimed": {
"weth": "0.05",
"token": "1000000",
"weth_usd": "125.50",
"token_usd": "50.25"
},
"rebalance": {
"swapped_amount": "0.015",
"direction": "WETH→TOKEN",
"tx_hash": "0x..."
},
"burned": {
"amount": "1050000",
"tx_hash": "0x..."
},
"treasury": {
"usdc_amount": "62.75",
"usdc_tx": "0x...",
"bnkr_amount": "1250.50",
"bnkr_tx": "0x..."
},
"total_burned_to_date": "5000000000",
"burn_percentage": "5.0000%"
}
Error Handling
- Stops immediately if any step fails
- Prints what succeeded and what failed
- Never continues to burn if rebalance failed
- Never continues to treasury if burn failed
- Use
--dry-runto test before live execution
Critical Rules
⚠️ DO NOT:
- Convert fee tokens to WETH/USDC first — keep them and top up
- Convert everything to USDC as intermediate
- Swap more than the value difference
✅ DO:
- Only swap the small gap to reach 50/50 value
- Burn creates buy pressure (small swap) + removes supply
- Always test with
--dry-runfirst
When to Use
Regular burn cycles:
# Every week/month, claim fees and execute burn
node burn.mjs --token 0x... --treasury 0x...
Pre-flight check:
# Always dry-run first to verify amounts
node burn.mjs --token 0x... --treasury 0x... --dry-run
Agent Instructions
When asked to "burn Clanker fees" or "run burn cycle":
- Verify environment — Check
NET_PRIVATE_KEYis set - Dry run first — Always simulate before live execution
- Review output — Check amounts make sense
- Execute live — Remove
--dry-runflag - Report results — Share JSON output with human
Example Agent Flow
# Step 1: Dry run
cd /Users/melted/Github/axiom-public/agent-skills/skills/clanker-burn
node burn.mjs --token 0xf3ce... --treasury 0x19fe... --dry-run
# Step 2: Review output, confirm with human
# Step 3: Execute live
node burn.mjs --token 0xf3ce... --treasury 0x19fe...
# Step 4: Share report JSON
Dependencies
viem— Ethereum interactionsyargs— CLI parsing@ethersproject/abi— ABI encoding for V4 swaps
Install:
npm install viem yargs @ethersproject/abi
Contracts Used
| Contract | Address | Purpose |
|---|---|---|
| Clanker Fee | 0xf36227... | Fee storage/claiming |
| WETH | 0x420000...0006 | Base WETH |
| USDC | 0x833589... | Treasury asset |
| BNKR | 0xf3ce5d... | Treasury asset |
| SwapRouter02 | 0x262666... | V3 swaps (WETH→USDC/BNKR) |
| Universal Router | 0x6ff569... | V4 swaps (rebalance) |
| Permit2 | 0x000000...78BA3 | Approvals for V4 |
Troubleshooting
"No fees to claim"
- No fees available yet — wait for more volume
"V4 swap reverted"
- Check pool parameters (currency0, hooks, fee, tick-spacing)
- Verify pool has liquidity
"Insufficient balance"
- Fees were lower than expected — check claimed amounts
Approvals failing
- RPC issue — wait and retry
- Gas too low — increase gas limit
Safety
- Uses
--dry-runfor safe testing - Only burns tokens AFTER successful rebalance
- Only sends to treasury AFTER successful burn
- All steps logged with transaction hashes
- No destructive actions without confirmation in dry-run mode