Paying back a loan in a different currency according to the exchange rate
Q: Bakr and Zaid are travelling in a foreign country. Zaid takes a loan of 100 USD from Bakr. Bakr makes the condition that when they return to South Africa, Zaid must not pay him 100 USD, but rather the equivalent of 100 USD in South African rands. The equivalent of the 100 USD will be based on a mutually agreed exchange rate decided by Zaid and Bakr when they return to South Africa. Is this type of transaction permissible?