Raspberry Pi crypto mining out of curiosity

So you have a spare Raspberry Pi lying around and wondered if you could make some money mining cryptocurrency, eh? Short answer: not really.

Many cryptocurrencies nowadays avoid the Proof of Work (PoW) mining algorithm that Bitcoin popularized because of its wasteful consumption of energy and the specialized hardware required to be competitive against other miners. Instead, many coins opt for more eco-friendly approaches like Proof of Stake. Mining-based tokens send "gas fees" per transaction to miners who confirm the transaction (think of it like a sales tax). Coins with higher fees, like Ethereum, are popular with miners but gouge regular users. Also, large mining organizations have muscled out most independent enthusiasts so the only chance to make decent money is to join other individuals in a "pool" where you share your earnings.

Furthermore, mining essentially stresses your hardware to the max and runs 24/7 so it will run hot and fail sooner than normal.

If you're still determined to make money mining crypto with a Raspberry Pi, the next challenge you face is competition against large organizations using specialized ASIC hardware, FPGA hardware, or high-end GPU graphics cards that will easily outrun you in the race to be the first to confirm a transaction (sorry, no consolation prize for second place here). In other words, there's no way your wimpy Raspberry Pi sitting on your desk can out-perform this:

Bottom line: there's really no economic, ecologic, or practical advantage to mining as an individual, especially with a Raspberry Pi that has no ASIC, FPGA, or GPU hardware.

Having said all that, as an academic exercise, what would be the best coin to mine with a Raspberry Pi? 

Some have suggested mining coins that use Proof of Storage, like Chia, but that assumes you have a large external hard drive sitting around and doesn't really leverage any benefit of the Raspberry Pi itself. Others have suggested VPN coins, like Lethean, that leverage your home network as an exit node for others but that's dangerous because any nefarious online activity by the VPN user will be tracked back to you.

In the end, the only intrinsic advantage (albeit modest) available to you with just a bare Raspberry Pi is CPU power.

Ideally, you'd want a coin that targets the CPU and blocks ASIC, FPGA, and GPU. Many have tried to create this holy grail but ASIC/FPGA/GPU developers always figure a way around it and take over. The best you can hope for is an algorithm that's ASIC/FPGA/GPU resistant. Enter: AstroBWT

AstroBWT is an algorithm that's specifically designed for CPU mining and actively works to make it harder (e.g. non-cost effective) for the big players with their fancy hardware and expensive data centers:

"AstroBWT is based on mathematical proofs and research, unlike many other CPU mining ALGOS. ... In the coming months or years that AstroBWT is optimized or shown to have a significant performance boost on FPGAs, ASICs, or GPUs there would be a benefit for everyone. Such an advancement could even trigger the next revolution in Bioinformatics, Signal Processing, DNA Sequencing or other numerous domains where BWT is used. So, AstroBWT will not only serve as an ASIC/FPGA and GPU resistant algorithm but it will also succeed in helping scientific research if it is optimized for these things."

 Basically, this is an ongoing academic research project that will always give CPU miners the advantage. So, which crypto coins use this algorithm? Only one at the moment: Dero.

When Dero switched to the AstroBWT algorithm in 2020 you can see the immediate effect of ASIC/FPGA/GPU heavyweights leaving for easier targets, opening the way for smaller miners like you and I to compete for profits:

So, that makes it easy -- if you want to make a little money mining with your Raspberry Pi then Dero is your best option.

Now that we've selected our coin, we need to install the CMD wallet (or use the web wallet) to get our Dero address.

Next, we need to find a pool (because it's much easier to get up and running as a novice using a mining pool service). Here is a list of Dero pools.

You'll want to pay attention to pool feesPROP is the simplest but can be gamed. SOLO has the highest return but much lower odds since you're competing against everyone to be the first to confirm a transaction. PPLNS is typically the best compromise since you can leverage the odds of the pool and the reward distribution disincentivizes "pool hoppers" that try to game the system. You'll want to pick a pool with pool fees less than 1%.

Once you've selected your pool, you'll need to install the mining software on your Raspberry Pi. The pool instructions will tell you what software they support but generally they accept XMRig. Here are the build instructions. P.S. Since our gains will be modest, I've opted out of the donation: before the mkdir build command run: sed -i 's/= 1/= 0/g' ./src/donate.h

Follow the pool instructions to configure XMRig, run it, then type in your Dero address in the website textbox to watch your miner activity.

In my experience, you can make about $10/month. Is it worth the effort? Not really, but you can brag to your friends about making money in your sleep  :)


P.S. Some mining hash rate comparisons (higher is better):

  • AMD A8-6500 quad core: 97 H/s
  • AMD A8-7600 quad core: 133 H/s
  • Ampere A1 virtual quad core (Oracle Cloud): 429 H/s
  • Intel Atom x5-Z8350 quad core (Atomic Pi): 102 H/s
  • Intel Core i3 quad core: 135 H/s
  • Intel Core i5 4300U dual core: 116 H/s
  • Intel Core i5 6600 quad core: 203 H/s
  • Rockchip RK3399 hexa core (which is faster than a Raspberry Pi): 65 H/s

Comments

Popular Posts