I was wondering whether anyone has developed a template of foreign currency exchange contract in Solidity. The way this could potentially work: Suppose I have a 100 Currency_X and I want to convert it into Currency_Y:
1) reads the exchange rate ether / Currency Y and ether / Currency X from a financial platform.
2) blocks that exchange rate for a period of 2-3 days
3) accepts incoming transactions from people who have Currency_Y at the predetermined exchange rate
4) if the funding target is achieved within the deadline (i.e. equivalent ether amount of 100 Currency_X), then it unlocks the transactions and releases the funds.
In essence, it would be similar to a crowdfunding exercise but with the ability to make a bilateral transfer of value and interact with the outside world to read exchange rates. Only fee to be paid would be the gas for running the contract (economical?)
Thanks - Massi