Buy and Burn

The deployer can opt to use all pending fees for a deflationary buy-and-burn instead of the standard 30/10/60 distribution.

How It Works

buyAndBurn(token) takes ALL pendingFees[token], deducts 10% platform fee (unless it's the platform token), then swaps the rest into tokens sent to 0x...dEaD. This permanently removes tokens from circulation.

Execute Buy-and-Burn

// Deployer only
const hook = new ethers.Contract(HOOK_ADDRESS, HOOK_ABI, signer);

const pending = await hook.getPendingFees(tokenAddress);
console.log("Will burn with:", ethers.utils.formatEther(pending));

await (await hook.buyAndBurn(tokenAddress)).wait();
All-or-Nothing

Buy-and-burn uses ALL pending fees for the token. There is no way to partially burn. This is by design to prevent bypassing the platform fee.