Valuable metals like gold, copper and platinum, reach the Earth's surface from deep underground on vapour bubbles from the magma that carry the metals, says a new study.
On the surface, the metals bound to iron sulphides form rich ore deposits.
The study published in Nature Geoscience is a pointer for researchers looking for precious metals.
It could also explain the basis of the greatest mass extinction witnessed on Earth.
"Sulphide liquids are dense, so everyone assumes they sink to the bottom of magma chambers, but we found a mechanism for moving sulphide liquids up instead of down," says the study's lead author professor James Mungall of the University of Toronto.
Mungall and colleagues combined laboratory experiments and theoretical models to see that small droplets of sulphide melt attached to vapour bubbles degassing out of magmas and used the buoyancy of the bubbles to float upwards into shallower ground where they form rich ore deposits.
The gas bubbles latch onto the sulphide droplets due to surface tension, carrying the droplets up to the top of the magma chamber.
This is also the way large amounts of sulphur is released into the atmosphere during volcanic eruptions, affecting climate.
Gold, copper, platinum and nickel bind to molten iron sulphide and reach the surface.
The authors now plan to use the Australian Synchrotron at Monash University to determine if nickel deposits in sulphide are also transported by vapour bubbles.
If so, it could explain the largest mass extinction event of all time.
Known as the great dying, the Permian-Triassic extinction event 252 million years ago killed 70% of terrestrial and 96% of all marine life on Earth. An article published in Nature in 2013 suggested the extinction event may have been caused by methogenic bacteria which use nickel as a nutrient.
Vaporised nickel could have been released into the atmosphere from magma oceans erupting through volcanos which formed the Siberian traps around the same period.
"If these bugs suddenly had a lot of extra nickel raining down on them through the atmosphere, then they would have a huge population explosion, producing significant amounts of methane which is a very potent greenhouse gas," Mungall told ABC News.
While it has been largely believed that gold and other heavy metals reached the Earth's surface by coming up with lava, their presence in places that lack a fault zone has perplexed scientists.
Transportation by wind and water have not been entirely satisfactory though recent studies suggest the metals were washed down in volcanic rain into basins where microbes precipitate the metals.