The myth of King Midas tells one of the world’s first stories about alchemy. The greedy Midas was granted one wish by the Greek god Dionysus, and he chose the ability to transmute anything he touched into gold. Unfortunately, the king quickly realised that this gift was more of a curse as he could no longer enjoy many of life’s real pleasures, such as the taste of good food and wine, or the embrace of a loved one.

While the Midas myth is meant to warn against becoming a slave to one’s desires, it also reflects our human infatuation with gold. This alluring metal has captivated humans for millennia, certainly since the days of the ancient Egyptians, and has been the basis of currency for many civilisations for hundreds of years. Its high value, stemming from its rarity, chemical stability and beauty, makes it a seductive tempter whether used in coins, in a church, or on the human body.

However, despite intensive efforts throughout history to extract gold from the Earth, best estimates suggest that to date only 190,000 metric tonnes of this precious metal have been mined, an amount that will surprisingly fit into a cube of approximately 20 metres on each side (which might be the reason why gold is less and less the basis of our currency).

But gold remains the foundation of the luxury jewellery industry and, in recent years, has become one of the most prominent materials in the production of our latest obsession – modern electronics. Gold is used to make many of the devices we love, such as cellphones, tablets and laptops. This is due to its highly efficient electrical properties and corrosion resistance, which are unmatched by any other metal. But the fabrication of just 40 mobile phones requires approximately one gram of gold, which corresponds to nearly a ton of mined ore. Given the persistent rise in electronics production, and the limited and diminishing supply of gold, how will we maintain the supply of this precious material for many years to come?

One solution might be found in the recycling of electronic waste, a process often referred to as urban mining. Given that a metric tonne of recycled laptop circuit boards can have between 40 and 800 times more gold than found in a metric tonne of ore, it seems irrational to redeposit the precious metal into the earth via landfills. Despite this, and the fact that urban mining is growing more cost-effective by the day, only 20 per cent of all electronic waste is currently recycled. In 2017, the Global E-Waste Monitor projected that the amount of electronic waste generated by the end of 2021 would reach 52.2 million metric tonnes. Given these numbers, it is estimated that the value of the gold in our garbage exceeds €10 billion ($11.2 billion). On top of that, the many other precious metals in the garbage, such as silver, copper and platinum, add even more value to our waste. Therefore, given its economic and technological importance, it is time to consider whether other sources of gold, which are not yet decidedly viable, can also be exploited in the future.

What might futuristic gold mining actually look like? For instance, the valuable metal is appearing in sewage systems throughout the world, the result of its increasing use in various industries. As well as in sewage, trace quantities of gold are also found in both freshwater, such as rivers, and seawater. In fact, since the British chemist Edward Sonstadt first uncovered the existence of gold in the sea in 1872, many have dreamt of its eventual extraction, yet to date all efforts have failed. The lack of success stems from the absence of an adequate and eco-friendly chemical process that is able to efficiently concentrate the precious metal from such dilute solutions. Also, while more than 20 million metric tonnes of gold are in our oceans for the taking, the amount of gold in seawater is minuscule when compared with the large quantities of other metals. In fact, it takes 100 million metric tonnes of seawater to extract a single gram of gold.

The fact that our seas are laden with this valuable metal continues to fuel the efforts of many scientists around the world, even if no technologies have yet demonstrated performance in such complex environments. These shortfalls have sparked the interest of many chemists: with my colleagues at the Swiss Federal Institute of Technology in Lausanne, we designed new sponge materials with microscopic holes that can selectively extract and concentrate gold from a variety of the world’s most complex liquid mixtures. One such sponge can rapidly extract gold from Swiss industrial wastewater, river water and many other solutions in as little as two minutes. The sponges exhibit recordbreaking gold-extraction rates because they can concentrate as much as one gram of gold inside a gram of sponge. Further, due to the sponge’s remarkable selectivity for gold over other metals, the gold extract purity is an impressively high 23.9 karats. This is the highest purity reported to date for such an extraction process.

So while King Midas might have looked to the gods for an easy solution to acquire gold, modern alchemists use ingenuity to achieve ancient dreams. It is these qualities that might eventually lead to environmentally mindful and energy-efficient technologies for extracting gold from inconceivable places. However, let’s just be careful to not become slaves to our own desires, too. After all, all that glitters ain’t gold.