Endogenizing the provision of money: Costs of commodity and fiat monies in relation to the value of trade