description |
---|
Superfluid's contract template for simplifying automation of stream start and end dates |
The Stream Scheduler allows you to:
- Schedule when an existing stream is to be closed
- Schedule when to start a new stream
- Schedule when to start a new stream and when that new stream is to be closed
This feature can be be used directly in the Superfluid Dashboard after getting approved for access or by making use of the underlying contracts in conjunction with off-chain automations (detailed in documentation here).
If you have an intended end date and/or start date for a stream, instead of having to manually trigger the action, you could use the Stream Scheduler to automatically trigger the action at the desired time. This is especially useful in the case of streaming payroll, subscriptions and token vesting.
Superfluid streams are perpetual by default - they run until you cancel them or you run out of balance. If you want to be streaming someone tokens for a fixed duration and not have to deal with manually triggering the creation or deletion of the stream, the Stream Scheduler is the solution.
(view these Miro diagrams here)
1. It’s January 1st. You give the Stream Scheduler contract operator permissions and then schedule a stream with the below details:
Flow Rate: 100 DAIx/mo.
To: Alice’s account
Start: March 1st, 2023 at 12:00am
End: March 20th, 2023 at 12:00am
2. March 1st comes and the stream is initiated from you to Alice.
3. March 20th comes and the stream from you to Alice is cancelled.
{% embed url="https://superfluidhq.notion.site/Setting-Up-Stream-Scheduling-551888de690e402caee50e8d87cb6930" %}