Note: this article has been updated on 19-Apr-17.
zCash is a new decentralised digital cryptocurrency which aims to provide better privacy of transactions by allowing either transparent addresses (t-addresses) or zero-knowledge proof addresses (z-addresses). While it uses a part of BitCoin’s original code, it’s been heavily modified by the development team. zCash uses the equihash algorithm which was built to be GPU-optimized and resistant to ASIC processing. Mining on CPU is also possible, albeit with a considerably lesser efficiency. zCash allows you to use t-addresses and z-addresses. t-addresses are transparent addresses where anyone can see the sender, the recipient as well as the payload of the transaction. z-addresses, however, conceal the payload. They use zk-SNARKs (zero-knowledge proof), meaning in short that you can prove a transaction is valid even if you do not reveal what it contains, making it efficient for privacy.
Note that this article is purely from my point of view, you should as always look for multiple information sources and cross the data. Also, I will not go into why you should prefer this cryptocurrency over another one, whether it makes sense or not to mine. I decided to mine zCash because it seems to me to be the most trustworthy cryptocurrency around, a fresh start from BitCoin and an attempt to learn and fix some of the issues that affect BitCoin (privacy and network control).
Three things will dictate your approach to mining: your hardware capabilities, your operating system(s) and your technical abilities.
Cryptocurrency mining is a power-hungry and resource-intensive activity. There is a cost incurred in electrical power and if you intend to mine for anything else than for pure scientific interest you will have to ensure that your operation is cost-effective, i.e. that your power consumption costs and hardware costs are counterbalanced by sufficient horsepower. You may want to look at a system that is power-effective, in fact most professional miners operate so-called “mining rigs” (i.e. bare-bone systems primarily designed for mining operations) where the graphic adapters are slightly under-volted and sometimes over-clocked to reduce power consumption while maintaining acceptable hash power. There is a threshold to be calculated as to whether the coin you are mining is “worth” enough compared to what you invest into mining it.
In general, CPU mining is not cost-efficient and if you are looking at building a dedicated mining rig, most specialists out there will advise to save on the CPU to better invest money in efficient graphic adapters.
In terms of graphic adapters, unless you are a millionaire you are looking at a GPU that delivers the best bang for the buck. In my case, I decided to settle for an AMD RX480 based card, specifically the Asus ROG Strix RX480 with 8 GB RAM (update 19-Apr-17: I’ve added a second identical card to my system and upgraded to a better power supply, namely a Corsair HX 850i). Your budget and mileage may vary, in my case decision factors were (pure hashing capabilities aside) the overall build quality, number of fans and noise levels. You may not want to run a GPU-intensive operation on a card that is not properly cooled. The ability to over-clock or under-clock your card will also be a decisive factor.
Consider also that the specialised mining software is not always available on all of the OS platforms and some miners may be optimised for a specific type of GPU. Generally, avoid older cards and if you are on Nvidia especially card with a Compute Capability below SM 5.0 as most miners require SM 5.0 or above to mine efficiently (Maxwell or Pascal architectures). Make sure to read the various forums about driver versions since that may influence the mining efficiency as well.
For a list of graphic adapters and their zCash operation range, check out this page which has some indicative information. Look at fields such as “Payback”. You’re looking at getting hardware that mines efficiently, cost-effectively and within your budget.
Your OS may dictate what miners you can use, what drivers and so on. From a purely official standpoint zCash is supported only on Linux. But it’s also possible to mine on MacOS as well as Windows, through various experimental ports. If you are looking at building a mining rig, Linux is definitely recommended. Personally, I mine on one MacOS device and on two Windows devices.
While mining is not complicated in itself, the tools to be used are made by passionate people who are deeply into technology and their use may seem obscure to the newcomer. What needs to be understood first is how this whole thing runs: how to mine, with which tools, where do I get the ZEC (zCash currency code) sent etc. You should be aware that each tool has its own configuration method, whatever runs on Windows/Mac is experimental and likely to be unsupported.
Also, if you do not know what you are doing you could put your system at risk. Be especially cautious when downloading miners, I recommend you get them directly from github and steer clear of forum links if possible. Note that miners are often classified by anti-malware and antivirus programs as risk/malicious items, even if they are not harmful per se. Favor open-source miners over proprietary code, although the best miners are often closed source. You may have to make trade-offs.
Finally, if you’re the DYI type, ensure you don’t kill yourself in electricity hazards and take all the appropriate security measures. Consider environmental constraints such as noise, cooling, etc.
Mining: Miner Software & Mining Pools
Solo Mining or Pool Mining
First of all, you have to decide if you want to run for solo mining or if you want to participate in a pool. Solo mining means that you are on your own and that you will attempt to resolve blocks only with your compute power. Needless to say this option is valid only if you have considerable GPU compute power at hand.
For mere mortals, pool mining is the best alternative. Your compute power is aggregated with the total compute power of all the other miners in a given pool and this gives more chances of success when resolving blocks (you are given “shares” to resolve). The earnings are then split according to the contributions (amount of shares) you made to the pool. Certain pools also use a different calculation system, and pay you based on the n amount of predecessor shares you have contributed, thus encouraging you to stay with the pool. The pool operator deducts a fee for their operation costs and the credit is assigned to your user. After a certain balance threshold has been met (usually 0.001 ZEC) you will have the ability to cash out earnings to a t-address (note that t-addresses are reusable to receive multiple payments). Most pools have an automatic transfer feature where credits are automatically sent to your t-address after your balance has hit a certain threshold.
Mining pools work with the concept of “workers”. A worker is a unique source that you use for mining, to which an account and a password are associated. You can see below how I have set my workers, for example.
If you’re the generous kind, you can also donate to your pool i.e. contribute a fraction of your earnings to support their operational costs. And if you’re extra generous, you can fetch over some zCash to me too (details are on my keybase.io profile). But really, a lot of folks are contributing to create tools such as wallets, implementations, mining tools so feel free to support them.
In the case of zCash, you should be aware that the founding company took the approach to finance itself through a 20% fee on any new block that is mined – note that these coins are not pre-mined, so the income started at zero and grows alongside with the total amount of ZEC in circulation, which is a good thing IMHO. These funds are used to pay developers and finance further developments around the zCash technology. You will also pay transfer fees as well when you send and receive ZEC (these fees reward the miners who process the blocks/transactions). Currently, blocks have a payout of 12.5 ZEC, of which 2.5 ZEC go to the ZECC (Zerocoin Electric Coin Company, which is behind zCash technology). The average transfer fee has been around 0.0001 ZEC so far.
Miner software & pool fees
All miner software are not created equal. Some developers invest a lot of time in creating performant, highly optimised miner software that gets the best out of your hardware. You can see a five-fold increase in GPU mining if you use the right miner software. This comes at a price, some of this software will use a portion of your mining time to cover the developer costs. Usually, that would be something in the range of 60-90 seconds of mining time per mining hour. During this time lapse, results will be sent to the developer’s own mining pool or zCash address. In my opinion that’s a fair price to pay.
You will also pay fees to your pool when you mine (some pools may have a no-fee policy but I’m quite skeptical about it). Again, use cryptocompare.com to get an idea. This averages between 1% to 3%.
Finally, a note on pools. It’s advisable and recommended to maintain a sort of balance between pools to ensure a single pool never gets over 50% of the total hashrate on the network. You may want to decide on which pool you want to mine based on this as well (see “51% attack” theories around BitCoin for example).
Choosing a miner
While the default installation (wallet + zcashd daemon) allows you to mine, I strongly advise against it. The default miner is not optimised and it would be a waste of time and energy. If you intend by all means to run a zCash node, feel free to do so! But do not use the mining option.
To select a miner, you will have to consider which hardware you use and which OS you are running. There is no rule of thumb here, but here are some hints:
- Do not use an “all purpose” miner unless your OS platform gives you no choice (hello MacOS)
- Prefer highly optimised miners for GPU mining (Optiminer, Claymore work well with AMD chipsets – I am very happy with Claymore personally)
- Consider that high-performance miners will incur a developer fee
- Consider if the miner software or pool will pay you in ZEC or BTC (Bitcoin) – most will pay in ZEC but nicehash is known to reward in BTC. I prefer those who pay in ZEC and support the zCash project/cryptocurrency
In terms of GPU mining, you should always experiment with the miner settings to find our optimal hash rate and Sols/s (solutions per second) output. In zCash, what matters is the Sols/s output as this will directly influence how much cryptocurrency you generate. Each miner uses different solving methods.
Look at it as a trial-and-error process. Seek for help in the forums and do not assume that you’ve reached the best configuration until you get more and more acquainted with the tools & terminology. I thought I was having good results with the RX480 and the Genoil miner at 45 Sols/s, after I was told to use Optiminer you can imagine my surprise when achieving consistently 250 Sols/s! With no other tweaking whatsoever. More recently, moving to Claymore further increased to around 300 Sols/sec. With two RX480 cards (in stock configuration), my hash rate is consistently around 615 Sols/sec. One important note if you use Claymore: ensure you connect to your pool using a secure connection (SSL or TLS). This will reduce the dev fee time from 90 seconds down to 72 seconds.
Mining is resource-intensive, you want to make sure that you are getting optimal use of your system, especially if it’s not dedicated to mining and you work on it as well. If your system is powerful enough and you are using the system for office/browsing, let the GPU miner run in the background – you can also add an extra CPU miner to run on half of your CPU cores as a supplement. If you intend to play games or work on resource intensive programs, it’s best to stop mining and resume after you are done. As I said earlier, CPU mining is not profitable so use it only for the sake of scientific experiments. Some miners such as Claymore will allow you to selectively turn off or on specific GPU cards. Useful if you need to work or play, while mining on the other GPU card.
Ensure your system is clean, well aerated, in a moderate temperature environment to avoid any unnecessary strain on the hardware. Ensure you have quality components at all levels. Whenever possible, favour quiet cooling systems. Ensure cabling doesn’t obtrudes aeration. We ended up completely cleaning and recabling our system when we added a 2nd RX480 and changed the PSU – I have some photos on twitter.
When mining to a pool, check if they support your miner, they may have specific URL/port settings based on the miner you use. And remember what I wrote above about SSL/TLS support in Claymore.
The reward of mining is the generation of zCash cryptocurrency (ZEC). This cryptocurrency needs to be stored somewhere and for this purpose we have wallets.
The only official wallet is the zCash wallet and it runs only on Linux. There is an experimental port on Windows called zCash4win which bundles the zCash daemon and the wallet (a Java application). I’ve set it up both manually (before zCash4win release) and then through the zCash4win installer with equal success. This option is in theory the best one if you want to fully manage your own wallet but it also means you have to run a full zCash node. There is also a Mac version (zCash4Mac) maintained by the same developer.
If you’re the security conscious type and want to secure your ZECs, you may want to have an offline system where you store your ZECs as well. This discussion is however out of this article’s scope (at the very least, you should stop the zcashd daemon and make a secure copy of your wallet.dat file).
I used Jaxx in the past, Jaxx provides the ability to use the wallet across devices and the latest release also supports ZEC from within the iOS version of the application (this was added just before Easter 2017). Jaxx is however a lightweight wallet and should not be used to direct mining payments to it. I have stopped using Jaxx for mining payments and direct them to my local zCash full node / wallet (an implementation of zcash4mac coupled with the latest zcashd and zcash-cli binaries).
Stats and numbers for geeks
Update 19-Apr-17: the stats below are 2 months old. Since then, I stopped using the Dell L702x laptop and very seldom use mining on the MacBook Pro. The desktop now also sports a second RX480 card, same specs as below. The hash rate increase has been twofold (using Claymore), but the received zCash revenue increase has been even more noticeable due to the PPNLS system of suprnova.cc – the pool I use – due to me submitting much more shares, and with a higher difficulty.
So, with all of that said, you may want to know what I am doing and how it looks like. I have currently three systems on which I am mining:
- A custom-build desktop, sporting a Core i5-4690S, 8 GB RAM and an ASUS ROG RX480 Strix with 8 GB RAM
- An early 2015 13.3″ Retina MacBook Pro, sporting a Core i5-5257U, 8 GB RAM and the Intel Iris 6100 adapter
- A 2012 Dell XPS L702x, sporting a Core i7-2670QM, 8 GB RAM and an Nvidia GT-555M with 3 GB RAM
- Desktop: Single Core: 4000+, Multicore: 10000+, OpenCL: 129997 (no, there is no typo here)
- MacBook Pro: Single Core: 3213, Multicore: 5536, OpenCL: 16266
- Dell L702X: Single Core: 3006, Multicore: 9018, OpenCL: 12808
Update 19-Apr-17: the stats below are 2 months old. Here again, I moved to Claymore and stopped fully mining on CPU. Mining software with devfees are often detected as malware because devs package their software which is often not open source to avoid reverse engineering. You may have to create Windows Defender exceptions, of course at your own risk. I have a specific Claymore setup which I’m happy to discuss about either on the zCash forums or privately.
I use .bat files to trigger the mining operations and have several of these based on the mining intensity.
I generally separate GPU from CPU mining to ensure I can mine as modularly as I want. For example, I have a script that mines using all four CPU cores on the desktop (during sleep or away hours) and another one that mines using only two cores during regular hours.
Also, because I have three systems and I separate CPU and GPU I have to set up multiple workers on the pool to which I participate. Having multiple workers is important to ensure that the jobs being sent from the pool to your worker are not processed or messed up by another worker. Having multiple workers also allows you to compare their efficiency.
The picture below gives an overview of my mining stats (I am using the zec.suprnova.cc pool):
As you can see above, I have one worker for GPU (optiminer) and one worker for CPU (nheqminer) on the Desktop. On the mac, I use an experimental nheqminer version with the tromp solver through a single worker. On the L702x, I have one worker for the GPU and two workers for the CPU (each worker uses 2 CPU cores). Because the Nvidia GT555M has SM 2.1, nheqminer defaults to the tromp resolver and this one is not really optimized for older cards. However using EWBF (a closed source miner) has given better results (threefold compared to nheqminer). You many want to handle EWBF cautiously as Windows Defender will attempt to eradicate it and sees it as a malware.
I now have a single worker for GPU (Claymore) and another one for when I’m crazy enough to think my MacBook Pro can make any decent contribution.
I consider zCash mining primarily as a fun and hobby activity, even though in light of Bitcoin’s rise this could have some financial impact as well. I’m interested in cryptocurrencies and in technology so it’s interesting for me to be there at the inception of this project. Let’s see how this goes along and I hope this guide will be a fun diversion to my many data center related posts (which are due to resume very soon!)
If you found this post useful (or this blog in general) and want to toss over some ZEC to me, feel free to do so through my t-address t1TwAbf56wBB3nHYfPN14FdkEeAQxe