Rule Craft

On-chain module

Buy Burn

A fixed share of the tokens each buyer receives is sent to the dead address inside the swap. Supply only goes down, and the receipt shows exactly how much.

Compose with Buy Burn On-chain module · in RuleCraftHook (unaudited)

Callbacks

2

Swap gas

~130k

estimate

Touches

buy

Pools

--

see Pools page

How it behaves

  1. 1afterSwap sees the exact token amount the buy produces.
  2. 2With afterSwapReturnDelta it takes the burn share and sends it to 0x…dEaD in the same transaction.
  3. 3Sells are untouched.

Parameters

ParameterMinDefaultMaxWhat it does
Burn share0.1 %1 %5 %Share of each buy's token output that is burned.

Bounds are enforced on chain by the registry, the launcher and the hook. Values are frozen when the pool is created.

Permission bits

13BI
12AI
11BA
10AA
9BR
8AR
7BS
6AS
5BD
4AD
3BSΔ
2ASΔ
1AAΔ
0ARΔ

AS afterSwap · ASΔ afterSwapReturnDelta

mask 0x0044bits 000000010001002/14 on can change amounts
  • afterSwapSwapRuns after every swap with the final amounts. Reacts to trades: burns, pots, reward accounting.
  • afterSwapReturnDeltaDeltaLets afterSwap take a cut of the output. The hook can change what you receive. Taxes and burns live here.