Skip to content

stream: no rate-change function — a stream's rate_per_second is fixed for its lifetime #619

Description

@Jaydbrown

Context
contracts/stream/src/lib.rs supports top_up, extend_duration, and top_up_and_extend (lines 427-620) but nothing that adjusts rate_per_second after initialize. Compare to governor's set_max_rate, which lets the protocol-wide cap change post-deployment.

Why it matters
A sender who wants to change a running stream's payout rate (e.g. a payroll stream adjusting for a raise) currently has no path other than cancelling and recreating the stream, which resets start_time/loses continuity and requires a fresh factory deployment + fee.

Suggested approach
Add a change_rate(env: Env, caller: Address, new_rate_per_second: i128) -> Result<(), Error> guarded by require_sender_or_operator, re-validating the overflow/InvalidAmount checks initialize already performs, and emitting a new rate_changed event.

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions