Smart settlement
An algorithm that produces the minimum number of transactions needed to settle all balances in a group.
Definition
Smart settlement (also called 'simplified debts' by Splitwise, 'optimal settlement' by EvenRound) is the algorithmic process of taking a set of group balances - where each member is either net-positive (owed money) or net-negative (owing money) - and producing the minimum-transaction payment plan that zeros every balance. The naive approach is for everyone who owes money to pay everyone they owe directly, but that produces too many transactions in a group of 4+. The smart approach uses greedy debt minimization: at each step, settle the largest debtor against the largest creditor. The result is a plan with at most n−1 transfers, where n is the number of members with non-zero balances. This is mathematically optimal in the sense of minimizing transaction count, though not always optimal in the sense of who-pays-whom from a social-graph perspective.
Examples
- Group of 4 with balances: Anna +€60, Ben −€40, Cara −€30, Diego +€10. Naive: 4 separate transfers. Smart: Ben pays Anna €40, Cara pays Anna €20 + Diego €10. Two transfers instead of four.
- In a group of 8 with mixed balances, smart settlement typically produces 4-6 transfers instead of 12-15. The savings compound.
- Smart settlement does not consider 'who would prefer to pay whom' - it's purely a count-minimisation. If your group prefers everyone to pay one specific 'banker' member, you can configure that manually as a 'star pattern' instead.