If you've ever felt a little warmer after a few drinks, it turns out some animals use that as an actual survival strategy – although we wouldn't recommend trying it yourself. To make it through winter in the freezing, oxygen-starved waters of northern Europe, crucian carp (and its more domesticated cousin) goldfish produce their own alcohol internally, removing dangerous chemicals from their bodies and getting nicely sauced along the way. Now, researchers have worked out how they do it.

We don't need to tell you that oxygen is important. Living cells use it to release energy, and without it, humans and most other vertebrates will die in a matter of minutes. In a pinch, the body can produce lactic acid to create energy using glucose instead, but it's a short-term solution for high-intensity situations, like a particularly rigorous workout.

But crucian carp and goldfish have a unique ability to clear out lactic acid by converting it into ethanol. That's then diffused across their gills and released into the water around them, allowing the animals to survive for months on end without oxygen.

"During their time in oxygen-free water in ice-covered ponds, which can last for several months in their northern European habitat, blood alcohol concentrations in crucian carp can reach more than 50 mg per 100 milliliters, which is above the drink drive limit in these countries," says Michael Berenbrink, co-author of the study. "However, this is still a much better situation than filling up with lactic acid, which is the metabolic end product for other vertebrates, including humans, when devoid of oxygen."

But how do they do it? Researchers from the Universities of Liverpool and Oslo looked into the molecular mechanism behind the process, and found that the alcoholic animals got their ability by duplicating a certain set of proteins responsible for energy production. Most animals have only one of these sets, but the team discovered that the fish have a second set that's been finely tuned to form ethanol.

The team then studied the evolutionary background behind this mutation, and found that it was likely the result of a whole genome duplication event, which occurred about eight million years ago, before the crucian carp and goldfish split off into separate species. The advantage of this ability, the researchers say, is that it allowed the fish to be the last survivors in a pond, giving them access to all the resources they need.

"The ethanol production allows the crucian carp to be the only fish species surviving and exploiting these harsh environments, thereby avoiding competition and escaping predation by other fish species with which they normally interact in better oxygenated waters," says Cathrine Fagernes, lead author of the study. "It's no wonder then that the crucian carp's cousin, the goldfish, is arguably one of the most resilient pets under human care."

The research was published in the journal Scientific Reports.