A repayment came in whole and left the system one cent short.
No error, no alert. The deal page looked fine, every investor saw a plausible number, and the payouts just did not add up to what the borrower had paid.
It was a rounding call inside a pro-rata split. Several investors fund one loan, a repayment lands, and each share gets rounded to the smallest currency unit. Round every share on its own and the parts stop summing to the whole. One cent per repayment, across every active deal, on every schedule date.
The money was never the problem. The damage sat downstream: reconciliation against what the bank actually settled stopped being an exact match. So someone widened the tolerance to make the report green. That is the real cost. Once you accept a tolerance, a genuinely missed payment hides inside the noise you trained yourself to ignore.
What I do differently now. Money is integers in minor units, never floats. A split function returns the parts and an explicit remainder, and it is not allowed to silently discard anything. The remainder goes somewhere by a stated rule, not by whichever row the loop happened to touch last. And the write is guarded in the same transaction: parts must sum to the total, or nothing is written.
The idea I keep coming back to: a split is not arithmetic. It is an allocation decision, and someone has to own the leftover, explicitly, in code you can point at during an audit.
If your system divides money between parties, I would want to know who owns the remainder, and whether that rule is written down anywhere outside a rounding function.