Ugrasravas himself had heard the story from, sage Vaisampayana, when he dictated it to King Janamajeya, when it was only 22000 verses, during the ritual of snake sacrifice conducted by the King.

Vaisampayana himself was a disciple of Krishna Dwaipayana, the author of the 8000 verse core of mahabharata.

Janamajeya was the direct descendant of the Pandavas.. He was the grandson of Parikshit, the son of Abhimanyu, who was the son of Arjuna, the third Pandava.