Shimon, in Eretz Yisrael, makes a purchase on behalf of Reuven, in the diaspora. For Reuven the cost of paying in shekels would be quite high, but Shimon can receive the payment in another currency and pay a much smaller fee to convert the money to shekels. They therefore agree that, to minimize the total cost, Reuven will pay the amount due plus an amount that covers Shimon's cost to convert the money once he receives it. Naturally, both of them want to avoid any problems with ribbit while ensuring that Shimon isn't underpaid. This is not a loan; Shimon is acting as an agent for Reuven to make a purchase that Reuven cannot make directly.
First question: If one of the parties ends up profiting from the transaction because of currency fluctuations, is there a concern about ribbit? Or is ribbit only about loans, not cases where you ask somebody else to make a purchase for you? This might be different because the point of a loan is for the borrower to make use of the money, while here that's more of a side-effect.
If agency is the same as lending with respect to this, then would the answers to this question apply to the currency-conversion aspect of the repayment?
Second question: If agency is not the same as a loan, does halacha have anything to say on how they should decide what currency-conversion rate to use? The rate on the day of the purchase? On the day the funds are sent? The average rate over some recent period of time? Something else?
(I am not asking for a practical ruling, but rather for the halachot that would inform the decision.)