Skip to main content

Overview

The Sablier Protocol is a smart contract system comprised of many abstract contracts, libraries, and types. The design of the smart contracts draws some inspiration from the architectural principles of Uniswap.

This section provides a detailed overview of the Sablier smart contracts, their designs, control flows, and contract references.

Lockup

Lockup Source Code

The Lockup repo consists of the Sablier Lockup contract, public libraries, Batch Lockup contract and an NFT descriptor.

BatchLockup

BatchLockup Reference

Creates multiple streams in a single transaction.

Libraries

Helpers Library

Library to validate input parameters across lockup streams.

LockupMath Library

Library to calculate vested amount across lockup streams.

NFTDescriptor

NFTDescriptor Reference

Generates the URI describing the Sablier Lockup stream NFTs.

SablierLockup

SablierLockup Reference

Creates and manages Lockup streams with three different streaming functions.

Merkle Airdrops

Merkle Airdrops Source Code

The Merkle Airdrops repo is a collection of contracts to create various kinds of airdrop campaigns. Some of these campaigns make use of the Lockup protocol to create what we call Airstreams. This repo consists of airdrops related contracts such as MerkleFactory, MerkleInstant, MerkleLL, and MerkleLT.

Factories

MerkleInstant Reference MerkleLL Reference MerkleLT Reference MerkleVCA Reference

Factory contracts to deploy various Merkle campaigns.

MerkleInstant

MerkleInstant Reference

Enables airdrop distributions where the tokens are claimed directly to the users' wallets.

MerkleLL

MerkleLL Reference

Enables airdrops with a vesting period powered by the Lockup Linear distribution model.

MerkleLT

MerkleLT Reference

Enables airdrops with a vesting period powered by the Lockup Tranched distribution model.

MerkleVCA

MerkleVCA Reference

Enables airdrops where the claim amount increases linearly until the airdrop period ends. Claiming early results in forgoing the remaining amount, whereas claiming after the period grants the full amount that was allocated.

Flow

Flow Source Code

The Flow repo consists of the Sablier Flow contract, and an NFT descriptor.

NFTDescriptor

FlowNFTDescriptor Reference

Generates the URI describing the Sablier Flow stream NFTs which, currently, is the Sablier logo.

SablierFlow

SablierFlow Reference

Creates and manages payment streams.