The Royal Mint, the United Kingdom’s official coin producer, spent the last two years developing a mysterious technique to extract gold from electronic waste, preventing hundreds of kilograms of gold every year from ending up in landfills.