I want to create an altcoin that is a clone of Bitcoin. I want the mining to be ASIC resistant.
Are there any steps which I should include in my altcoin's mining algorithm to prevent ASIC mining?
Do I need to implement a completely new algorithm for mining?
-
1There is no such thing as "ASIC resistant".– amaclinNov 18, 2016 at 8:18
-
What about EquiHash Algorithm?– Fire BirdNov 18, 2016 at 8:28
-
Principle Elusive Joe– amaclinNov 18, 2016 at 11:32
-
Fair Enough....But is it possible to have any mining algorithm which is ASIC resistant? If not how should I prevent 51% attack?– Fire BirdNov 18, 2016 at 12:26
-
In fact the only way to prevent 51% attack is... praying :)– amaclinNov 18, 2016 at 13:11
2 Answers
Are there any steps which I should include in my altcoin's mining algorithm to prevent ASIC mining?
That's not really what you should be asking. You should be asking, "Can someone design an ASIC which is more effective at mining my altcoin than a general purpose CPU?" At sufficient scale, that is always possible.
However, you don't really care if someone can invest $1 trillion and get an ASIC that is 1% better than a CPU. If your attacker had that much money, they'd crush you no matter what. You care whether they can invest a reasonable amount of money and create something significantly more efficient. (Either in power consumption per hash, or capital cost per hash.)
Also, you want some other properties:
- It must be reasonably fast to verify. (But doing so can weaken the algorithm, see Why did Litecoin choose the scrypt factors that they did? for an example.)
- Switching chain tips must not cause a miner to lose a lot of progress. (Otherwise, miners have an incentive to ignore new blocks if they almost have a block of their own.)
- Someone who modifies the block header must have to redo all of the work. (Otherwise, mining provides no protection.)
- Mining speed must scale linearly with computing resources. In other words, you shouldn't be able to double the number of computers you have and quadruple your mining speed.
I don't know of an algorithm that satisfies these five properties, but the problem hasn't been proven impossible.
What about EquiHash Algorithm?
Look at these two criticisms of EquiHash:
https://petertodd.org/2016/cypherpunk-desert-bus-zcash-trusted-setup-ceremony#equihash-proof-of-work
There are probably algorithmic improvements still available in EquiHash, and there is almost certainly a hardware speedup available.
(There is also an unverified claim that someone has created an FPGA Equihash miner.)
Do I need to implement a completely new algorithm for mining?
You're unlikely to do much better than the attempts above.
The best way to change algorithm,if someone decides to kill your coin can dump a lot of hashrate in order to increase the diff and then abandon,that means the 51% attack is not the only problem,I suggest you to use cryptonote https://cryptonote.org/inside/