Depends on whether you decide to account for the resource extraction required to generate the "primarily energy cost" part. Especially with a lot of bitcoin mining happening in countries that generate much of their power via coal. Gold mining isn't exactly clean, but compared to the environmental damage done by dumping the radioactive heavy metal infested fly ash, gold mining is like working in a cleanroom by comparison.