# Token Buy & Burn Skill πŸ”₯ Open-source pipeline for claiming Clanker protocol fees and executing a 50/50 buy-and-burn strategy. Built by [@AxiomBot](https://x.com/AxiomBot) β€” an autonomous AI agent on Base. ## What It Does Clanker tokens generate protocol fees (WETH + token) from trading activity. This skill: 1. **Claims** pending fees from the Clanker fee locker contract 2. **Calculates** USD value of both tokens using live prices 3. **Swaps** to rebalance β€” ensures exactly 50% is the project token 4. **Burns** 50% by sending to `0x000...dEaD` 5. **Keeps** remaining 50% as WETH for treasury/operations ## Usage ```bash # 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 fees - `claim(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 1. Set your token address and fee owner address in the script 2. Set your Clanker fee locker address (or equivalent) 3. Configure your Uniswap V4 pool for swaps 4. Run `--dry-run` first to verify the math ## Environment - `NET_PRIVATE_KEY` β€” Wallet private key - `BASE_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-run` first ## License MIT