How well the design of the card matches the algorithm in use by the cryptocurrency. Not every algorithm is the same. Some value throughput, others are more sensitive to latency, others just need brute force etc. Being good at one type of calculation often comes at the expense of another type though, so there isn't really a "best" architecture per se. And newer cryptocurrencies such as Ethereum are deliberately being designed to perform poorly on certain architectures, namely ASIC's.
AMD cards have tended towards the brute force approach for the last few generations, while Nvidia has spent a lot of effort on memory compression and tiled rasterization and so forth to try to be as efficient as possible. In games, it's allowed them to do more with fewer resources and lower power. AMD often had more pure processing power available, but was held back by drivers or memory. That's helped with artificial workloads like mining, but has hurt them this generation with the reliance on HBM2.