Viscous slime is a powerful glue used by the Sun Warriors as a security measure for the protection of their revered sunstone. Removing the sunstone from its pedestal causes the glue to erupt from beneath it, filling the chamber and drowning would-be thieves. The slime can only be removed by aardvark sloths, which are domesticated by the Sun Warriors for this purpose.
When Zuko removed the golden sunstone from its pedestal, he activated a trap which closed the door of the room and filled it with the slime. Airbending both himself and Zuko to a small grated opening in the roof, Aang managed to save them both from suffocation, though they remained stuck to the bars until nightfall. Aang called loudly for help, after which they were found and subsequently released by the Sun Warrior chief with help from the aardvark sloths.