We have several functions to run against the set of BRICS countries. The visitor pattern executes sequential functions against a set of hetereogenous objects (realms) which support the function signatures. For now, assume the visitor runs continously as a background process.
- Collect transaction data
- Calculate exchange rates
- Rebalance reserve pools
Let's derive the 1st version of the visitor methods.
- getTxs() - returns a set of transactions (timestamp, orderID, amount, payerRealm, payeeRealm)
- setFXRates() - sends a set of exchange rates (realmID, number). Each realm maintains its own exchange rates so they can free-float between realms and even run assymmetrical rates between two realms. There's an arbitrage here eventually.
- debitPool(realmID) - removes a count from pool total, adds same count to realm of origin
REALM
Needs two methods on Realm - SendTx() and AcceptTx() but I don't have them figured out yet.
Comments