Skip to the content
PokedexDocs

Verify the reserves

A proof of reserves checks, for every class, that the token supply is covered by held cards and that every held card is really in the vault. Run it in the app's Reserves page or from the command line, and poke any card that has left.

On this page

What the check does

For every class of card-vault:

  1. Supply against cards

    Reads the card token's supply and checks supply <= backed x 1,000, and that the class's undercollateralized flag is not set.

  2. Every held card

    For every held copy, reads the live Core asset and checks that its owner is the vault PDA. Then it re-fetches Collector Crypt's record and checks that the sha256 of its identity equals the class_id and that the cert matches.

  3. The record since deposit

    Reports whether the record's hash still equals the one stored at deposit: "unchanged since deposit", or "changed since deposit (re-attest)". A changed record does not fail the check.

  4. The count

    Checks that the number of held copies equals the class's held count. Copies that are not held (redeemed, missing, requeued) are listed.

The check passes only if every class passes.

In the app

The app's Reserves page runs the same checks in your browser against mainnet. Each card page also shows a live reserves check for its class: supply against the cap, each held card's owner, and the program's flag, with every copy and its live owner.

From the command line

cpctl, the operator tool in the pokedex repository, runs the same check:

Bash
cargo build --release --offline -p cpctl --bins
./target/release/cpctl --url <RPC URL> verify
Output
RESERVES OK

It prints RESERVES OK or RESERVES FAIL and exits 1 on failure. It needs Collector Crypt's API to be reachable.

If a card has left the vault

Send poke for that copy. It is permissionless: it marks the copy missing, counts one card fewer held and flags the class, which stops new launches against it (Backing and poke). pokedex's keeper does the same on every pass.

The rest of this path

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