Skip to the content
PokedexDocs
Start

How it works

Two Solana programs do the work: card-vault holds cards and mints their tokens, card-launch launches coins quoted in those tokens on Meteora. This page names every piece and follows one card from deposit to redemption.

On this page

The pieces

PieceWhat it does
card-vaultHolds cards, mints and burns card tokens, tracks backing: card classes, attested deposits, FIFO redemption, poke, skip, requeue, restore
card-launchKeeps one Meteora DBC config per class, launches coins through DBC, claims and splits fees
AttestorA key that signs a statement about each card before it can be deposited. The program checks that signature
Keeperpokes every held card that is no longer owned by the vault, and migrates every complete curve
Collector CryptHolds the physical graded cards and issues them as Metaplex Core NFTs
Meteora DBCThe bonding curve every coin starts on, quoted in a card token
Meteora DAMM v2The pools: CARD/SOL for each card token, COIN/CARD for each graduated coin
Metaplex CoreThe NFT standard of the cards; the vault moves them with Core transfers

One card, start to finish

  1. Deposit

    A card holder asks the attestor to sign a statement about the card. The deposit transaction puts that signature in an Ed25519 instruction right before card-vault's deposit, which checks it, moves the card into the vault and mints 1,000 card tokens to the depositor. See Deposit and redeem.

  2. Trade the card token

    The class's CARD/SOL pool on Meteora DAMM v2 prices the card token in SOL. Anyone holding card tokens can sell part of a card there, or keep them.

  3. Launch a coin

    Anyone can call launch_coin on a class whose market is enabled and whose backing is intact. It creates a Token-2022 coin with a supply of 1,000,000,000 on a Meteora bonding curve quoted in the card token. See Coins.

  4. Buy and sell

    Buyers pay card tokens into the curve, or pay SOL and route through the CARD/SOL pool in the same transaction. Every curve trade pays a fee in the card token. See Buy with SOL and Fees.

  5. Graduate

    When the curve has raised its threshold, the keeper calls Meteora's permissionless migration. The coin moves into a COIN/CARD DAMM v2 pool whose liquidity is locked forever. See Graduation.

  6. Redeem

    Anyone holding 1,000 card tokens can burn them and receive the oldest copy still held in the class. The card leaves the vault as a Core NFT in the redeemer's wallet.

What keeps it honest

  • The backing invariant. The supply of a card token is never more than the cards held times 1,000. See Backing and poke.
  • Permissionless checks. poke, skip, requeue and restore can be sent by anyone, and they only change bookkeeping after checking chain state.
  • Gated launches. launch_coin refuses a class that is flagged as undercollateralized.
  • Proof of reserves. Every held copy can be checked against the chain and Collector Crypt's record. See Verify the reserves.
Solana mainnet

Written from the protocol, security and card documents of the pokedex repository and from its code (card-vault, card-launch, cp-ix). Every figure on these pages comes from there.

UpDown to moveEnter to open