Skip to content

Commit

Permalink
refactor: singular protocol (#264)
Browse files Browse the repository at this point in the history
* refactor: singular protocol

* fix: fix PR issues
  • Loading branch information
PaulRBerg authored Feb 11, 2025
1 parent 73654a6 commit 0dcf40e
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion docs/apps/guides/02-url-schemes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cover a number of resource locators used by the apps, as well as dive into how y

### Elements

Every stream created through the Sablier Protocols is identified through three parameters:
Every stream created through the Sablier Protocol is identified through three parameters:

- a **chainId** (e.g., `1` for Ethereum, `10` for [OP Mainnet](https://chainlist.org/) )
- an **alias** (e.g., `LK`) OR a **contract** (e.g. `0x12..AB`)
Expand Down
76 changes: 40 additions & 36 deletions docs/concepts/01-what-is-sablier.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,64 +10,54 @@ import ReleaseHistoryFlow from "@site/docs/snippets/ReleaseHistoryFlow.mdx";
import ReleaseHistoryLegacy from "@site/docs/snippets/ReleaseHistoryLegacy.mdx";
import ReleaseHistoryLockup from "@site/docs/snippets/ReleaseHistoryLockup.mdx";

Sablier is the powerhouse of token distribution protocols. We build decentralized applications to distribute your tokens
from one account to another, in realtime.
Sablier is a powerful onchain token distribution protocol. Here are some key definitions:

- **The Sablier Protocols**: A collection of persistent, non-upgradeable smart contracts to facilitate streaming of
ERC-20 tokens on Ethereum and other EVM blockchains. The Sablier Protocols consist of Lockup, Merkle Airdrops and
- **The Sablier Protocol**: A collection of persistent, non-upgradeable smart contracts to facilitate streaming of
ERC-20 tokens on Ethereum and other EVM blockchains. The Sablier Protocol consists of Lockup, Merkle Airdrops, and
Flow.
- **The Sablier Interface**: A web interface that allows for easy interaction with the Sablier Protocols. The interface
is only one of many ways to interact with the Sablier Protocols.
- **Sablier Labs**: The company that develops the Sablier Protocols, the Sablier Interface, and the documentation
website you are reading right now.
- **The Sablier Interface**: A web interface that allows for easy interaction with the Sablier Protocol. The interface
is only one of many ways to interact with the Sablier Protocol.
- **Sablier Labs**: The company that develops the Sablier Protocol, the Sablier Interface, and the documentation website
you are reading right now.

:::info

Fun fact: "sablier" means "hourglass" in French.

:::

## Sablier Protocols
## Sablier Protocol

Sablier protocols are a collection of token distribution protocols developed with [Ethereum](https://ethereum.org/)
smart contracts, designed to facilitate by-the-second payments for cryptocurrencies, specifically
[ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) tokens. The protocols employ a set of
A software protocol built with [Ethereum](https://ethereum.org/) smart contracts, designed to facilitate distribution of
[ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) tokens. The protocol employs a set of
persistent and non-upgradable smart contracts that prioritize security, censorship resistance, self-custody, and
functionality without the need for trusted intermediaries who may selectively restrict access.

Currently, it consists of three protocols: **Lockup** to facilitates vesting and airstreams, **Merkle Airdrops** to
enable on-chain airdrops and **Flow** for payroll, grants etc. All of these are licensed under BUSL-1.1, and are
open-source and can be accessed on Sablier's [GitHub page](https://github.com/sablier-labs). Detailed technical
reference for each protocol can be found in the [Technical References](/reference/overview) section of this website.
Currently, Sablier consists of three separate systems:

As long as Ethereum and the other EVM chains continue to exist, every version of Sablier protocols that gets deployed
- **Lockup**: facilitates vesting and vested airdrops
- **Merkle Airdrops**: enables on-chain airdrops
- **Flow**: for payroll, grants etc.

While most of these are licensed under BUSL-1.1, there are some components licensed under GPL v3. The source code can be
accessed on Sablier's [GitHub account](https://github.com/sablier-labs), and a detailed technical reference can be found
in the [Technical References](/reference/overview) section of this website.

As long as Ethereum and the other EVM chains continue to exist, every version of the Sablier Protocol that gets deployed
will operate continuously and without interruption, with a guarantee of 100% uptime.

:::info

Sablier is the first token streaming protocol ever built, tracing its roots back to 2019.
Sablier is the first project to enable token streaming in the Ethereum ecosystem, tracing its roots
[back to 2019](https://x.com/Sablier/status/1205533344886411264).

:::

## How does Sablier differ from traditional payment systems?

To understand the unique characteristics of Sablier, it is helpful to examine two aspects: the concept of streaming as
an alternative to conventional payment methods, and the permissionless nature of the protocol compared to traditional
systems.

### Streaming vs conventional payments

Traditional payment systems generally involve lump-sum transfers, which rely on trust between parties, have slow
processing times, and are prone to errors. In the context of bank transfers, payments are also subject to substantial
fees and can face delays due to intermediaries.

By contrast, Sablier introduces the concept of token streaming, enabling users to make continuous, real-time payments on
a per-second basis. This innovative approach enables seamless, frictionless transactions and promotes increased
financial flexibility for users, businesses, and other entities. Sablier makes the passage of time itself the
trust-binding mechanism, unlocking business opportunities that were previously unavailable.

A good mental model to contrast streaming with conventional payment models is to view the former as "real-time finance"
or "continuous finance", and the latter as of "discrete finance".
To understand the unique characteristics of Sablier, it is helpful to examine two aspects: the permissionless nature of
the protocol compared to traditional payment systems, the concept of streaming as an alternative to conventional payment
methods.

### Permissionless systems

Expand All @@ -85,9 +75,23 @@ As an immutable system, the Sablier Protocol is non-upgradeable, meaning that no
transactions, or alter the users' streams in any way. This ensures the system remains transparent, secure, and resistant
to manipulation or abuse.

### Streaming vs conventional payments

Traditional payment systems generally involve lump-sum transfers, which rely on trust between parties, have slow
processing times, and are prone to errors. In the context of bank transfers, payments are also subject to substantial
fees and can face delays due to intermediaries.

By contrast, Sablier introduces the concept of token streaming, enabling users to make continuous, real-time payments on
a per-second basis. This innovative approach enables seamless, frictionless transactions and promotes increased
financial flexibility for users, businesses, and other entities. Sablier makes the passage of time itself the
trust-binding mechanism, unlocking business opportunities that were previously unavailable.

A good mental model to contrast streaming with conventional payment models is to view the former as "real-time finance"
or "continuous finance", and the latter as of "discrete finance".

## Where can I find more information?

For more details on the Sablier Protocols, their features, and potential use cases, explore this documentation site and
For more details on the Sablier Protocol, its features, and potential use cases, explore this documentation site and
visit the official [Sablier website](https://sablier.com) as well.

:::tip
Expand Down
5 changes: 2 additions & 3 deletions docs/concepts/07-nft.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ some of the marketplaces that support Sablier streams:
The SVG artwork is generated using certain real-time values, such as the current time on the blockchain. However, NFT
marketplaces cache the NFT metadata, and this may cause the SVGs might not always be up to date.

Sablier Protocols trigger [ERC-4906](https://eips.ethereum.org/EIPS/eip-4906) events whenever there's an update in a
stream (for instance, when a withdrawal is made). However, it's worth noting that some streams might remain unchanged
for an extended period.
The Sablier Protocol triggers [ERC-4906](https://eips.ethereum.org/EIPS/eip-4906) events whenever there's an update in a
stream (for instance, when a withdrawal is made). However, some streams might remain unchanged for an extended period.

To ensure you're viewing the most recent version of the NFT SVG, it's recommended to check the stream directly via the
[Sablier Interface](https://app.sablier.com).
13 changes: 6 additions & 7 deletions docs/concepts/10-governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ sidebar_position: 10
title: "Governance"
---

The Protocol Admin is an account with exclusive access to specific functions of the protocols. More concretely, the
Admin is a collection of multisig wallets and EOAs currently in control of Sablier Labs.
The Protocol Admin is an account with exclusive access to specific functions. More concretely, the Admin is a collection
of multisig wallets and EOAs currently in control of Sablier Labs.

## Admins

Here are the addresses that are the protocols admin for the Sablier Protocols. Most of them are Safe multi-signature
wallets.
Here's a table with the admins of the Sablier Protocol. Most of them are Safe multi-signature wallets.

| Chain | Address |
| :-------------- | :------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -69,10 +68,10 @@ Admin has the following permissions on each chain where `Flow` is deployed:

## Trustlessness

Despite having an admin, the Sablier Protocols remain trustless. Here are the reasons why:
Despite having an admin, the Sablier Protocol remains trustless. Here's why:

1. The protocols are permissionless, i.e. it can be freely accessed by anyone with an Internet connection.
2. The protocols are persistent, i.e. the admin cannot pause it.
1. The protocol is permissionless, i.e. it can be freely accessed by anyone with an Internet connection.
2. The protocol is persistent, i.e. the admin cannot pause it.
3. The streaming logic is non-upgradeable, i.e. the admin cannot tamper with the streams created by users.
4. There are no escape hatches that allow the admin to claim user funds.
5. There is a hard-coded upper limit of 10% to the fees that the admin can charge.
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/12-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 12
title: "Security"
---

Ensuring the security of the Sablier Protocols is our utmost priority. We have dedicated significant efforts towards the
Ensuring the security of the Sablier Protocol is our utmost priority. We have dedicated significant efforts towards the
design and testing of the protocol to guarantee its safety and reliability.

The Sablier contracts have undergone rigorous audits by leading security experts from [Cantina](https://cantina.xyz/),
Expand All @@ -26,7 +26,7 @@ All the audits of Lockup contracts can be found [here](https://github.com/sablie

## Bug Bounty

The Sablier Protocols are subject to a bug bounty program per the terms outlined in `Security.md` of each protocol.
The Sablier Protocol is subject to a bug bounty program per the terms outlined in `Security.md` of each protocol.

- [Lockup Bug Bounty](https://github.com/sablier-labs/lockup/blob/main/SECURITY.md)
- [Merkle Airdrops Bug Bounty](https://github.com/sablier-labs/airdrops/blob/main/SECURITY.md).
Expand Down
15 changes: 7 additions & 8 deletions docs/concepts/13-glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Glossary"

## Broker

A third-party entity that interacts with the Sablier Protocols on behalf of its users, who may charge service fees for
A third-party entity that interacts with the Sablier Protocol on behalf of its users, who may charge service fees for
facilitating these interactions.

## Broker Fee
Expand Down Expand Up @@ -78,7 +78,7 @@ The amount of tokens that sender owes to the stream.

## Foundry

[Foundry][foundry] is the application development toolkit that has been used to develop the Sablier Protocols.
[Foundry][foundry] is the application development toolkit that has been used to develop the Sablier Protocol.

## Gas Fee

Expand Down Expand Up @@ -201,15 +201,15 @@ Aa data structure used to store hashes of the recipients airdrop allocations in

## PRBMath

[PRBMath][prb-math] is fixed-point arithmetic library used by Sablier protocols.
[PRBMath][prb-math] is fixed-point arithmetic library used by the Sablier Protocol for precise calculations.

## Protocol Admin

An entity with exclusive access to specific functions of the protocol.

## Real-time finance

A term coined by us in 2019 to emphasize the wide-ranging use cases for the Sablier Protocols.
A term coined by us in 2019 to emphasize the wide-ranging use cases for the Sablier Protocol.

Since the withdrawable amounts in streams are updated every second, they embody the concept of real-time financial
transactions.
Expand All @@ -218,17 +218,16 @@ transactions.

A new financial primitive that permits by-the-second payments.

Currently, Sablier offers two streaming protocols called Lockup and Flow. In Lockup, the creator has to lock up a
specified amount of tokens whereas in Flow protocol, creator is not required to lock up any amount of tokens.
Currently, Sablier offers two distribution protocols called Lockup and Flow. In Lockup, the creator has to lock up a
specified amount of tokens, whereas in Flow, creator is not required to lock up any amount of tokens.

## Streaming

By-the-second payments.

## Token

Digital tokens can exist in various forms, but the Sablier Protocols exclusively supports the streaming of ERC-20
tokens.
Digital tokens can exist in various forms, but the Sablier Protocol exclusively supports the streaming of ERC-20 tokens.

## Vesting

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/04-custom-deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { links } from "@site/src/constants";

:::info[Reach Out]

We are unable to deploy the Sablier Protocols on every EVM chain. However, we would be happy to consider your project if
We are unable to deploy the Sablier Protocol on every EVM chain. However, we would be happy to consider your project if
you fill out this <Link href={links.forms.chains}>form</Link> and meet the requirements below.

:::
Expand All @@ -25,7 +25,7 @@ you fill out this <Link href={links.forms.chains}>form</Link> and meet the requi
:::warning[LEGAL]

The following guidelines apply to you ONLY IF you have you been granted a
[BUSL license](https://app.ens.domains/license-grants.sablier.eth?tab=records) to deploy the protocols.
[BUSL license](https://app.ens.domains/license-grants.sablier.eth?tab=records) to deploy the protocol.

:::

Expand Down
7 changes: 3 additions & 4 deletions docs/guides/06-frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ id: "frontend"
title: "Frontend Integrations"
---

Throughout this series, we've been focusing on creating an onchain integration with Sablier protocols. But maybe you're
interested in developing a front-end app. No worries! In this guide, we'll provide some pointers on how to go about it.
Throughout this series, we've been focusing on creating an onchain integration with Sablier. But maybe you're interested
in developing a front-end app. No worries! In this guide, we'll provide some pointers on how to go about it.

## Toolset

There's no one-size-fits-all toolset for building front-end integrations of Sablier but for this guide we'll recommend
the following:
There's no one-size-fits-all toolset for building front-end integrations of Sablier, but we recommend using:

- [Next.js](https://nextjs.org/)
- [React](https://reactjs.org/)
Expand Down
7 changes: 3 additions & 4 deletions docs/reference/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ sidebar_position: 1
title: "Overview"
---

All Sablier protocols are a binary smart contract system comprised of many abstract contracts, libraries, and types. The
design of the Sablier smart contracts draws inspiration from the architectural principles of
[Uniswap](https://docs.uniswap.org/).
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](https://docs.uniswap.org).

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

## Lockup
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/06-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Errors"

## Background

Sablier protocols handle errors with the convenient and gas-efficient
The Sablier Protocol handles errors with the convenient and gas-efficient
[custom error syntax](https://blog.soliditylang.org/2021/04/21/custom-errors) introduced in Solidity v0.8.4.

The error data encoding is identical to the ABI encoding used for functions, e.g.:
Expand All @@ -24,7 +24,7 @@ bytes4(keccak256(bytes("SablierLockupBase_WithdrawAmountZero(uint256)")))

## Naming Pattern

With the exception of a few generics, all errors in Sablier protocols adhere to the naming pattern
With the exception of a few generics, all errors in Sablier Protocol adhere to the naming pattern
`<ContractName>_<ErrorName>`.

Incorporating the contract name as a prefix offers context, making it easier for end users to pinpoint the contract
Expand Down
Loading

0 comments on commit 0dcf40e

Please sign in to comment.