§ 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.
§ 4.1The credit line
| Tier | credit_bps | Credit as share of raise |
|---|---|---|
standard | 1000 | 10% |
plus | 1250 | 12.5% |
premier | 1500 | 15% |
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.
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 isexecute_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
DripNotDueandVaultEmpty. 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.
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