A rock hyrax midden is a stratified accumulation of fecal pellets and a brown amber-like a urinary product known as hyraceum excreted by the rock hyrax and closely related species.  
Hyrax middens form very slowly (ranging from ~5 years to >1000 years for 1 mm of hyraceum accumulation), over long periods of time, with many spanning tens of thousands of years and some dating as far back as ~70,000 years. Hyrax middens contain a diverse range of paleoenvironmental proxies, including fossil pollen and stable carbon, nitrogen and hydrogen isotopes. Combined with the antiquity of hyrax middens, and the often-continuous nature of their deposition, hyrax middens have become a valuable means of reconstructing past environmental and climate change
Rock hyraxes are known to use communal latrines. These sites are often found in sheltered locations, where the threat of predation is limited, and middens form when they are protected from the elements. At well-protected sites, it may accumulate in deposits in excess of a meter thick and several meters across. The thickness of hyrax middens depends on the nature of the shelter and the regional climate history and geology. Hyraceum shows hygroscopic properties and periods of increased precipitation or elevated ambient humidity will destroy existing middens, while more arid periods allow their development/preservation. Thicker formations tend to occur in shallow shelters that during more arid periods, presumably provided sufficient shelter from rainfall for substantial midden accumulations, but under wetter conditions no longer provide adequate protection, resulting in the removal of the more soluble components of the midden. At poorly protected sites in arid regions hyrax urine leaves a white, calcium carbonate precipitate on the rocks. Varying degrees of protection result in varying degrees of midden preservation. Small overhangs, vertical fractures in cap rocks, and groundwater flow along weakness in the shelter’s architecture may lead to midden degradation if rainfall exceeds a certain amount and/or intensity. The thickest middens have been found at sites composed of massive, horizontally bedded rock such as granite and quartzites with between ~30 and 480 mm of annual rainfall. In more humid environments (>800 mm mean annual rainfall), there is little to no evidence of hyraceum accumulation, and middens typically resemble piles of compost, as the masticated plant material in the pellets rapidly decomposes. Hyraceum-rich middens do not typically form in coastal situations, despite the presence of hyraxes, and it is considered that the ambient humidity of the air and the occurrence of coastal fogs preclude midden development