Summary
Handwritten notes on accounting, ledgers, balances, and payments.
Summary#
Accounting Principals#
- Double entry: recorded in more than one account.
- account: isolated pool of values.
- ledger: holding transactions along with timestamps, organized by accounts, [unclear: responde to what is the balance of this acc] [cut off].
- Transaction: atomic event and immutable.
- NOTE: does not [unclear: explain] decrease one and increase the other... [cut off]
- Balance is immutable should be calculated from transaction [cut off].
- Debit: usage of money.
- Credit: source of money.
- Perspective matter
- Assets: debit normal, funds you own.
- Liability: credit normal, funds you owe.
- Equity: credit normal, funds you owe to owner.
- Revenue: credit normal, funds gained in course of business.
- Expenses: Debit normal, funds spent in course of business.
- Book Keeping system: each movement of money has an equal opposite.
- entryset: a group of ledger entries which are operations that represent one transaction.
- addresses: are for flexibility, for adaptation not storage returns the definitions. Private can't be acced publicly.
- endpoints: The logic that uses definitions of the addresses then decides what to do based on...
- Balances type:
- customer facing balance: Positif/negatif the value of Balance [cut off] pointing to entries.
- Interest chargable balance: only committed pointing to owed entries.
- NOTE: BOTH types can point on same entry.
- Axis of ledger service: Committed / Reporting and flake: a computed timestamps.
- Shelves: are a set of books. contain multiple books.
- book: is a holder containing a unique Id, owner, type and balance and are immutable to track financial transaction at scale.
- Journal: contain all the transaction chronologically isolated from the hierarchy but linked organized by timestamp respond what happened and when.
- flake: a computed combination of timestamp and...
- ACH Transfer: stands for Automated clearing house transfer and it's a network.
- Authorize the Transfer.
- Bank A creates an ACH payment instruction.
- The ACH operator (Federal Reserve or Clearing House) processes and sort the payement.
- Bank B receives the instruction.
- Bank B credits the recipient's account.
- payout: money going out of the system.
- Payin: money coming into the system.
- idempotency keys: unique identifier for each transaction.
- exponential backoff: incrementing the delays exponentially between em.
- random jitters: random delays between retries.
| Double entry | consistency, safety. |
| Accounts | required for design. |
| Ledger | organization, flexibility, scalability. |
| Transactions | necessary. |
| immutability | consistency, safety. |
| Debit/credit/asset/liability/expenses/revenue | financial principals. |
| Entry sets | flexibility, organization. |
| Endpoints | executing. |
| Balance Type | organisation, accuracy, safety. |
| Timestamps | sorting, accuracy. |
| shelves and books | organization, scalability, flexibility. |
| Journal | safety, ensuring. |
| idempotency keys | accuracy, uniqueness. |
| Exponential backoff and random jitters | infrastructure. |
| Payout/payement | accuracy, organization. |
- Committed: entry stored in ledger. Timestamp recorded.
- Reporting: when entry has an accounting impact or Transaction was created.
- idempotency: event happens once even if triggered multiple times. (keys)
- customer facing balance: available balance reflecting real-time transactions.
- Interest chargeable balance: transaction yet to settle excluding pending.
- all-time rule: sum (debit, credit) = 0 - no matter what.