Which version of the CryptoNight algorithm can we use for ASIC resistance. My understanding is that CryptoNight v7 is not ASIC resistant. Can you please explain the algorithm versions.
Thanks in advance.
There isn't a lifetime effective ASIC resistant algorithm. ASIC chips are custom manufactured computing devices specifically designed for a particular hashing algorithm. So, after an ASIC device is made to compute the hashing algorithm, you need to fork and change the mining algorithm so that ASICs tailored to the old algorithm can no longer mine effectively.
Monero issues regularly scheduled hard-forks, which are upgrades to the Monero network and prevent ASIC devices to mine Monero coins.
CryptoNight v8 is more resistant against ASICs than CryptoNight v7 but the ultimate goal would be to have an algorithm that is fully resistant. There is not really one that has that property right now but there is work being done on some sick stuff that is actually going into this direction:
CryptoNight light is a version of the algorithm which uses a smaller scratchpad, 1mb. If I recall correctly, it was designed to be easier to hash on lower-end hardware and was developed by the Aeon team.
CryptoNight heavy is a version that uses a larger scratchpad, 4mb. It was designed as a potential way to thwart any CryptoNight ASICs at the time.
CryptoNight v7 is the version both the above variants derived from. It was changed to v8 via other tweaks (i.e. not via it's scratchpad size of 2mb), to thwart ASICs discovered at the time.
None of the algorithms are 100% ASIC-proof. However, v8 was needed to thwart ASICs at the time mining on the Monero network and in late stages of production. The Monero developers are tweaking the algorithm every network upgrade (roughly every 6 months) to continue ASIC resistance. Whether CN heavy is more ASIC resistant than the current Monero implementation is not currently provable as there is no coin using it with the same dominance and market price as that of Monero making it worthwhile for the high development costs of an ASIC.
So in summary, no current algorithm is completely ASIC-proof. All we can currently do is commit to regular tweaks to stay resistant. There is also ongoing work attempting to come up with a longer term solution.