Firstance docs

How it works

Firstance is two Anchor programs on Solana plus a couple of offchain bots that trigger them. The important part is the split of power: the programs decide what is allowed, and the bots only decide when to ask.

The two programs#

The Terminal Vault holds 50% of the supply. It sells a small, fixed share back into the market each day, slows down as the price climbs, liquidates early if the launch never gets going, and burns everything it has left once the marketcap passes $100M. Full rules in Terminal Vault.

The Marketing Vault holds 3% of the supply and a USDC pool. As the marketcap crosses six milestones, it pays out to the people promoting Firstance on X, sized by a public engagement leaderboard and verified against an onchain merkle root. Full rules in Marketing Vault.

Terminal VaultFirstJpXgzGf2oBDsEa2eAqez2fKJdAUJi6R7gP7PXbj
Marketing VaultFirstEdiieqh7C68MpvA4ZBkhvRvL7YanQP5CuJAifhM

Both programs read the marketcap the same way, from the same kind of oracle, so their triggers cannot disagree about what the price is.

The keeper model#

Neither program acts on its own. A permissionless keeper bot sends the transactions that ask a program to do its next scheduled thing: run a daily sell, finalize the burn, snapshot a leaderboard, pay out a round.

The keeper cannot change anything. Every rule is rechecked onchain when the transaction lands. If the keeper asks for something the rules do not allow, the program rejects it. The keeper runs on its own low privilege key that only pays transaction fees, so even if that key were lost or stolen, it could not move funds or rewrite a rule.

Because the trigger is permissionless, the project does not have to be the one running it. If our keeper went offline, anyone could send the same transactions and keep the vaults on schedule.

Tip

Offchain code chooses the timing. Onchain code enforces the rules. The money and the burns live entirely on the onchain side, where no key can redirect them.

Reading the marketcap#

Both programs price the token from live reserves rather than a number someone types in.

  • Before the coin graduates, they read the pump.fun bonding curve's virtual reserves.
  • After it graduates to PumpSwap, they read the canonical pool's reserves.

They convert the SOL side to dollars with a Pyth SOL/USD feed, and they reject the price if it is stale, if its confidence band is too wide, or if it is not fully verified. The quote has to be in wrapped SOL. More detail in Trust & verification.

Token standard#

Both vaults support legacy SPL Token and Token-2022, so they work with the newer pump.fun coin standard as well as the old one.

Copied