@@ -4,11 +4,22 @@ sidebar_position: 2
44title : " Stream Shapes"
55---
66
7+ import { Shape } from " sablier" ;
8+
79The stream shapes below are examples. Not an exhaustive list.
810
911The model for each shape is not a requirement, but a recommendation - for example, the Timelock shape can also be
1012implemented via Linear or Dynamic models, but is most efficient with the Tranched model.
1113
14+ :::tip
15+
16+ When creating streams programmatically, pass the corresponding ** Shape ID** (shown under each shape below) as the
17+ ` shape ` field. The Sablier app uses this ID to render the matching curve in its
18+ [ UI gallery] ( https://app.sablier.com/vesting/gallery/ ) . Install the [ ` sablier ` ] ( https://github.com/sablier-labs/sdk ) SDK
19+ to import the IDs as a typed enum (` Shape.Lockup ` ).
20+
21+ :::
22+
1223:::note
1324
1425- The code used to generate the gas benchmarks for the different stream curves can be found
@@ -18,15 +29,14 @@ implemented via Linear or Dynamic models, but is most efficient with the Tranche
1829 [ examples] ( https://github.com/sablier-labs/evm-monorepo/blob/main/misc/examples/lockup/ ) repository and the
1930 "CurvesCreator" files.
2031
21- - Using TypeScript? Install our [ ` sablier ` ] ( https://github.com/sablier-labs/sdk ) SDK package, which provides bespoke
22- types for shapes.
23-
2432:::
2533
2634## Lockup Linear
2735
2836### Linear
2937
38+ ** Shape ID:** <code >{ Shape .Lockup .Linear } </code >
39+
3040Lockup Linear streams are the simplest token distribution curve in Sablier. The streamed amount over time follows a
3141straight line that goes up and to the right on a graph, which corresponds to the identity function $f(x) = x$:
3242
@@ -44,6 +54,8 @@ The gas cost to create this shape is approximately _168,923_ on Mainnet. This ma
4454
4555### Unlock Linear
4656
57+ ** Shape ID:** <code >{ Shape .Lockup .LinearUnlockLinear } </code >
58+
4759The Unlock Linear shape combines an initial immediate release of tokens with a steady, linear payout over time. This
4860shape is ideal for employment contracts that include a signing bonus along with a regular payout schedule.
4961
@@ -80,6 +92,8 @@ The gas cost to create this shape is approximately _191,182_ on Mainnet. This ma
8092
8193### Cliff
8294
95+ ** Shape ID:** <code >{ Shape .Lockup .Cliff } </code >
96+
8397It is possible to attach a "cliff" to a Lockup Linear stream, which sets a cut-off point for releasing tokens. Prior to
8498the cliff, the recipient cannot withdraw any tokens, but the stream continues to accrue them. After the cliff, the
8599constant payment rate per second kicks in.
@@ -115,6 +129,8 @@ The gas cost to create this shape is approximately _213,708_ on Mainnet. This ma
115129
116130### Unlock Cliff
117131
132+ ** Shape ID:** <code >{ Shape .Lockup .LinearUnlockCliff } </code >
133+
118134This shape is useful for companies who want to distribute tokens to their investors using a cliff followed by linear
119135vesting but also want to unlock some liquidity at the beginning to be able to allow investors to bootstrap AMM pools.
120136
@@ -162,6 +178,8 @@ engine, capable of supporting any custom streaming curve.
162178
163179### Exponential
164180
181+ ** Shape ID:** <code >{ Shape .Lockup .DynamicExponential } </code >
182+
165183A fantastic use case for Lockup Dynamic is Exponential streams, a shape through which the recipient receives
166184increasingly more tokens as time passes.
167185
@@ -179,6 +197,8 @@ The gas cost to create this shape is approximately _219,629_ on Mainnet. This ma
179197
180198### Cliff Exponential
181199
200+ ** Shape ID:** <code >{ Shape .Lockup .DynamicCliffExponential } </code >
201+
182202Another use case for Lockup Dynamic is a variation of the previous design: an Cliff Exponential.
183203
184204<FunctionPlot
@@ -224,6 +244,9 @@ tranches article.
224244
225245### Unlock in Steps
226246
247+ ** Shape ID:** <code >{ Shape .Lockup .LinearStepper } </code > <em >(the legacy <code >{ Shape .Lockup .TranchedStepper } </code > is
248+ deprecated)</em >
249+
227250You can use Lockup Tranched to create a traditional vesting contract with periodic unlocks. In this case, the
228251"streaming" rate would not be by the second, but by the week, month, or year.
229252
@@ -266,6 +289,8 @@ multiple factors to consider.
266289
267290### Unlock Monthly
268291
292+ ** Shape ID:** <code >{ Shape .Lockup .TranchedMonthly } </code >
293+
269294Unlock Monthly is a special case of Unlock in Steps where tokens are unlocked on the same day every month, e.g. the 1st
270295of every month. This is suited for use cases like traditional monthly salaries or ESOPs plans.
271296
@@ -302,6 +327,8 @@ vary as there are multiple factors to consider.
302327
303328### Backweighted
304329
330+ ** Shape ID:** <code >{ Shape .Lockup .TranchedBackweighted } </code >
331+
305332Backweighted is a type of tranched vesting curve where the tokens are vested in a backweighted way, meaning little vests
306333early on, and large chunks vest towards the end.
307334
@@ -347,6 +374,8 @@ vary as there are multiple factors to consider.
347374
348375### Timelock
349376
377+ ** Shape ID:** <code >{ Shape .Lockup .TranchedTimelock } </code >
378+
350379The Timelock shape locks all tokens for a specified period. Users cannot access the tokens until the set period elapses.
351380
352381<FunctionPlot
0 commit comments