§ 04 — Buyback vault

A buyback budget on day one, that nobody can withdraw.

At graduation the Protocol Credit Pool advances a fee-credit line of 10–15% of the raise into a vault that can only buy the token and burn it. Pool fees repay the line later.

Live in demoOffchain ledgerOn-chain · tests pending

§ 4.1The credit line

credit = min( total_raised × credit_bps / 10,000, credit_pool_available, max_credit_per_launch )
fees.ts computeCreditLine · math.rs compute_credit_line
Tiercredit_bpsCredit as share of raise
standard100010%
plus125012.5%
premier150015%
CREDIT_TIERS in @sealed/shared constants.ts. credit_bps outside 1,000–1,500 is rejected (InvalidCreditBps).

The cap by available liquidity means a thin Credit Pool advances less, never more than it holds. max_credit_per_launch is set once in initialize_protocol. Anyone can top up the pool with fund_credit_pool. If the credit comes out at zero, the launch skips straight to the flywheel.

§ 4.2Drips

The vault is spent in 48 equal slices by default, one every 180 s (allowed 120–300 s). The last drip sweeps whatever remains, so the vault ends at exactly zero.

drip = drips_executed ≥ drip_count − 1 ? vault_balance : min( vault_initial / drip_count, vault_balance )
fees.ts dripAmount

Each drip is a fee-free buy through the graduation pool: the quote moves from the vault into the pool's quote reserve and the tokens bought are burned straight from the pool's token reserve. The first drip is due one interval after graduation (next_drip_ts = graduated_ts + drip_interval), then every interval after the previous drip.

Example

1,000USDC

raised in the auction

150USDC

credit at premier (15%)

3.125USDC

per drip × 48

144min

until the vault is empty

§ 4.3Why it cannot be withdrawn

Onchain mode
On-chain · tests pendingThe vault is a token account at PDA ["buyback_vault", launch] whose authority is the launch PDA. The only instruction that moves funds out is execute_buyback_drip, which sends them to the pool's quote reserve. There is no admin, creator or arbitrary-destination path.
Tests that cover it
Anchor tests “exposes exactly the contract instructions — no vault withdraw path” and “buyback vault cannot be withdrawn with a forged authority” (written, not yet run in this workspace).
Bounded cranks
Drips are permissionless but gated by DripNotDue and VaultEmpty. A hostile caller can only run a drip that is already due.
Offchain mode
In developmentThe vault is a ledger account whose only allowed posting is a drip into the pool. This is a policy enforced by Sealed's backend, not by a program: in custodial mode you trust the operator to keep it. See Custody.

§ 4.4The keeper

Onchain, apps/api/src/workers/buybackKeeper.ts polls every 10 s for due drips, calls execute_buyback_drip, then distribute_fees when the indexer sees new fees. It is disabled in demo mode and without KEEPER_SECRET_KEY.

Drip schedule from shared helpers
import { CREDIT_TIERS, DEFAULT_DRIP_COUNT, computeCreditLine, dripAmount } from "@sealed/shared";

const raise = 1_000_000_000n;                                   // 1,000 USDC in atoms
const credit = computeCreditLine(raise, CREDIT_TIERS.premier, poolBalance, maxPerLaunch);
let vault = credit;
for (let i = 0; i < DEFAULT_DRIP_COUNT; i++) {
  const d = dripAmount(credit, DEFAULT_DRIP_COUNT, i, vault);   // 3.125 USDC each
  vault -= d;                                                   // final drip sweeps the remainder
}
// vault === 0n