Malik said, "There is no harm in a person who has borrowed gold, silver, food, or animals, taking to the person who lent it, something better than what he lent, when that is not a stipulation between them nor a custom. If that is by a stipulation or promise or custom, then it is disapproved, and there is no good in it."
He said, "That is because the Messenger of Allah (ﷺ) discharged his debt with a good camel in its seventh year in place of a young camel which he borrowed, and Abdullah ibn Umar borrowed some dirhams, and repaid them with better ones. If that is from the goodness of the borrower, and it is not by a stipulation, promise, or custom, it is halal and there is no harm in it."
Arabic : Book 31, Hadith 1377