0xAxiom

Token Buy & Burn Skill ๐Ÿ”ฅ

MIT

0xAxiom 16 2 Updated 3mo ago

Resources

2
GitHub

Install

npx skillscat add 0xaxiom/axiom-public/agent-skills-skills-token-burn

Install via the SkillsCat registry.

SKILL.md

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:

  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

# 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