Egg whites have many proteins which are connected by sulfur bonds, and when boiled, these bonds break down, which results in hydrogen sulfide production. The hydrogen sulfide is responsible for turning a runny egg into a solid one, but it also interacts with the iron in an egg yolk to release iron sulfide, which causes a gray ring to form between the white and the yolk.