Monero (XMR), the world’s leading privacy cryptocurrency has always taken a distinct path compared to the rest of other Proof of Work coins in the market. This coin is widely known for its cryptographic privacy techniques which obfuscates the blockchain from public view. By default every transaction on the Monero blockchain is private. Other than privacy focused it is one of the few coins with a goal to decentralize mining as much as possible.
In order to decentralize mining the network should be free from ASICs and FPGAs. The goal is to keep the network decentralized by resisting ASIC miners and only allowing CPU / GPU miners. At the same time ensuing top most security to its protocol and blockchain. To achieve this Monero uses RandomX.
RandomX is the name of the mining algorithm. It is an interesting hashing algorithm which was primarily designed as a PoW (Proof of Work) algorithm for Monero and it was mainly implemented to provide ASIC and FPGA resistance. This algorithm replaced the well-known CryptoNight algorithm that was previously used by Monero and other privacy coins.
Today, Monero is the only top coin to allow CPU mining. Other than XMR there are few other altcoins using the same RandomX hashing algorithm which is also CPU mineable.
Here in this article we’ll highlight the RandomX algorithm. We’ll share the list of coins currently using RandomX and the miners supporting RandomX mining.
Now before we look at the RandomX coins and miners let’s look at the origin of RandomX in Monero.
Origin of Random-X mining algorithm
ASICs (Application Specific Integrated Circuits) pose a serious security threat especially to altcoin networks where the theoretical possibility of a 51% attack is higher. The manufacturing monopoly of specialized ASIC machines leaves everything centralized in a few hands. Only a group of miners with large sums of money gets access to such machines. This in turn leaves no opportunity for common people to benefit from mining.
Since ASIC’s pose a serious risk of centralization few entities can gain majority of control over the network. It could lead to serious outcome such as the possibility of distributed attack and 51% attack where the attackers take control over the chain and could lead to threats like re-org. This is something that represents a single point of failure for the entire coin.
To eliminate ASICs from the network and to tackle such issues Monero was using the CryptoNight hashing algorithm right from the beginning. Even though it was a complex algorithm companies like Bitmain and Baikal somehow managed to crack the algo and they came up with the CryptoNight ASIC miner. But Monero (XMR) didn’t stop. To avoid ASIC mining the developers began developing new variants of CryptoNight. Not just once but they introduced a new variant of CryptoNight algorithm every six months.
This did negatively impacted the performance of ASICs. However since the Cryptonote series of algorithm has been for a long time it became pretty easy for ASIC manufacturers to re-implement ASIC for the new variant. The developers realized that CryptoNight was inefficient and a new algorithm was needed in order to completely destroy ASICs.
They decided to stop tweaking the existing algorithm and hard-forking the network every six months. Instead they started working on a new algorithm that provides ASIC resistance and would not require any tweaks for at least a few years. This is how RandomX was born.
What is RandomX?
RandomX hashing algorithm was developed for Monero by its developers and it was successfully activated on the network on November 30, 2019.
This mining algorithm is designed and optimized for general-purpose CPUs. It uses random code execution (hence the name RandomX) along with several memory-hard techniques to reduce the efficiency advantage of special purpose mining hardware’s. In other words, ASIC’s have no chance.
RandomX is a complex algorithm compared to its predecessor and is designed to be CPU-centric. The complexity of this Proof-Of-Work algorithm lends itself to ASIC resistance. Not only ASICs but it also protect the network against large GPU mining farms. So no GPU mining allowed?
The previous algorithm CryptoNight was designed in such a way so that it can mined using both CPUs and GPUs. But the problem is that it was largely dominated by GPU miners rather than mined using both CPU and GPU. With large GPU mining farms becoming the norm only those who have money gets to participate in the network. This is similar to ASIC dominance which takes away the idea of decentralization.
If the network is dominated by any specific type of mining then the token distribution will become skewed. According to RandomX developer Howard Chu; Today CPUs are the most distributed computing resource. Practically everyone in the world Today has got a PC and a smartphone which is capable of mining RandomX. If CPU mining becomes dominant then everyone in the world will have the capability to mine the coin and the token distribution will be fair. This is not the case if GPUs or ASICs dominate the mining scene.
This is why Random-X Proof of Work algorithm favors CPU mining. So what about GPUs? Are they completely driven out?
RandomX was not developed to resist GPUs and it does not completely drive GPUs away from the Monero network. Instead it is designed to bring more competition to GPU miners by favoring CPU miners. This algorithm makes CPU mining more prevalent while completely eliminating ASICs from the network and greatly reducing the impact of GPU miners.
Anyways compared to previous CryptoNight R algorithm GPU performance sees a slight increase in hashrate, especially NVIDIA cards.
But CPUs are at least three times more powerful than GPUs on Random X. As a result small miners with CPU power have a chance to do mining now. Okay, what about FPGA?
Can FPGA mine Random X?
No, FPGA’s can’t operate on RandomX. Dynamically re-configuring the FPGA circuitry takes too long and is a complicated process. So similar to GPU, FPGAs are less efficient at mining RandomX.
How does RandomX work?
RandomX works by randomly executing different parts of the code. It uses a virtual machine that executes programs in a special instruction set that consists of integer math, floating point math and branches. These programs can be translated into the CPU’s native machine code on the fly. However other chips lack the instructions required to perform the complicated operations by RandomX. As a result this algorithm naturally becomes CPU friendly and providing highest resistance to other sorts of mining.
This algorithm operate in two modes with different memory requirements and performance.
- Fast mode – Requires 2GB (2080 MiB) of shared memory and has 4x to 6x the performance of Light Mode.
- Light mode – Only requires 256 MB of RAM but runs significantly slower.
Both modes are interchangeable. The fast mode is suitable for mining. Whereas the Light mode is used for proof verification which allows full nodes to validate blocks.
Random X algorithm is not only ASIC / FPGA resistant. But is also aimed at resisting botnets in Monero network.
Botnets and Malware
Botnets and Malware mining – Its a process where the attacker installs the miner on computer without the knowledge of the user. This way they can steal the users’ computer power to mine on the Monero network. This was a huge issue when Monero was using CryptoNight. Now with Random-X botnets and malware miners have been completely eradicated.
Due to memory hard aspect and since the algorithm require more than 2 GB of RAM it becomes pretty difficult to mine hiding from unsuspecting users.
You can read the complete specification, features and requirements of RandomX here: https://github.com/tevador/RandomX/
Which CPU Is best for mining RandomX?
All modern Intel and AMD CPUs like Intel Core i7, i9, and AMD Ryzen CPUs can mine RandomX. Here are the specific requirements for CPU mining.
- 64-bit architecture
- IEEE 754 compliant floating point unit (FPU)
- Hardware AES support
- Support for large memory pages
- At least 2.14 GB of free RAM per NUMA node
Other than CPUs, GPUs with over 2GB of memory can also operate well on RandomX. Miners are also available for both CPU and GPU.
There are only 4 miners currently supporting RandomX algorithm. All are available for Windows and Linux.
- XMRig (CPU Miner) – https://github.com/xmrig/xmrig– Beginners guide to XMRig.
- RandomX CUDA Miner (NVIDIA) – https://github.com/SChernykh/RandomX_CUDA
- Open CL Miner (AMD) –https://github.com/SChernykh/RandomX_OpenCL
- XMR-STAK-RX – Free Monero RandomX Miner (CPU) – https://github.com/fireice-uk/xmr-stak/releases
If you are looking for coins to mine with your CPU then look for coins using RandomX algorithm. Following are the list of cryptocurrencies based on Monero’s algorithm.
- Monero – XMR
- Quantum Resistant Ledger – QRL
- Dynasity coin – DCY
- Dero – DERO
- LOKI (LOKI) – RandomXL (Slightly modified version of RandomX)
- WOWNERO (WOW) – RandomWOW (Another modified algo)
- ITALOCOIN (XTA) – RandomX
Among them only Monero is worth mining with your PC.
Note: Please keep in mind that these coins are listed here only for informational purpose. They are not investment advice and do not expect to make a fortune mining these coins.
Soon we’ll make a guide to mine RandomX algorithm for beginners.