There once lived in Benares a wealthy householder, worth eighty crores. He offered his wealth to the king, who, however, had no need for it; so he gave much away in gifts and was born as Sakka. Equally generous were his descendants - Canda, Suriya, Mātali and Pañcasikha. But the next in descent, Pañcasikha's son, Maccharikosiya, became a miser. He stopped all giving and lived in abject poverty. One day, seeing his sub-treasurer eating rice porridge, he wished for some himself, but, owing to his miserliness, he went in disguise to the river with a little rice and there started to cook it with the help of a slave. Sakka saw this, and, accompanied by Canda and the others, appeared before him disguised as a brahmin. Advancing towards him, Sakka asked him the way to Benares, and, pretending to be deaf, approached the place where the porridge was being cooked and asked for some. Maccharikosiya refused to give him any, but Sakka insisted on reciting to him some stanzas on the value of giving, and then Kosiya agreed to give him a little porridge. One by one the others, also disguised as brahmins, approached, and, in spite of all his efforts, Kosiya was forced to invite them to share his meal. He asked them to fetch small leaves, but in their hands small leaves became large. After the porridge had been served, Pañcasikha assumed the form of a dog, then of a horse of changing colours, and started chasing Kosiya, while the others stood motionless in the air. Kosiya asked how beings could gain such powers, and Sakka explained to him and revealed their identity. Maccharikosiya went back to Benares and gave away his wealth in charity. Later he became a hermit and lived in a hut.
At that time the four daughters of Sakka - Asā, Saddhā, Sirī and Hirī - went to Anotatta to play in the water. There they saw Nārada under a pāricchattaka-flower, which served him as a sunshade, and each asked him for the flower. Nārada said he would give it to the best of them, and referred them to Sakka. Sakka sent (by Mātali) a cup of ambrosia (sudhābhojana) to Kosiya, and said that whichever of his daughters succeeded in persuading Kosiya to share with her his drink would be adjudged the best. He listened to all their claims and decided in favour of Hirī. Sakka, wishing to know why he decided thus, sent Mātali in his chariot to ask him. While Mātali was yet speaking to him, Kosiya died and was reborn in Tāvatimsa. Sakka gave him Hirī as wife and also a share of the kingdom of Tāvatimsa.
The story was told in reference to a monk of Sāvatthi, who was so generous that he would give away his own food and drink and so starve. He is identified with Maccharikosiya, Uppalavannā with Hirī, Anuruddha with Pañcasikha, Ananda with Mātali, Kassapa with Suriya, Moggallāna with Canda, Sāriputta with Nārada, and Sakka with the Buddha himself. J.v.382 412.