The Bodhisatta was once a merchant. One time he joined an oxcart caravan, and while in a remote area, they passed an abandoned, dried-up well. They dug at the bottom looking for water, and found jewels and precious metals instead. Though they found a lot, they wanted more and kept digging. The Bodhisatta told the others to stop because greed is the root of destruction, but they did not listen to him. Falling clods of earth caused by their digging disturbed a naga king who lived below the well, and he came out and killed them all, except the Bodhisatta. Then he and some young nagas filled all the carts with even more jewels and drove the Bodhisatta home. For the rest of his life, he used this enormous treasure for almsgiving and was known across India because of it.
In the Lifetime of the Buddha
Some merchants who were devoted followers of the Buddha, always making donations to him before and after their caravan journeys, once came upon the same abandoned well that had made the Bodhisatta rich. They also dug in it, hoping to find water, and also uncovered treasure. But they were content with what they found and did not dig deeper.
When the merchants returned home, they told the Buddha about their luck, and he told them this story so they knew that following a life of moderation was the right thing to do.
The naga king was an earlier birth of Sariputta, one of the Buddha’s top disciples.