[Ethereum] Ethash vs Equihash in terms of memory hardness

asic-resistantethashhash-algorithmmining

Ethereum's Ethash was designed to be memory hard with the intention of making the mining process ASIC-resistant. Zcash's Equihash algorithm also promises the same. How do these two PoW systems compare to each other?


Note: I'm not looking for a detailed explanation or differences in implementations etc. I just want to know how these algorithms effect miners and end-users. For example, in some video, I remember Vitalik saying that Ethash is 200 times more memory hard that Scrypt (used by Litecoin). I'm looking for similar comparisons between Ethash and Equihash.

Best Answer

Ethash vs Equihash memory hardness isn't a constant - it changes with time - but I'll try to provide a (very basic and generalised) method that you could use to work out what it is at any point in time.

Ethereum uses a generated DAG file which increases in size every 30,000 blocks (called an epoch). As of writing the current Ethereum epoch is #151 and the DAG size is 2.18 GB. You can find the current Ethash DAG details here: https://investoon.com/tools/dag_size

Equihash's memory hardness is dependent on the parameters used in its algorithm (based on Blake2b hashing) called n and k. According to the protocol paper (https://github.com/zcash/zips/blob/master/protocol/protocol.pdf), on the production Zcash network n=200 and k=9. That translates to ~500Mb memory requirement based on the algorithm implementations as defined by the authors of this article: https://www.cryptolux.org/index.php/Equihash. (Personally, I've found that the actual memory requirements when mining zCash tend to be a bit higher with a peak usage in the 800Mb-1.2Gb range.)

So to give a simple answer to your question - one could say that Ethash is at least 2-4 times more memory hard than Equihash (with that number set to grow as the Ethereum DAG epochs increase).

However there are more important nuances that you would need to factor in when assessing the two algorithms - especially for mining profitability - most of which are outlined here: http://www.openwall.com/articles/Zcash-Equihash-Analysis

Related Topic