> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veto.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify a jackpot

> Re-run any draw and check the winner yourself.

Every jackpot is drawn with a public random seed and a hash of the holder snapshot. Here's how to check one.

## 1. Get the draw details

Fetch the coin's events and find the jackpot:

```bash theme={null}
curl "https://api.veto.fun/api/tokens/<mint>/events?kind=jackpot"
```

Each jackpot event has a `meta` object:

| Field | Meaning |
| - | - |
| `seed` | The random seed used for the draw, as hex. |
| `blockhash` | The Solana blockhash the seed was made from. |
| `slot` | The slot the blockhash was fetched at. |
| `snapshotHash` | SHA-256 of the holder snapshot. |
| `odds` | `weighted` or `equal`. |
| `winnerBalance` | The winner's balance in base units (6 decimals). |

## 2. Check the seed

The seed is:

```text theme={null}
sha256("<blockhash>:<mint>:<n>")
```

where `n` is the number of jackpots this coin had paid before this one, starting at 0.

## 3. Rebuild the snapshot

Using an archival RPC or indexer, list every token account for the coin as of the draw's `slot` and total balances by owner. Then remove:

* owners that are not on the ed25519 curve (program-owned accounts),
* the bonding curve, the PumpSwap pool and pool authority for the coin,
* the coin's fee vault and any excluded wallets from its settings.

Sort by balance, largest first, breaking ties by address in plain character order. Join the lines as `<owner>:<amount>`, with amounts in base units, separated by `\n`. The SHA-256 of that text must equal `snapshotHash`.

## 4. Re-run the draw

Rebuild the previous cycle's snapshot the same way, as of `previousSnapshotAt` in the payout's metadata. Count each holder at the lower of its two balances (a wallet missing from the previous snapshot counts as 0), keep those with at least the coin's minimum holding, and sort again: largest first, ties by address. If the payout's `diamondHands` is true, multiply each holder's weight by its hold multiplier ([Diamond hands](https://docs.veto.fun/features/diamond-hands.md)). If `entrants` is `buyers`, the entrants are instead every wallet that bought since `buysSince` and held the minimum at the draw, weighted by total buy amount, largest first. Then:

```js theme={null}
// multiplier is 10000n (1×), or the holder's diamond hands multiplier in basis points.
// For "every buy is a ticket" draws, use each buyer's total buy amount in place of h.amount * h.multiplier / 10000n.
const weights = holders.map((h) => (odds === "weighted" ? (h.amount * h.multiplier) / 10000n : h.multiplier));
const total = weights.reduce((a, b) => a + b, 0n);
let roll = BigInt(`0x${seed}`) % total;
for (const [i, w] of weights.entries()) {
  if (roll < w) return holders[i];
  roll -= w;
}
```

The holder it returns is the winner, and the payout transaction linked from the event sends the pot to that wallet.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.