I’ve never really looked into crypto mining before, because I missed the pre-ASIC boat with Bitcoin and just assumed it was impossible without super specialised gear and cheap electricity. However, on Friday afternoon I found myself reading a Slashdot article about malware that altered CPU settings to make them more effective for mining, and from there I went down a rabbit hole. I didn’t have any intention of mining anything, but eventually I was like screw it, I apparently (barely) have the equipment I need so let’s give it a whirl.
What Is Mining?
This is describing Bitcoin but more-or-less applies to all proof-of-work crypto blockchains (also this is written to the best of my understanding, so I could be wrong in some spots but the general idea should be correct): miners compete to authenticate the previous “block” (bundle of transactions) in a blockchain. This involves throwing a tonne of processing power at basically trying to brute-force a value that, if appended to the block’s hash and hashed again, will be either equal to the target hash (or less than it by as little as possible). The target hash is a number that has been pre-set by the network itself. Whoever solves it first is rewarded with newly minted Bitcoin and the transaction fees in the previous block. It’s kind of like a lottery, where the more processing power you have, the more chance you have at winning. Having the most power doesn’t guarantee you’ll win though – it’s still very much random chance as to who is going to stumble upon the answer first.
Bitcoin is designed to get more difficult to mine as more miners jump on board (and vice versa), which keeps the rate of Bitcoin creation constant throughout the life of the network. Back in the old days, you used to be able to mine Bitcoin on standard PC hardware (and technically you still can), but as it got more popular (2013-ish) people started building ASIC (Application-Specific Integrated Circuit) machines – that is, hardware specifically designed to mine Bitcoin, and it did it so well that it made doing it by regular hardware uncompetitive. Basically, you’re not going to have much luck mining Bitcoin without ASIC hardware.
A while later, people realised that the algorithms in a lot of altcoin PoW blockchains are well-suited to being solved with the processors on 3D graphics cards, and given that most ASIC systems are built targeting Bitcoin, it’s much easier to compete because ASIC machines aren’t as dominant. Graphics cards are designed to do specific types of math in massively parallel ways, so if you can repurpose them to solve blockchain algorithms then you can do it way more efficiently than a regular general-purpose CPU. Unfortunately this realisation, plus the current semiconductor shortage have meant that graphics cards are in extremely high demand, and as such they’re hard to find (and when they are, they’re expensive as hell).
You’re not going to be able to mine coins by yourself on consumer hardware – the competition out there with other people/companies that have massive computing resources is too great. To get around this though you can join a mining pool, which is where you join several thousand other people and split up the math between all the hardware you have available, making it possible to compete with giant miners. If a block is solved by the mining pool, then the reward gets divided up by everyone who contributed to it.
Isn’t This Bad For The Environment?
It depends where your electricity is coming from. I get mine from 100% renewable energy companies, so I feel like my conscience is clear here (and look at me, I’m doing my part to drive renewables uptake by… wasting electricity). If you were chasing higher profit margins you’d probably be resorting to the cheapest energy possible, which’d likely be fossil fuels at this point unfortunately. The future of crypto is definitely in proof-of-stake systems as they use about 0.05% of the energy as proof-of-work ones do, making them cheaper to run, better for the environment, and much, much easier to get new coins from from. I’ll do another post on how it all works eventually.
Giving It A WHirl
I built myself a gaming computer back in 2016 for VR, but haven’t played games on it much since then (I’m mostly console these days). The key component of it is a Geforce GTX 1080 graphics card, which can be repurposed for mining crypto. It’s nowhere near as efficient as newer cards, but I’m working with what I have. So I had the hardware, next up I needed to figure out if it was actually worth doing.
I currently pay 21c per kilowatt hour for electricity with Powershop – I put in the paperwork to switch to Momentum back in June, but all this lockdown drama has delayed the switch so I’m stuck with them for now. Powershop have been okay but they’ve done the usual electricity company trick of slowly raising prices and relying on customer inertia, so it’s time for my tri-annual switch. Anyway, the video card pulls a maximum of about 220W if I thrash the crap out of it – some math suggests that if I do this, it’ll cost me $1.11 a day in electricity (0.22 × 0.21 × 24). That means that if I am mining, I need to find something that’ll spit out more than $1.11 in value per 24 hours. However, I found that with some tweaking, I could reduce the power going to my graphics card down to about 150W without anything breaking or impacting hash rates, which ends up bringing the cost of mining to around 75c per 24 hours (0.21 × 0.15 × 24).
This is tricky, because the volatility of crypto prices means I could spend all day mining something that at the start of the day that’d earn more than 75c, but at the end of the day the exchange rate might tank so it’s only 50c, meaning it’d cost me more to mine than what it was worth (unless I hold indefinitely in the hope it goes up). Nevertheless, I wanted to see what happened. At the time of writing, Aeternity is the most profitable coin to mine, with Ethereum running a close second (these rankings change by the minute though). The catch is that I want money not coins, none of my exchanges support Aeternity, and for Ethereum most mining pools have a minimum payout of something like 0.01 ETH – meaning it’d be several weeks before I actually got paid anything. And then when I did, the gas fees on transferring would likely eat up half the payment amount anyway.
I wasn’t interested (at the moment) in waiting that long to get a payout, so I kept searching for the next most profitable thing that had the following features:
- Can be mined on a 1080.
- Has a super low payout threshold.
- Is worth more than 70c per 24 hours of mining.
- Is supported by the exchange(s) that I use.
I ended up with a shitcoin called Ravencoin. It’s currently worth around 21c per coin, the 2Miners pool has a minimum payout of 10 RVN, Digital Surge (I’m on a bunch of exchanges but this one is my current favourite) supports it as a wallet, and I can mine about 15 of them per 24 hours. Which would be $3.15 minus 75c = $2.40 per day if I leave my computer on 24/7 and don’t use it for day-to-day stuff… which isn’t going to happen, but still theoretically it should net me free money as long as the exchange rate holds up. $2.40 a day isn’t much, but it adds up over time – I could be making $72 a month if I just left my computer switched on and didn’t use it (and if the exchange rate stayed stable). I usually switch it off every night and need to do things on it during the day, but still, it should be free money while it’s left on during the day and I’m doing other things.
So next up, how do I do this? I ended up signing up to Minerstat, who are a mining management site, which handles the software management, and tracks stats/profitability etc. It’s pretty cool and can be used for any PoW coin. Their free plan was good enough for me and my one video card.
Once I signed up and installed the client software on my computer, I then went to Digital Surge and got an address for my Ravencoin wallet. Stuck that into Minerstat, then I went about configuring the client.
This stuff can get super technical, and brought me back to the late 90s when we used to all obsessively overclock our computers. But essentially it goes like this: install a mining client, set the algorithm for it to use, the mining pool to use, the wallet to send coins to, then let it run. I ended up going with 2Miners for no real reason – their payout threshold was RVN, which was definitely achievable within 24 hours. There’s a tonne of different mining pools out there that pay out mostly the same – I just settled on them by random chance. Anyway, I set up the client and let it run.
You could leave it at that, however to squeeze more profitability out of things, you want to start tweaking your video card settings. This is always a tedious trial-and-error process where you modify settings to send more/less power to the card and increase/decrease the GPU and memory clock speeds beyond the stock settings. You want to get it running as fast as possible on as little power as possible without causing it to overheat and crash, or otherwise cause your computer to reboot.
Several hours later, I had a decent setup. I had to try four different mining clients – three of them would immediately bluescreen my computer as soon as they loaded, but the fourth one – T-Rex – ran. It was averaging 14MH/s (million hashes per second) and drawing 200W. After a heap of tweaking, I managed to sit steady on around 16.3MH/s with 150W of power drawing. I think I can possibly get it up to 18MH/s if I open up my case and blast all the dust out of it, but that’s a problem for another day.
The next step is… wait. I kept reloading the 2Miners page over and over again, hoping that maybe if I stared at it hard enough it’d tick over to 10 RVN faster, but alas. Eventually I passed the 10 RVN threshold though:
Soon afterwards, the payment was sent. I tracked it through the Explorer:
After around 16 hours, I’d mined 10 RVN! 2Miners sent it to my exchange at about 11PM, and it actually appeared there 3 hours later.
I wanted to change it to AUD as I don’t trust the value of Ravencoin not to collapse at any point, but… there’s a $9.50 minimum. Shit! But the system works!
Will I continue on with this? I’m not sure. It was definitely enlightening, and with a cleaner computer and some more tweaking it could be viable for mining during the dying days of PoW Ethereum, but I’m on the fence. On one hand it’s free money, on the other there’s the constant risk that the exchange rate will drop. I do wish I’d tried all this out in 2016 instead of 5 years later, but that’s life.