What it is
The Leading Zeros is a Solana launchpad. Every coin launched through it comes with a set of mining rig NFTs. Rigs cannot be bought from the program: the only way to mint one is to find a hash with enough leading zero bits, and the program checks that hash on chain before it mints. The extra zero bits above the floor set the rig's tier. Rigs earn 80% of the coin's trading fees, by tier weight, paid to whoever holds them.
One line: you can't buy a legendary rig. You have to hash it.
Mining
A set runs in 30-second windows. Each window has a challenge made from the coin's mint, the window number and the newest slot hash at the moment the window opened, so no work can be done ahead of time.
challenge = keccak256(mint ‖ window as u64 LE ‖ slot_hash)
hash = keccak256(challenge ‖ your wallet ‖ nonce as u64 LE)
valid = leading_zero_bits(hash) ≥ floor_bits
Your wallet is inside the hash, so a found hash can only ever mint to you, even if someone else sends the transaction. Nonces must go up within a window per wallet, so a hash cannot be replayed. Each valid hash is one transaction (submit_rig) and one rig.
The floor
The floor starts at 24 bits (about 16.8 million hashes per rig) and moves by whole bits after every window so that about 10 rigs land per window, up to a cap of 30: an empty window makes it 2 bits easier, a capped window 2 bits harder, within 16 to 60 bits. Windows close lazily, with a 3-second grace for a hash that lands just after the clock.
When a set ends
A set closes when it is full (250, 500 or 1,000 rigs, the launcher's pick) or 6 hours after launch with whatever was mined. It never reopens.
Tiers
The tier is the number of zero bits above the floor when the rig was mined. The odds are the same for every valid hash, whatever the floor and whoever mines it. More hashrate means more rigs, never better odds per rig.
| tier | extra bits | odds per rig | weight |
|---|---|---|---|
| common | 0 to 1 | 75% | 1 |
| rare | 2 to 3 | 18.75% | 3 |
| epic | 4 to 5 | 4.69% | 9 |
| legendary | 6 to 9 | 1.46% | 27 |
| mythic | 10 or more | 0.098% (1 in 1,024) | 81 |
The rig
A rig is a Metaplex Core asset in the coin's collection, with the proof stored in its attributes: hash, bits, floor, tier, weight, window, nonce and challenge. The metadata is immutable. The program also keeps a Rig account per asset with the same fields plus what the rig has been paid. Rigs transfer like any Core NFT; the next owner earns from the next payout on.
Minting costs the miner about 0.006 SOL: the asset's rent, Metaplex's 0.0015 SOL create fee and the Rig account. The first rig of a wallet also creates a small miner account whose rent comes back after the set closes.
The pool
Right after launch, open mints the whole supply (1,000,000,000) into a single-sided Meteora DAMM v2 pool at the opening price, locks the position permanently, and drops the mint authority. There is no dev allocation and no second mint. The pool starts with zero SOL, so the price can never fall below the opening price: sellers only ever sell into real buys. Pool fee: 25% at open, 3% less every 30 seconds, 1% from minute 4 on. Meteora keeps 20% of every fee.
Fees
Anyone can call collect. It claims the locked position's fees into the coin's vault and splits them: 10% to the launcher, 10% to the platform treasury, the rest to the rigs. While the set is still mining the rig share waits in the vault, so the first rigs do not take everything. Once the set closed, every collect adds share × 2^64 / total_weight to the coin's accumulator, and pay sends weight × (accumulator − paid_so_far) to the rig's current owner. Anyone can call pay; our keeper does it on a timer. A set that closed with no rig at all hands its share to the launcher.
Launching
Two transactions from your wallet: launch (mint, collection, window 0) and open (the pool). About 0.035 SOL up front including the 0.005 SOL launch fee; about 0.0025 SOL comes back when the pool opens. Name up to 32 bytes, ticker up to 10 characters, image up to 4 MB, set size 250 / 500 / 1,000, opening market cap 10 to 1,000 SOL (default 30).
Addresses
| program | |
| config | |
| treasury | |
| upgrade authority | |
| Meteora DAMM v2 | cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG |
| Metaplex Core | CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d |
| source | github.com/theleadingzeros/leading-zeros-program (verified build: pending) |
Check it yourself
Nothing here needs a wallet.
A rig
Open Verify a rig and paste its address; the browser recomputes the hash. Or by hand:
solana account <rig asset> -um --output json # a Core asset: owner, collection, attributes
# the Rig PDA: seeds ["rig", asset] under the program
python3 - <<'EOF'
from Crypto.Hash import keccak; import base58
challenge = bytes.fromhex("...") # Rig.challenge (also an asset attribute)
miner = base58.b58decode("...") # Rig.miner
nonce = (...).to_bytes(8, "little") # Rig.nonce
h = keccak.new(digest_bits=256, data=challenge + miner + nonce).hexdigest()
print(h) # must equal Rig.hash
EOF
The program
solana-verify verify-from-repo -um --program-id <program> https://github.com/theleadingzeros/leading-zeros-program --library-name leading_zeros
A pool
solana account <pool> -um # creator = the coin's vault PDA, collect_fee_mode 1 (SOL only)
solana account <position> -um # permanent_locked_liquidity = liquidity, unlocked = 0
The money
Every collect emits FeesCollected and every pay emits RigPaid; the ledger lists them with signatures. The coin account holds the running totals.
Caveats
- The program is unaudited and upgradeable. The upgrade authority is the deployer wallet listed above, kept until the code has been reviewed. An upgrade could change any rule; the verified build lets you check that the deployed code is the published code.
- Rig metadata uris point at this site. The proof lives on chain (the asset's attributes and the Rig account), so a rig survives the site, but its image does not.
- Fees sit in the pool position until someone calls
collect, and in the vault until someone callspay. They are not lost, but they are not paid by themselves either; our keeper is a convenience, not a guarantee. - The tier odds are exact for the hash function; the number of rigs a set ends with, and how much a coin earns, are not. A set that nobody mines closes after 6 hours with whatever exists.
- Meteora pools, Metaplex Core and Solana itself can change or fail in ways this program cannot protect against. Nothing here is financial advice.