Prokaryotes that made their living from photosynthesis had to be near the surface of the oceans or on seashores. Many formed coral-like structures known as stromatolites, which grew into reefs at the edges of continents as billons of organisms accumulated over thickening layers