what are the byproducts of producing gold through metals