Each mining round, RandomX generates a random program from the block header. This program uses integer arithmetic, floating-point operations, branches, and memory access patterns designed to exploit every feature of a modern CPU. The program reads and writes to a 2 MB scratchpad — sized to match a typical CPU's L3 cache.
Because the program changes every round, hardware can't be optimized for any specific computation pattern. An ASIC would need to implement the full instruction set of a CPU to be competitive — at which point it is a CPU, with no economic advantage.
| Mode | RAM | Initialization | Speed | Use Case |
|---|---|---|---|---|
| Fast Mode | ~2.5 GB | ~1 second | Full speed | Mining, dedicated rigs |
| Light Mode | ~256 MB | Minimal | ~5x slower | Verification, mobile, low-RAM |
Fast mode stores a 2 GB dataset in RAM for quick lookups. Light mode recalculates lookups on the fly — slower but uses far less memory. Mining uses fast mode; node verification uses light mode.
| CPU | Hashrate (H/s) | Cores/Threads | Notes |
|---|---|---|---|
| AMD EPYC 7763 | ~36,000 | 64/128 | Server, 256 MB L3 |
| AMD Ryzen 9 7950X | ~22,000 | 16/32 | Consumer top-tier |
| AMD Ryzen 9 5950X | ~18,000 | 16/32 | Previous gen king |
| AMD Ryzen 7 5800X | ~9,500 | 8/16 | Great value miner |
| Intel i7-13700K | ~10,500 | 16/24 | Intel best performer |
| Intel i7-12700K | ~9,000 | 12/20 | Good Intel option |
| Apple M2 Pro | ~6,000 | 12 | ARM architecture |
| AMD Ryzen 5 5600X | ~6,500 | 6/12 | Budget miner |
AMD dominates because Ryzen CPUs have larger L3 caches (32-64 MB) than Intel equivalents. More L3 = more threads can hold the 2 MB scratchpad simultaneously.
Bitcoin's SHA-256 is simple enough to implement in dedicated hardware (ASICs). The result:
RandomX eliminates all of these. Anyone's existing computer can mine. No special equipment. No manufacturer dependency. Mining power distributes across millions of consumer devices worldwide.
| Period | Algorithm | ASIC Status |
|---|---|---|
| 2014-2017 | CryptoNight | Eventually broken (Bitmain X3) |
| 2018 (Apr) | CryptoNight v1 | Emergency fork to kill ASICs |
| 2018 (Oct) | CryptoNight v2 | Another tweak |
| 2019 (Mar) | CryptoNight R | Temporary, randomized |
| 2019 (Nov) | RandomX | No ASICs since (6+ years) |
Monero forked 4 times between 2018-2019 to kill ASIC miners. RandomX was the permanent solution — it's been unbroken for over 6 years, the longest period without ASIC interference in Monero's history.
| Algorithm | Coin | Hardware | ASIC Resistant? |
|---|---|---|---|
| RandomX | Monero | CPU | Yes (6+ years proven) |
| SHA-256 | Bitcoin | ASIC only | No (ASICs dominate) |
| Ethash (legacy) | Ethereum (pre-PoS) | GPU/ASIC | Partially (ASICs exist) |
| Scrypt | Litecoin | ASIC | No (ASICs dominate) |
| Equihash | Zcash | ASIC | No (ASICs exist) |
| KawPoW | Ravencoin | GPU | Partially |
For detailed setup guides, see Mining Guide and P2Pool Guide.
RandomX is what makes Monero's mining truly decentralized. By leveraging the full complexity of modern CPUs — random code generation, branch prediction, large caches — it ensures that specialized hardware offers no advantage. Anyone with a computer participates equally. This is the foundation of Monero's censorship resistance.
Mine XMR and need to sell for cash? Cash by Mail EU-wide, Face-to-Face SW Germany. 683 trades, 454 partners, 100% feedback. Contact me on Telegram.