Skip to content

fix(frontend): cap cashflow projections at each stream's remaining deposit (#1705) - #1716

Merged
blurbeast merged 2 commits into
LabsCrypt:mainfrom
intelliDean:fix/1705-cap-cashflow-projections
Oct 22, 2026
Merged

blurbeast merged 2 commits into
LabsCrypt:mainfrom
intelliDean:fix/1705-cap-cashflow-projections

Conversation

@intelliDean

@intelliDean intelliDean commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1705

Summary

  • Tracks remaining deposit per stream throughout the projection horizon.
  • Capped daily contributions at the unvested remaining balance and ceased flow once depleted, including support for partial final days.

Testing

  • Added unit test cases in frontend/src/utils/cashflowCalculations.test.ts for 1-day funded streams over 90 days, mixed stream depletion with partial days, and outgoing stream depletion.
  • All 6 unit tests pass.

…posit (LabsCrypt#1705)

- Track remaining unvested deposit for each stream throughout the projection horizon
- Cap each stream's daily contribution to its remaining deposit and stop flow once depleted
- Support partial final day contributions when remaining balance is less than a full day's rate
- Add tests covering single-day-funded incoming streams over 90 days, mixed stream depletion timelines with partial days, and outgoing stream balance exhaustion
@intelliDean intelliDean changed the title fix(frontend): cap cashflow projections at each stream's remaining de… fix(frontend): cap cashflow projections at each stream's remaining deposit (#1705) Oct 21, 2026
@blurbeast
blurbeast merged commit d471d9c into LabsCrypt:main Oct 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] Cap cashflow projections at each stream's remaining deposit

2 participants