If your cup (literally) runneth over, it may be by design — and that design may be over 2,500 years old. Variously called a Greedy Cup, Tantalus Cup or Pythagoras Cup, this drinking vessel can only be filled with so much wine before a siphoning effect drains it all back out.

Pythagoras of Samos was a philosopher and mathematician of the 6th Century BCE. Among other accomplishments, he is widely credited with proving the Pythagorean theorem (though it may well have been the work of his students). He is also given credit for the creation of this ancient practical joke device that likewise bears his name.

The cup itself looks ordinary except for its central column. A hidden pipe runs from a void in the bottom of the stem up into the vessel, coiling back on itself in the process. This twist is the key.

When the cup is filled too high, liquid tips into the central pipe and, per Pascal’s principle of communicating vessels, the entire contents of the cup begin to drain. Gravity and pressure take over and the rest, as they say, is history — the vessel then empties itself entirely. If filled to just below that point, however, a user can drink from the vessel normally.

As the (possibly apocryphal) story goes: Pythagoras designed the cup so that his students would share equally and balance their consumption. If they poured too much, these self-draining chalices would prevent the students from ending up in their cups, so to speak.

Various versions are still made to this day, including the one above — titled the Cup of Justice — sold on the streets of Crete.