Program

One Anchor program, backburn. Its accounts, its instructions and its address.

Address

Accounts

AccountSeedsHolds
Config["config"]Admin, protocol share, minimum lot, half-life, the protocol mint.
Vault["vault", mint]The mint, the live auction (lot, start slot, start rate), the last clearing rate, totals.
Protocol holding["protocol"]The protocol share of lots burned before the BACKBURN mint is set.

Instructions

InstructionWho calls itWhat it does
open_vaultAnyoneCreates the mint’s vault. The caller pays its rent.
start_auctionAnyoneFixes the lot at the vault’s balance once it holds the minimum lot and no auction is live.
burnAnyoneBurns the ask from the caller’s token account, pays the lot, moves the protocol share to the BACKBURN vault, records the clearing rate.
route_protocolAnyoneMoves the holding account’s balance into the BACKBURN vault.
set_configAdminSets the protocol share, minimum lot and half-life.
init_configAdminCreates Config once.

burn burns through the mint’s own token program, so vaults work for SPL Token and Token-2022 mints alike. Every instruction emits its event by emit_cpi!.

What the program guarantees

A vault pays out in one instruction only: the one that burns its own mint. The amount burned is at least lot × rate(slot). A vault’s spendable balance is its lamports above rent, read from the rent sysvar, so its rent can never be paid out.

No instruction other than burn and route_protocol moves lamports out of any program account.

Configuration

FieldNow
Minimum lot
Half-life
Protocol shareA share of each lot, moved to the BACKBURN vault in the burn itself