Skip to main content

Types of Streams

Lockup

"Lockup" is a higher-level category that refers to the requirement that the creator of a stream must lock up a certain amount of assets in a smart contract. All streams currently supported by Sablier are Lockup streams.

Lockup Linear

Lockup Linear streams are the simplest type of stream in Sablier. The streamed amount over time follows a straight line that goes up and to the right on a graph, which corresponds to the identity function f(x)=xf(x) = x:

With this type of stream, the payment rate remains constant, meaning that the same fraction of the deposit amount is streamed to the recipient every second. This provides greater predictability and is easy to understand because of how intuitive it is. Imagine a diagonal line going up and to the right – that's how simple it is.

info

The gas cost for this shape is approximately 152,019 on Mainnet. This may vary due to multiple factors.

Cliffs

It is possible to attach a "cliff" to a Lockup Linear stream, which sets a cut-off point for releasing assets. Prior to the cliff, the recipient cannot withdraw any assets, but the stream continues to accrue them. After the cliff, the constant payment rate per second kicks in.

This feature is especially useful for vesting ERC-20 assets as it allows you to have, for example, a 1-year cliff, and then 3 additional years of linear streaming. If the stream is for an employee, you can make it cancellable so that if the employee leaves your company during the stream, you can cancel it and recover the assets that have not yet been streamed.

info

The gas cost for this shape is approximately 152,019 on Mainnet. This may vary due to multiple factors.

Lockup Dynamic

Lockup Dynamic streams are what makes Sablier so unique, since they enable the creation of any type of streaming curve, including non-linear ones.

On the Sablier Interface, we support only some distribution shapes (the ones enumerated below), but the potential for innovation is limitless when you interact programmatically with the contracts. For example, one could design a logarithmic stream that emulates the f(x)=log(x)f(x) = log(x) function.

These streams are powered by a number of user-provided "segments", which we will cover in the next article. What is important to note here is that with Lockup Dynamic, Sablier has evolved into a universal streaming engine, capable of supporting any custom streaming curve.

note

If you are interested in learning how to programmatically create the curves shown below in Solidity, check out the examples repository.

Exponential

A fantastic use case for Lockup Dynamic is Exponential streams, a shape through which the recipient receives increasingly more tokens as time passes.

Exponentials are a great fit if you are looking to airdrop tokens, because your community members will receive the majority of the tokens towards the end of the stream instead of receiving the tokens all at once (no streaming) or in a linear fashion (Lockup Linear). This incentivizes long-term behavior and a constructive attitude.

info

The gas cost for this shape is approximately 213,610 on Mainnet. This may vary due to multiple factors.

Exponential Cliff

Another use case for Lockup Dynamic is a variation of the previous design: an Exponential Cliff.

The stream starts with a cliff (which can be how long you want), a specific amount instantly unlocked when the cliff ends, and then the rest of the stream is exponentially streamed.

This is an excellent distribution if you are a company looking to set up a token vesting plan for your employees. Your employees will have an incentive to remain with your company in the long run, as they will receive an increasingly larger number of tokens.

info

The gas cost for this shape is approximately 264,854 on Mainnet. This may vary due to multiple factors.

Unlock in Steps

Because Lockup Dynamic is so flexible, it can even be used to create a traditional vesting contract with periodic unlocks. In this case, the "streaming" rate would not be by the second, but by the week, month, or year.

After each period, a specific amount becomes unlocked and available for the recipient to withdraw. Past unlocks accumulate, so if the recipient doesn't withdraw them, they will be able to withdraw them later.

The advantage of using Unlock in Steps instead of a normal vesting contract is that Sablier automates the entire process. No more worries about setting up vesting contracts or creating a user interface for your employees to claim their tokens.

info

The gas cost for this shape is approximately 392,982 on Mainnet for four unlocks. This may vary as there are multiple factors to consider.

Monthly Unlocks

Monthly Unlocks is a special case of Unlock in Steps where assets are unlocked on the same day every month, e.g. the 1st of every month. This is suited for use cases like traditional monthly salaries or vesting plans.

Each month, on a particular day, a specific amount of tokens becomes unlocked and available for withdrawal. Like Unlock in Steps, unwithdrawn tokens will carry over to the next period, providing flexibility and control to the recipient. This shape is ideal for employers who wish to set up advanced payment schedules for their employees, offering them access to funds on a predictable, monthly basis.

info

The gas cost for this shape is approximately 803,150 on Mainnet for a period of exactly one year. This may vary as there are multiple factors to consider.

Timelock

The Timelock shape locks all tokens for a specified period. Users cannot access the tokens until the set period elapses.

Once the set period elapses, the full amount becomes accessible to the recipient. This setup is particularly advantageous for projects seeking to stabilize token pricing and minimize market volatility, encouraging investors to maintain their stake over a more extended period.

info

The gas cost for this shape is approximately 239,232 on Mainnet. This may vary due to multiple factors.

Unlock Linear

The Unlock Linear shape combines an initial immediate release of tokens with a steady, linear payout over time. This shape is ideal for employment contracts that include a signing bonus along with a regular payout schedule.

At the beginning of the stream, a fixed amount of tokens is instantly available to the recipient — this is your "signing bonus". Following this, the remaining tokens begin to stream continuously at a consistent rate until the end of the contract term — this is your "salary".

Another use case is a token distribution to investors where a particular amount gets unlocked immediately followed by a linear vesting plan.

info

The gas cost for this shape is approximately 239,232 on Mainnet. This may vary due to multiple factors.

Unlock Cliff

This shape is useful for companies who want to distribute tokens to their investors using a cliff followed by linear vesting but also want to unlock some liquidity at the beginning to be able to allow investors to bootstrap AMM pools.

Initially, a set amount of tokens are made available to the recipient as an upfront payment. After this initial unlock, the tokens are held during the cliff period until the moment of time set. The release resumes in a linearly post-cliff.

info

The gas cost for this shape is approximately 290,477 on Mainnet. This may vary due to multiple factors.