A token you can only mine by finding prime numbers. No oracle, no owner, no signing key: the contract checks every prime itself. 90% of the supply exists only through mining.
Around 300 BC Euclid proved that the primes never run out. This is an experiment built on that proof.
Your CPU searches for a 256-bit prime whose hash with the current seed starts with enough zero bits. When it finds one, your wallet signs a commit, waits one block, and signs the reveal. Two transactions, about 250,000 gas in total.
A browser is slow next to a dedicated miner, and the reveal goes through your wallet's normal RPC, where a block builder could see it. This is for learning and for fun: for serious mining use the reference miner below with a private RPC.
10% of the supply (2,100,000 EUCLID) was minted once at deploy and put into a Uniswap v4 pool as tokens only, no ETH: buyers bring the ETH. The other 90% can only be mined.
The pool has a hook that charges a fee in ETH: 85% when trading opens, falling to 1% over 20 minutes to stop sniper bots, then 1% forever. Fees go to the project wallet. The hook cannot pause trading, block anyone or change the fee.
The Uniswap app does not route through pools whose hook takes a fee, so trade here or with a tool that supports v4 hooks. Check the contract address against the one in the footer and on @ProofOfPrime.
The contract holds a seed. The first one mixes in the hash of the block before the deploy, so not even the deployer could search early. Every accepted prime moves it.
Miners look for a 256-bit prime p such that keccak256(seed, p) starts with N zero bits — the difficulty. Since the seed is new each round, nothing can be precomputed.
The miner first publishes only a hash of (address, prime, salt). Nobody watching the mempool can copy the prime.
One block later the miner sends the prime. The contract checks it is 256 bits, meets the difficulty, was never used, and is prime (Baillie-PSW test, run on-chain).
If everything holds, the miner is paid and the seed changes. Every 8 primes the difficulty moves one bit to aim for one prime every 10 minutes.
| Reward per prime | set at deploy |
| Halving | every 10,000 primes (~69 days at target pace) |
| Supply cap | set at deploy |
| Launch pool | 10% minted once at deploy into the Uniswap v4 pool; 90% mined only |
| Pool fee | 85% at open → 1% after 20 min, then 1%, in ETH, to the project wallet |
| Target pace | 1 prime every 10 minutes |
| Difficulty adjustment | every 8 primes: +1 bit if they came in under half the target time, −1 bit if over twice |
| Commit → reveal | at least 1 block, at most 200 blocks |
| Owner / admin / upgrades | none on the token. The launcher could only create the pool and open trading, once each |
| Contract | not deployed yet |
Whoever brings more computing power finds more primes. A tuned GPU miner will beat a laptop running the reference miner by a wide margin.
A block builder could hold back your reveal and claim that prime. Send reveals through a private RPC.
Baillie-PSW is not a proof. No number is known to fool it, and none exists below 264, but nobody has proven one can't exist.
The contract has no owner and cannot be upgraded. Whatever is deployed stays exactly as it is, bugs included.
Rewards halve every 10,000 primes, so about half of everything that will ever exist is mined in the first ~2–3 months.
The pool opens around a $4,000 market cap for the tokens in it. A buy of a few hundred dollars moves the price a lot, both ways.
Not an investment, no promise of value. The only allocation is the 10% in the launch pool. Mining costs gas (≈200,000 per prime) and electricity. Only spend what you're fine losing.
Node.js miner, open source. It searches, commits, waits one block and reveals. Use a fresh wallet with a little ETH for gas.
cd miner && npm install
RPC_URL=<your private RPC> PRIME_CONTRACT=<not deployed yet> MINER_KEY=<fresh key> ROUNDS=3 node miner.mjs