All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
While you call this transaction “lending” it is actually considered as exchange by the Sharee‘ah, because it includes exchanging cash for cash, therefore, the two offsets must be received by both parties before they depart. Imaam Ibn Al-Munthir said, “There is unanimous agreement among scholars that if the two parties, who are engaged in exchange, depart before each of them receives the offset, then the exchange is invalid.”
Thus, because an invalid exchange has taken place between the contracting parties, the claimant must be given his due right in cash, not gold, even though this was not stated in the original agreement.
Allaah Knows best.