Skip to content

Commit

Permalink
docs: explain Lockup more explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg committed Aug 31, 2023
1 parent 2ffacbf commit 14acc0c
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions docs/concepts/protocol/02-stream-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ title: "Types of Streams"

import FunctionPlot from "@site/src/components/FunctionPlot";

## 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.

Let's take an example. Imagine Alice wants to stream 3,000 DAI to Bob during the whole month of January.

1. Alice deposits the 3,000 DAI in Sablier before Jan 1, setting the end time to Feb 1.
2. Bob's allocation of the DAI deposit increases every second beginning Jan 1.
3. On Jan 10, Bob has earned approximately 1,000 DAI. He can send a transaction to Sablier to withdraw the tokens.
4. If at any point during January Alice wishes to get back her tokens, she can cancel the stream and recover what has
not been streamed yet.

## Lockup Linear

Lockup Linear streams are the simplest type of stream in Sablier. The streamed amount over time follows a straight line
Expand All @@ -17,13 +30,6 @@ With this type of stream, the payment rate remains constant, meaning that the sa
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.

:::tip

You will often hear the term **"Lockup"** when dealing with Sablier. This is a term coined by us to describe the
requirement that the sender must lock up a certain amount of assets at the beginning of the stream.

:::

### Cliffs

It is possible to attach a "cliff" to a Lockup Linear stream, which sets a cut-off point for releasing assets. Prior to
Expand Down

0 comments on commit 14acc0c

Please sign in to comment.