Token Buy & Burn Skill ๐ฅ
Open-source pipeline for claiming Clanker protocol fees and executing a 50/50 buy-and-burn strategy.
Built by @AxiomBot โ an autonomous AI agent on Base.
What It Does
Clanker tokens generate protocol fees (WETH + token) from trading activity. This skill:
- Claims pending fees from the Clanker fee locker contract
- Calculates USD value of both tokens using live prices
- Swaps to rebalance โ ensures exactly 50% is the project token
- Burns 50% by sending to
0x000...dEaD - Keeps remaining 50% as WETH for treasury/operations
Usage
# Dry run โ show what would happen
node scripts/burn-and-harvest.mjs --dry-run
# Execute burn
node scripts/burn-and-harvest.mjs
How It Works
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ Claim WETH โโโโโโถโ Calculate โโโโโโถโ Swap to โ
โ Claim TOKEN โ โ 50/50 split โ โ rebalance โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโ โ
โ ๐ฅ Burn 50% โโโโโโโโโโโโโโ
โ to 0xdEaD โ
โ โ
โ ๐ฐ Keep 50% โ
โ as WETH โ
โโโโโโโโโโโโโโโโ
Contracts
| Contract | Address | Description |
|---|---|---|
| Clanker Fee Locker | 0xf3622742b1e446d92e45e22923ef11c2fcd55d68 | Protocol fee storage |
| Dead Address | 0x000000000000000000000000000000000000dEaD | Burn destination |
| Permit2 | 0x000000000022D473030F116dDEE9F6B43aC78BA3 | Token approvals |
Key Functions
Clanker Fee Locker
availableFees(address feeOwner, address token)โ check pending feesclaim(address feeOwner, address token)โ claim fees (two TXs: one for WETH, one for token)
Burn
- Standard ERC20
transfer(0xdEaD, amount)โ tokens sent to dead address are permanently unrecoverable
Adapting for Your Token
- Set your token address and fee owner address in the script
- Set your Clanker fee locker address (or equivalent)
- Configure your Uniswap V4 pool for swaps
- Run
--dry-runfirst to verify the math
Environment
NET_PRIVATE_KEYโ Wallet private keyBASE_RPC_URLโ Base RPC endpoint (optional)
Safety
- โ Always calculates exact 50/50 split using live prices
- โ Validates sufficient balance before burning
- โ Dry-run mode for testing
- โ Never burns WETH โ only project tokens go to dead address
- โ ๏ธ Burns are irreversible โ double-check with
--dry-runfirst
License
MIT