Rain handles off-chain ledgering using the same fundamental approach banks and accounting systems have used for centuries. Every financial movement creates balanced entries that always sum to zero: what goes out of one account goes into another.
Everything balances: Every debit has an equal credit elsewhere. The system does not allow entries that do not sum to zero.
Pending vs. Posted matters: Authorizations immediately reduce available balance (pending), then settle into posted transactions. This prevents overspending.
Full audit trail: Every entry records exactly when it happened and why, with snapshots of balances at that moment in time.
Atomic transactions: All entries for a single financial event are created together or not at all. There are no partial updates that could leave things unbalanced.