Skip to content

enhancement: create_stream/create_streams_batch don't reject start_time/cliff_time in the past #221

Closed

Description

@Austinaminu2

Problem

Neither create_stream nor create_streams_batch (contracts/streaming/src/lib.rs:387-632) validates that start_time (or cliff_time) is >= now. There's no test covering this case.

Impact

A sender can backdate start_time (and/or cliff_time) into the past so that a large chunk of the deposit unlocks immediately upon creation, bypassing the vesting UX entirely. For payroll/grant/vesting use cases — the contract's stated purpose — this defeats the whole point of "unlocks continuously by the second," and could be used to mislead a recipient about the vesting schedule they're agreeing to (e.g. a UI showing a multi-year vest that's actually mostly unlocked on day one).

Suggested fix

Add a check in create_stream/create_streams_batch that rejects start_time < ledger_timestamp() (and/or cliff_time < start_time), returning a typed StreamError. Add tests covering backdated start_time and backdated cliff_time.

Location

  • contracts/streaming/src/lib.rs:387-632 (create_stream, create_streams_batch)

Activity

  1. whiteghost0001 commented on Aug 20, 2026

    @whiteghost0001

    am a blockchain dev , i would love to work on this issue and summit pr within few days. clean code

  2. Aswumi commented on Aug 27, 2026

    @Aswumi

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

    Hello maintainer, I can fix this

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

  3. baling-1 commented on Aug 27, 2026

    @baling-1

    @baling-1 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    Hello, I’m interested in taking this issue. I’ve reviewed the description and would appreciate being assigned so I can begin working on it

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

  4. davidsoniaudin2-oss commented on Aug 27, 2026

    @davidsoniaudin2-oss

    @davidsoniaudin2-oss has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    sir i can work on this issue sir

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

  5. drips-wave commented on Aug 27, 2026

    @drips-wave

    Congratulations, @davidsoniaudin2-oss! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

    🧑‍💻 @davidsoniaudin2-oss: 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 🌊

  6. grantfox-oss commented on Aug 27, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @davidsoniaudin2-oss's PR #697 was approved and merged by @Austinaminu2.

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

    👏 Great work, @davidsoniaudin2-oss! Keep contributing to FlowwStar.

  7. drips-wave commented on Aug 27, 2026

    @drips-wave

    This issue has been completed by @davidsoniaudin2-oss as part of the Stellar Wave Program's 8th Wave 🥳

    😎 @davidsoniaudin2-oss: You earned 200 Points for completing this issue! After the current Wave ends, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestsecuritySecurity improvementssmart-contractSoroban smart contract

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions