6 ms·
How do you model a bank making a loan, where the bank creates the money out of nothing and the accounting appears backwards? The equivalent of DR @my_bank:loan
by neilwilson 2y ago
How do you model a bank making a loan, where the bank creates the money out of nothing and the accounting appears backwards?
The equivalent of DR @my_bank:loans_made 10000, CR @my_bank:1234 10000
- superzamp 2y agoYeah that's a good question, you'll want to leverage the `overdraft` functionality for that, enabling the account end balance to go below zero. So you could do something like: send [USD/2 10000] ( source = @my_bank:loans_made allowing unbounded overdraft destination = @my_bank:1234 ) With the post-transaction balance of @my_bank:loans_made becoming [USD/2 -10000]. So that's for creating money out of nothing. There's a little bit more to it if you want to create accounting-perfect entries, but a simple way to map src/dest to cr/dr entries is to say that every credit becomes a destination, and every debit becomes a source. You can then consider debit normal accounts as having their debit balance being equivalent to the sum of entries where the account is source, their credit balance as the sum of entries where the account is destination—and do the opposite for credit normal accounts. We've written a bit more about it here [1]. [1] https://docs.formance.com/ledger/advanced/accounting/credit-debit-to-src-dest https://docs.formance.com/ledger/advanced/accounting/credit-...
- neilwilson 2y agoThat’s helpful. How about Nostro and Vostro accounts used as the balancing item with sub-ledgers like agency banks. (In essence memorandum accounts on a control account) How would you handle a three legged agency bank transaction as you get in a BACS file (source, Nostro, destination).
- neilwilson 2y agoThat’s helpful. How about Nostro and Vostro accounts used as the balancing item with sub-ledgers like agency banks. (In essence memorandum accounts on a control account) How would you handle a three legged agency bank transaction as you get in a BACS file (source, Nostro, destination)?