Ever since President Donald Trump directed NASA to get boots on the moon by 2024, the agency and its partners have been hard at work trying to make it happen. Late last month, NASA awarded contracts to three companies to develop a crewed lunar lander, but getting to the moon is just the start. The agency also plans to build a permanent moon base before the end of the decade and use it as a stepping stone to Mars.

If astronauts are going to spend weeks at a time on the moon, they’re going to have to figure out how to live off the land—er, regolith. It’s too expensive to ship everything from Earth, which means they’ll have to get creative with the limited resources on the lunar surface. Moon dirt is a great building material and there’s water in the form of ice at the south pole that can be turned into rocket fuel. But the hottest commodity of them all may very well turn out to be an astronaut’s own pee.

Earlier this year, a team of European researchers demonstrated that urea, the second most common compound in human urine after water, can be mixed with moon dirt and used for construction. The resulting material is a geopolymer, which has similar properties to concrete and could potentially be used to build landing pads, habitats, and other structures on the moon.

Geopolymers are regularly used on Earth as an eco-friendly alternative to conventional concrete. One of the main ingredients in concrete is cement, which requires a high-temperature 22manufacturing process that releases a lot of CO2. But a geopolymer doesn’t require much energy at all. Instead of cement, it uses pulverized rocks or fly ash, the waste product from burning coal. When this is mixed with water and certain reactive compounds, it creates a putty-like material that can be cast into desired shapes before it’s left to dry.

On the moon, most infrastructure is likely going to be built by industrial 3D printers. Building with bricks would be way too inefficient and would limit the types of structures that could be made. But robotic 3D printers could autonomously build more complex habitats. Lunar regolith has chemical similarities to fly ash, which makes geopolymers an attractive option for building stuff on the moon. The downside is that geopolymers require a lot of water so they’ll flow through the nozzle of a 3D printer.

“Water is very, very valuable on the lunar surface,” says Marlies Arnhof, a member of the Advanced Concepts Team at the European Space Agency and a coauthor of the research. “So one of our main goals with this study was to reduce the amount of water necessary to produce a geopolymer.”

Superplasticizers are materials that are used to reduce the water content of concrete and geopolymers while maintaining their flowability. On Earth, superplasticizers are typically hard-to-pronounce substances like naphthalene and polycarboxylate. But as Arnhof and her colleagues discovered, urea works just as well and could easily be sourced on the moon. Rather than filtering out contaminants in astronaut urine and recycling the waste water, the pee could be stored in a tank and harvested for urea.

To test the idea, the researchers mixed synthetic urea powder with lunar regolith simulant to make cylindrical structures the size of a fist and let them dry under a weight. They then simulated using the material in a 3D printer by extruding it in layers through a syringe. They compared the results with conventional geopolymers. “It performed quite well,” says Anna-Lena Kjøniksen, a materials scientist at Østfold University College and coauthor of the study. “It seemed to give the best overall results, especially when it came to avoiding crack formation.”