flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

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

Open K1NGD4VID opened this issue 1 month ago • 6 comments

Labels: bug, frontend, points: 150 File/location: frontend/src/utils/cashflowCalculations.ts:29

Description: Projection adds a full day's rate for every active stream on every future day without tracking remaining balances. An incoming stream with only one day funded continues generating income across a 90-day chart.

Acceptance Criteria:

  • [ ] Limit each stream's projected contribution to its unvested remaining deposit and stop its flow after depletion.
  • [ ] Test a one-day-funded incoming stream over 90 days and mixed streams that deplete on different days, including a partial final day.

Notes: Executed projectCashflow: a stream funded with 86400 units at one unit/second projected 259200 units by day three.

Audited commit: 649b6976a100fd964ce191428eef1faeb50aaa39. Closest prior issues reviewed: #1197. This report concerns the specific failure or uncovered test paths described above, rather than repeating the original feature request.

K1NGD4VID avatar Oct 21 '26 17:10 K1NGD4VID

@auwalsaidu92 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

‎Hello Maintainer, I went through the issue description and relevant parts of the codebase. I understand the requirements and have a clear direction for implementing the fix.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @auwalsaidu92 to this issue.

auwalsaidu92 avatar Oct 21 '26 20:10 auwalsaidu92

@lucredtech has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Could I take this? In cashflowCalculations.ts I'll track each stream's remaining unvested deposit, cap its daily contribution to what is left and stop it once depleted, with a test for a one-day-funded incoming stream over the 90-day chart. Quick PR.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @lucredtech to this issue.

lucredtech avatar Oct 21 '26 22:10 lucredtech

@intelliDean has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

I'd like to work on this issue

ℹ️ Repo Maintainers: To accept this application, review their application or assign @intelliDean to this issue.

intelliDean avatar Oct 21 '26 22:10 intelliDean

Congratulations, @intelliDean! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

🧑‍💻 @intelliDean: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Oct 21 '26 22:10 drips-wave[bot]

🎉 This issue has been marked as completed on GrantFox!

@intelliDean's PR #1716 was approved and merged by @blurbeast.

🏆 @intelliDean: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (175 total points). Track your full progress on GrantFox.

👏 Great work, @intelliDean! Keep contributing to LabsCrypt.

grantfox-oss[bot] avatar Oct 22 '26 05:10 grantfox-oss[bot]

This issue has been completed by @intelliDean as part of the Stellar Wave Program's 10th Wave 🥳

😎 @intelliDean: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Oct 22 '26 05:10 drips-wave[bot]