The Yumen Formation, located below the Jiuquan Formation, is a conglomerate layer cemented by silica and calcareous materials. It was formed by a combination of ice water and flood deposition approximately 2.6 million to 780,000 years ago. The rock is exceptionally dense and challenging to excavate, which makes it unsuitable as a grotto stratum. Instead, it serves as the foundational layer for the grotto stratum.
The Gobi Formation above is an unconsolidated layer of sand and gravel that was formed by flood deposition approximately 120,000–11,000 years ago. While it is possible to construct caves in this area, it is not an ideal location due to its poor diagenesis, loose gravel texture, susceptibility to collapse, and inadequate arching performance.
The Jiuquan Formation, where the Mogao Grottoes are located, was formed about 770,000–130,000 years ago. It is a gravel layer cemented by calcium mud that was brought by rivers and torrents. The gravel layer is gradually consolidated due to the prolonged pressure exerted by the overlying Gobi Formation. Simultaneously, surface water and groundwater, which contain a significant amount of calcium, permeate the gravel layer, resulting in calcium precipitation and gravel solidification. The gravel layer is almost level and possesses a sturdy composition, rendering the construction of a superior grotto vault effortless. The Jiuquan Formation is highly suitable for excavation and construction of caves, which is why it is commonly referred to as the "cave stratum".