Skip to main content

Diagrams

Token Flows

tip

If you are interested into creating a stream with non-transferrable tokens, make sure to whitelist both BatchLockup and Lockup contracts.

Creating a Single Stream

Creating a Batch of Streams

Storage Layout

Common

Lockup is a singleton contract that stores all streams created by that contract's users. The following diagrams provide insight into the shared storage layout of each stream. To see the full list of storage variables, check out this reference.

Each amounts storage is made of the following components:

info

Each stream belongs to one of the three models: Linear, Dynamic and Tranched. Each of these model has its own storage as outlined below.

Linear Stream

Apart from the above storage layout, Linear stream requires storing unlock amounts and cliff time.

Dynamic Stream

Similarly, Dynamic stream requires an array of segments.

Where each segment is made of three components:

Tranched Stream

A Tranched stream requires an array of tranches.

Where each tranche is made of two components: