Core Problem
- Group expenses after trips/dinners create complex "who owes whom" situations
- Naive 1:1 settlement for 5 people = up to 10 transfers
- Circular debts (A→B→C→A) cause unnecessary transfers
- Manual calculation becomes exponentially complex
Solution: Graph Algorithm Optimization
1. DebtEdge Graph Modeling
Model debt as a directed graph where nodes represent people and edges represent debts.
A ──500K──→ shared
B ──250K──→ shared
C ──100K──→ A
Graph: nodes = {A, B, C, D, E}, edges = debt relationships
2. Cycle Detection & Resolution
Use DFS to detect circular debts, then subtract the minimum amount in each cycle to eliminate unnecessary transfers.
Before: A →100K→ B →80K→ C →50K→ A (circular)
Subtract min(100, 80, 50) = 50K from cycle
After: A →50K→ B →30K→ C (cycle resolved)
3. Minimum Cash Flow Algorithm
Calculate net balance per person, split into debtors and creditors, then perform optimal matching.
Time complexity: O(E + N log N)
Concrete Example
Scenario: 5 friends travel together. A pays 500K for lodging, B pays 250K for dinner, C already sent 100K to A.
Before Optimization
4 separate transfers needed to settle all debts.
After Optimization
Net balances:
A: +300K (creditor)
B: +200K (creditor)
C: -100K (debtor)
D: -150K (debtor)
E: -150K (debtor)
Optimized transfers:
C → A: 100K
D → A: 150K
E → A: 50K
E → B: 100K
Result: 3 transfers (25% reduction)
Key Differentiators
1. Algorithm + Payment Integration
Splitwise has the algorithm but no native payments. Toss/KakaoPay have payments but no algorithm. N-Split has both — one-click optimal settlement.
2. Visual Understanding
Interactive graph animation showing the debt simplification process step by step.
3. Context Preservation
"Pay C 150K (includes A's lodging 100K + B's dinner 50K)"
Each optimized transfer shows the original transaction breakdown so users understand why they are paying whom.
4. Korean Market Focus
Presets for company dinners, trips, and clubs. KakaoTalk sharing for group invites.
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | React 19 |
| Backend | Express.js + TypeScript |
| Database | PostgreSQL |
| ORM | Prisma |
| Job Queue | BullMQ + Redis |
| Real-time | WebSocket |
Council Discussion Highlights
- Strength: Mathematically guaranteed minimum transfers
- Critical weakness: Loss of transaction context — "why am I paying C when I ate with B?"
- Solution: Show original transaction breakdown alongside optimized result