[Contracts] Add unit tests for cliff_time edge cases (cliff == start_time and cliff == stop_time)
Overview
In contracts/stream_contract/src/test.rs, cliff vesting is tested for standard midpoint cliffs, but boundary conditions where cliff_time == start_time and cliff_time == stop_time lack dedicated unit tests.
Problem
- Boundary timestamps in cliff schedules must be verified to ensure 0-second cliffs vest immediately and full-duration cliffs unlock 100% of funds at
stop_time.
Proposed Changes
- Add two unit tests in
contracts/stream_contract/src/test.rs:test_cliff_at_exact_start_time_vests_linearlytest_cliff_at_exact_stop_time_unlocks_all_at_end
- Verify
balance_ofandwithdrawbehavior before, at, and after the boundary timestamps.
Acceptance Criteria
- [ ] Both boundary unit tests added and passing via
cargo test. - [ ] Verifies exact vested balances at
start_time, midpoint, andstop_time.
@Muyideen-js has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi, I can fix this
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Muyideen-js to this issue.
@innocentharuna has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
hey maintainer, please kindly assign this to me, i can surely fix it
ℹ️ Repo Maintainers: To accept this application, review their application or assign @innocentharuna to this issue.
@Alosnireda has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Assign to me
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Alosnireda to this issue.
@VeronicDev has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello Maintainer, I can fix this please assign.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @VeronicDev to this issue.
@CollinsKRO has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi Maintainer, I can fix this pls assign. ETA 5hrs
ℹ️ Repo Maintainers: To accept this application, review their application or assign @CollinsKRO to this issue.
Congratulations, @Alosnireda! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @Alosnireda: 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 🌊
This issue has been completed by @Alosnireda as part of the Stellar Wave Program's 10th Wave 🥳
😎 @Alosnireda: 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.