Genesis 47:15-17

47:15 When the money from the lands of Egypt and Canaan was used up, all the Egyptians came to Joseph and said, “Give us food! Why should we die before your very eyes because our money has run out?”

47:16 Then Joseph said, “If your money is gone, bring your livestock, and I will give you food in exchange for your livestock.” 47:17 So they brought their livestock to Joseph, and Joseph gave them food in exchange for their horses, the livestock of their flocks and herds, and their donkeys. He got them through that year by giving them food in exchange for livestock.