Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add refillable streams #30

Open
TomAFrench opened this issue Apr 5, 2020 · 0 comments
Open

Add refillable streams #30

TomAFrench opened this issue Apr 5, 2020 · 0 comments
Labels
contracts enhancement New feature or request future Long term goals react-app

Comments

@TomAFrench
Copy link
Owner

Using essentially the same method for withdrawals but in reverse it's possible to refill a stream without needing to create a new one by just pushing out the stream's finish time.

There are some issues that crop up if the stream has already finished:

  1. If the stream is fully withdrawn, the current value:time ratio can't be maintained while adding funds
  2. If the stream isn't fully withdrawn but the end time has passed, refilling the stream potentially makes a large chuck of the extra money instantly available to the recipient unexpectedly.

For 1, this can be resolved by simply overwriting the stream's information with a new one. Likely this raises new issues (such as difficult to get a history of past streams) for little benefit.

For 2, lastWithdrawnTime could be brought forward to compensate for this but it brings in additional complexity again for not much benefit.

It's probably best to just require the creation of a new stream in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts enhancement New feature or request future Long term goals react-app
Projects
None yet
Development

No branches or pull requests

1 participant