When a burrowing giant clam is very young, only about half a millimeter long, it picks out the home it will have for the rest of its life. It attaches itself to the rock of a reef, and as time passes, it grows larger (although as the smallest of giant clams, it reaches only 10 to 15 centimeters in length). Simultaneously, it sinks into the rock at an imperceptibly slow rate.

When a scuba diver swims by an adult clam on one of the Pacific reefs where they live, all she will see is what looks like a protruding pair of beautiful turquoise lips. These are the clam’s feeding tissues, basking in the sun and filtering food from the water — the rest of its body is safely encased in a cave of its own making.

How exactly a clam could do that has long been a mystery. But in a new study in Biology Letters, researchers revealed at long last a probable tool: The clam’s foot releases acid.

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

That’s illuminating because reefs are built by tiny coral organisms that create their own skeletons out of calcium carbonate. When they die, they leave behind their hard shells, and their descendants, as well as many other creatures like the clams, make their homes in and on the resulting hummocks. Mix calcium carbonate and acid, however, and the molecules of the rock dissolve, in the same reaction you would see if you dropped an Alka-Seltzer into Coca-Cola, which is weakly acidic.