-
Notifications
You must be signed in to change notification settings - Fork 143
2. USD (synthetic or pegged to an another account)
Some recommended reading on accounting for multi currency:
Every transaction recorded in the ledger have a currency associated with them, currently either BTC or USD.
The ledger entry and different ways to go from USD to BTC are described in this file.
A good way to understand how this is supposed to work is to look at the associated tests.
When the currency is BTC, there is not much to do, BTC is the native currency of our banking application. When the currency is USD, then there is a need to get USD somewhere. It can either being created synthetically, or being bought/sell from an exchange.
For synthetic contract, this is a good starting point: https://github.com/GaloyMoney/galoy/tree/main/src/dealer
For pegging to another system (typically banking system): TBD.