Let's say, hypothetically, we have the following imbalanced exchange rates:
1USD = 1.2EUR
1.2EUR = 1000 JPY
1000 JPY = 1.5 USD
Let's say person A starts off with 1 USD, buys 1.2 EUR from B, then buys 1000 JPY from C with the 1.2 EUR, then finally buys 1.5 USD from D with the 1000 JPY.
Person A now has .5 more USD than they started with. Where did the .5 USD come from? Who lost that equivalent amount? Does it depend on the exchange rates before and after this imbalance happens?