Quark returns from a visit to Ferenginar with the distressing news that he has Dorek Syndrome, an extremely rare disease that should end his life within a week. Since a Ferengi must pay off his debts before he dies, Quark decides to put up his remains for bidding on the Ferengi Futures Exchange to earn the needed latinum. Meanwhile, Bashir, Kira and the pregnant Keiko O'Brien return to the station after a serious accident. But when O'Brien visits the infirmary to check on his wife, he discovers that Kira is now carrying the unborn child.
O'Brien and Keiko slowly absorb the news that Kira will have to take their child to term. In the meantime, Quark is depressed by the lack of bidding for his remains. Then, a huge anonymous bid of 500 bars of latinum is placed, which he immediately accepts, happy to die a winner. But Quark soon gets a message from his doctor — he does not have Dorek Syndrome after all. Quark quickly sets about undoing all his debt-settling work and preparing for a long life. But that night, he gets a surprise visit from Brunt, the feared Ferengi Liquidator, who informs Quark that he purchased his remains — and he intends to collect, no matter what.
Quark tells Brunt that the diagnosis was a mistake. But Brunt insists that Quark honor his contract and surrender his body parts within six days — period. The only way for Quark to save his own life is to break the contract, an appalling option to him, and one which will render him a pariah in Ferengi society. Realizing he has no choice but to die, Quark tries recruiting Garak to perform the deed.
Rom is horrified by his brother's decision, but Quark insists that a true Ferengi has no other choice. Garak is more than willing to kill Quark, and the pair begins exploring several options in a holosuite. Quark decides that he wants his death to come as a painless, bloodless surprise. Garak assures him that he can pull this off, and Quark realizes that he has just signed his own death warrant. That night, he nervously enters his quarters, and within moments, he arrives at the Ferengi version of the afterlife — the Divine Treasury. Apparently, Garak was true to his word — Quark didn't feel a thing.
After much thought, Kira moves in with the O'Briens so that their unborn child can be close to them. Back in the Treasury, Quark meets Gint, the First Grand Nagus, who looks strangely like his brother, Rom, and reveals that this is actually a dream. He urges Quark to break the contract with Brunt, stating that the Ferengi Rules of Acquisition are only guideposts. Then Brunt appears to remind Quark of the consequences involved with not honoring the contract — including poverty and exile from Ferenginar. Quark awakens from the dream, realizing what he must do. He finds Brunt at the bar and returns the 500 bars of latinum, plus interest. Brunt seizes Quark's assets, leaving him with nothing but the empty bar. But later, Sisko, Bashir, Dax, Odo, and many others step in to help, filling up the bar again and letting Quark know he still has the most valuable asset of all — friends.