Diplomatic agreements between nations throughout history. Your land has water, mine has food, we set the value of trade and baseline the currency. The unavoidable cost is the minimum time and labor to transport and extract the resources.
The supply and demand indirectly adjust the transaction prices through multiple layers of exchange. Hence the border tariffs having an impact on exchange rate.
When?!
> futures market obfuscated that and is controlled by a central bank
Where? FX trading in open capital account economies are between lightly and unregulated.
> sure population density is a variable in this equation as well
Total factor productivity [1].
[1] https://en.m.wikipedia.org/wiki/Total_factor_productivity