That white discoloration that sometimes forms on old chocolate turns the stomachs of chocolate lovers everywhere. For years, researchers have known that the harmless change, known as a fat bloom, is caused by liquid fat such as cocoa butter migrating through the chocolate and crystalizing on the candy’s surface. But exactly how that process takes place—and how to prevent it—has remained a mystery. Now, researchers have captured the bloom process in real time, they report online in Applied Materials & Interfaces. After combining the main ingredients of chocolate—cocoa, sugar, milk powder, and cocoa butter—and grounding them into a powder (to speed up the process), the scientists used high-powered x-rays to peer into the sweet’s crystal structure, down to a scale of several nanometers. When they added a few small drops of sunflower oil to the powder samples, they observed the liquid fat moving through pores and tiny spaces in the chocolate very quickly, most likely as a result of capillary action—the movement of a liquid within porous material due to the forces of adhesion, cohesion, and surface tension. After several hours, the oil had also softened the chocolate, leading to increased migration of the fat. The study suggests that reducing the porosity of chocolate when it’s being made could help stem the appearance of the off-putting bloom and improve the overall quality of chocolate. Minimizing the amount of liquid fat in chocolate by storing your hoarded stashes in cool, but not too cold, conditions would also help: Eighteen degrees Celsius, it turns out, is the sweet spot.