This happens when eggs are overcooked. The sulfur in the egg whites reacts with the iron in the yolk, creating that greenish-gray ring. To prevent this, cook the eggs for less time and immediately cool them in ice water.