Alex Bourlotos
Alex Bourlotos's Blog

Alex Bourlotos's Blog

I built a Bitcoin lottery machine. Should you?

I built a Bitcoin lottery machine. Should you?

Alex Bourlotos's photo
Alex Bourlotos

Published on Jan 22, 2021

6 min read

Most would say it’s foolish. I don’t.

Photo by [Dmitry Demidko](https://cdn.hashnode.com/res/hashnode/image/upload/v1627053199535/pAcqpwcKR.html) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)Photo by Dmitry Demidko on Unsplash

I‘m Fascinated by Bitcoin

If you’re here, you probably already know that the main purpose of Bitcoin is as a peer-to-peer electronic cash system. You also know that a more popular use for the coin is to hold it as a store of value. But it’s the details that make it so fascinating. I won’t go too deep into the rabbit hole, but there are a couple of key points that I think you should keep in mind.

Bitcoin was built to combat inflation.

The most bitcoin to ever come into circulation is capped at twenty-one million coins. This introduces scarcity, as less is available to be mined. It also presents a store of value in that it remains immutable where other currencies do not. For example, the more money the US government prints into existence without a value backed asset, the higher dollar amount you can demand for a static asset like Bitcoin.

The “blockchain” in its simplest form is a ledger of transactions proven by miners on the network.

This allows the currency to go from one person to another without a third party (such as a bank) getting involved while retaining trust that the transaction is legitimate. This is the actual definition of “electronic cash” in regards to Bitcoin.

OK, but what is “mining” anyway?

Think of it as an automatic lottery drawing. If you buy a lottery ticket, you’re given a set of numbers that are compared against a number drawn on the drawing date. If the numbers match, you are awarded a prize.

Mining Bitcoin is no different. A computer device is tasked with churning out sets of numbers called “hashes” in hopes of generating a number that matches what the current “block” is set to. It’s like as if the Powerball number was drawn before you bought the tickets and every purchase was in hopes of reaching that number. When a match is found, the current reward is issued to the successful miner. As of this writing, the reward is set to 6.5 bitcoin. There are some nuances about the reward given as well as how the number is matched, but that’s the gist of the process.

Photo by [Dmitry Demidko](https://unsplash.com/@wildbook?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)Photo by Dmitry Demidko on Unsplash

The Bitcoin Lottery Machine

My machine is really just a bitcoin miner. I will make a separate article that goes through my process of building it, so I won’t go through that right now. I wanted to let people know why I chose to build one and what my expectations are for the future.

First of all, this wasn’t easy to do

I’ve been into cryptocurrency for a while but I’ve never tried to set up a miner to solo mine bitcoin. The documentation for the devices I chose was up to date, but running a Bitcoin node and configuring mining software took some work. I had to downgrade Bitcoin Core (the node) to 0.19.1 instead of the latest version in order to get it to connect properly. That’s all after poring through hundreds of pages of forums that are 6+ years old to make it happen.

The issue with solo mining

It’s very hard to gain anything, similar to the lottery. Pools also exist in the crypto-mining space just like lottery pools exist for people wishing to widen the chance of winning. Pools pay out depending on the percentage of participation a person puts in. Whether it’s for the lottery or for cryptocurrency, you’re more likely to win, however your prize will be smaller.

Not a lot of people think that solo mining is worth the trouble of maintaining the hardware and software anymore. Honestly I feel the same way about the lottery. Two dollars for a chance at millions sounds great but you’re only submitting one number, one time, for one drawing.

Photo by [dylan nolte](https://cdn.hashnode.com/res/hashnode/image/upload/v1627053202177/zfUkFjLhc.html) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)Photo by dylan nolte on Unsplash

Why I chose Bitcoin mining over playing the lottery

With my machine, I’m submitting about 15,841 potentially valid work units per minute. A block, which you’re trying to guess, has an average solve time of ten minutes. That means I’m playing the crypto-lottery 158,410 times per block. That’s 950,460 times per hour. That’s also 22,811,040 times per day. The actual odds are worse than the lottery, but I feel more engaged in the process of “playing”. The ongoing costs are also lesser of a burden to me because by running my machine I am doing some pretty important things for Bitcoin.

  • I am running a full Bitcoin Node, which secures the network and logs transactions. This makes it harder for Bitcoin to “die” as I’m running a copy of the entire blockchain.

  • By mining, I am adding to the speed in which transactions can be verified, this helps to increase the speed of the network in total, even if it’s by a small amount.

Essentially, if you believe in what Bitcoin is by its fundamentals, then running a solo mining node is a way to play at chance while supporting the cause. It’s for that reason that I’ve ignored the nay-saying internet users and built a bitcoin miner anyway. It’s low power, doesn’t raise my bills very much and can be repurposed as a retro gamer should I decide to shut it down.

Photo by [Erik Mclean](https://cdn.hashnode.com/res/hashnode/image/upload/v1627053203612/Y_E8tKt97.html) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)Photo by Erik Mclean on Unsplash

How sustainable is this in the long run?

The largest remaining issue I’m coming across is the need to use unsupported software to get this going. I believe that everyone should have an easy way to connect to the bitcoin network and start mining on their own, but that’s a story for another article.

For now, I can see a day in the future where my miner stops running because the version of my bitcoin node is too far out of date. Developer support for making mining software work with new versions of bitcoin nodes is fading as most people go to pooled mining. Essentially, unless the value can be shown to revive solo mining interest, I am unsure of the number of years I can keep my machine online.

Should you build one?

If you would like to understand Bitcoin better and love projects, then this one is for you! It was worthwhile for me just with the knowledge gained. If I do ever solve a block then that’s an incredible added bonus.

If you’re interested in buying an holding bitcoin to protect your existing purchasing power against inflation, then I would recommend sticking to direct purchasing through exchanges (and keeping it on a wallet off of the exchange of course).

Curious on what I used to build it?

I made this using a Raspberry Pi 4 with Raspberry Pi OS (Raspbian) installed with Bitcoin Core and cgminer. A powered USB 3.0 hub with 10 ports is connected to the Raspberry Pi with 10 USB ASIC mining devices (GekkoScience Newpac miners). Each device is running at 500MHz, giving me an average hashing speed of 1.134TH/s. I opted for the 512GB microSD card, but you could store your Bitcoin Core data on an external hard drive. Check back for another article about the making of the machine at a later date!

I like hearing your thoughts! Do you think I’m foolish for taking this on? Do you think I’ll ever find a block?

 
Share this