In ancient Greece, humans used to swear on the Styx to keep promises. My 8yo had an interesting question today: "Can gods swear on the Styx as well ? They won't ever have to cross it anyway because they are immortal, so why should they care ?"
According to Hesiod, one of the important changes the Olympians made after defeating the Titans was the ability to make oaths. The oath-making and keeping was guarded by the goddess Styx, daughter of Tethys.
As for gods taking oaths, Hesiod tells that When gods made oaths or swore to tell the truth, they held their hand over over a cup of Styx’ water. If the deity did not keep his/her promise or lied under oath, then Hesiod tells of the punishment in Theogony:
 And there dwells the goddess loathed by the deathless gods, terrible Styx, eldest daughter of back-flowing Ocean. She lives apart from the gods in her glorious house vaulted over with great rocks and propped up to heaven all round with silver pillars.
Rarely does the daughter of Thaumas, swift- footed Iris, come to her with a message over the sea's wide back.
But when strife and quarrel arise among the deathless gods, and when any of them who live in the house of Olympus lies, then Zeus sends Iris to bring in a golden jug the great oath of the gods from far away, the famous cold water which trickles down from a high and beetling rock. Far under the wide-pathed earth a branch of Oceanus flows through the dark night out of the holy stream, and a tenth part of his water is allotted to her.
With nine silver-swirling streams he winds about the earth and the sea's wide back, and then falls into the main; but the tenth flows out from a rock, a sore trouble to the gods. For whoever of the deathless gods that hold the peaks of snowy Olympus pours a libation of her water is forsworn, lies breathless until a full year is completed, and never comes near to taste ambrosia and nectar, but lies spiritless and voiceless on a strewn bed: and a heavy trance overshadows him.
But when he has spent a long year in his sickness, another penance and an harder follows after the first. For nine years he is cut off from the eternal gods and never joins their councils of their feasts, nine full years. But in the tenth year he comes again to join the assemblies of the deathless gods who live in the house of Olympus. Such an oath, then, did the gods appoint the eternal and primeval water of Styx to be: and it spouts through a rugged place.