Smelly water in wells and sewers, cooking asparagus, digestive disturbances, the geysers at Yellowstone National Park and boiling eggs all have the distinctive and unpleasant odor commonly referred to as rotten eggs. The smell from all those sources come from chemical reactions that occur after sulfur is subjected to heat or pressure. When you boil an egg, you can smell the gas in quantities as small as one part per billion. By slow-boiling the egg, you get a yellower yoke and cut down on the stench.
Egg whites contain 88 percent water and 11 percent proteins, the most abundant of which is ovalbumin. Of ovalbumin's 3,000 atoms, three are sulfur atoms, which when heated produce hydrogen sulfide gas. Pagan priests turned sulfur into a gas when they burned it for medicinal purification in 2,000 BC, and later the Chinese used it for fireworks displays powered by gunpowder. Ironically, sulfur is odorless in its elemental crystalline form and only smells when it forms a gas.
When you boil an egg, the ovalbumin protein chains in the egg white break apart, causing chemical reactions and hydrogen sulfide gas. This process occurs as the egg ages too, but heat from the boiling water causes the process to speed up. Boiling water produces hydrogen sulfide 200 times as fast as during the normal aging process when the egg is at room temperature
As boiling water heats the egg and more and more hydrogen sulfide is released, the gas moves inward toward the yolk as well as outward toward the air. Once the gas reaches the yolk, it reacts with the iron in the yolk and forms new chemicals, ferrous sulfide and ferric sulfide. You'll see those chemicals as the dark, greenish-yellow ring around the yolk once you break open the egg. The more you heat the egg, the darker the ring.
Reducing the Smell
Both the odor and the ring around the yolk diminish if you decrease the heat. To do this, submerge an egg in cold water and heat a pot of water on the stove. Once it reaches a boil, take the pot off the stove and let the egg sit in the hot water for 10 minutes. The egg will cook perfectly, less hydrogen sulfide gas will occur and both the smell and the dark ring will be lessened. Dunking the egg in icy water after 10 minutes stops the cooking and the gas entirely.