Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
*/node_modules/
9 changes: 8 additions & 1 deletion .syncpackrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://unpkg.com/syncpack@latest/dist/schema.json",
"source": ["package.json", "airdrops/package.json", "flow/package.json", "lockup/package.json", "utils/package.json"],
"source": [
"package.json",
"airdrops/package.json",
"bob/package.json",
"flow/package.json",
"lockup/package.json",
"utils/package.json"
],
"semverGroups": [
{
"label": "Use exact versions",
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Smart contracts for Sablier token streaming protocols.

```
├── airdrops/ # Merkle-based token distribution
├── bob/ # Price-target vaults with yield adapters
├── bob/ # Price-target vaults with yield adapters + OTC escrow
├── flow/ # Open-ended token streaming
├── lockup/ # Fixed-term vesting and airdrops
└── utils/ # Shared utilities and comptroller
Expand Down
10 changes: 1 addition & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<!-- TODO: update the file if it needs more work for each protocol -->

# Contributing

Feel free to dive in! [Open](../../issues/new) an issue, [start](../../discussions/new) a discussion or submit a PR. For
Feel free to dive in! [Open](https://github.com/sablier-labs/evm-monorepo/issues/new) an issue, [start](https://github.com/sablier-labs/evm-monorepo/discussions/new/choose) a discussion or submit a PR. For
any informal concerns or feedback, please join our [Discord server](https://discord.gg/bSwRCwWRsT).

Contributions are welcome by anyone interested in writing more tests, improving readability, optimizing for gas
Expand Down Expand Up @@ -42,12 +40,6 @@ Create your root `.env` from `.env.example`:
cp .env.example .env
```

Then, execute the one-time setup script:

```shell
just setup
```

The setup script installs dependencies in all packages as well as create symlinks for `.env`.

Next, to build all contracts:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sablier EVM Monorepo [![Github Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord] [![Twitter][twitter-badge]][twitter]
# Sablier EVM Monorepo [![GitHub Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord] [![Twitter][twitter-badge]][twitter]

Monorepo for Sablier's EVM smart contracts. In-depth documentation is available at
[docs.sablier.com](https://docs.sablier.com).
Expand Down Expand Up @@ -79,7 +79,7 @@ bug bounty program per the terms outlined in the aforementioned policy.
## Contributing

Feel free to dive in! [Open](https://github.com/sablier-labs/evm-monorepo/issues/new) an issue,
[start](https://github.com/sablier-labs/evm-monorepo/discussions/new) a discussion or submit a PR. For any informal
[start](https://github.com/sablier-labs/evm-monorepo/discussions/new/choose) a discussion or submit a PR. For any informal
concerns or feedback, please join our [Discord server](https://discord.gg/bSwRCwWRsT).

For guidance on how to create PRs, see the [CONTRIBUTING](./CONTRIBUTING.md) guide.
Expand Down
29 changes: 28 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,37 @@ qualify as a vulnerability, it must adhere to these assumptions:

## Airdrops

Sablier Airdrops has been developed with the following additional assumptions:
Sablier Airdrops Protocol has been developed with the following additional assumptions:

- Campaign creator does not fund an Airdrop campaign contract before deploying it through the Sablier Merkle Factory.

## Bob

Sablier Bob Protocol has been developed with the following additional assumptions:

### 1. Trusted Oracles

Vault creators choose their own oracles and bear full responsibility for oracle selection. The protocol intentionally
does not validate oracle staleness or the accuracy of the value returned. Depositors should verify the oracle address
and its reliability before depositing into any vault.

### 2. Curve Pool Slippage and Liquidity

By default, the Lido adapter relies on the Curve stETH/ETH pool for converting stETH back to ETH.
This has important implications:

- **Extreme market conditions**: In extreme market conditions, unstaking may fail due to excessive slippage or
insufficient liquidity.
- **Chainlink stETH/ETH oracle**: If the Chainlink stETH/ETH oracle becomes stale, the unstaking may fail.

In such extreme market conditions, Sablier admin may need to trigger unstaking via Lido withdrawal queue mechanism.

### 3. Manual Settlement

When the oracle price goes above the target price, the vault does not settle by itself. A deliberate action is required
to mark it as settled; until that step is taken, the vault remains active. If the price later falls back below the
target, the vault still stays active and the user cannot redeem their tokens.

## Flow

Flow has been developed with the following additional assumptions:
Expand Down
42 changes: 27 additions & 15 deletions airdrops/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ Merkle-based token distribution with optional vesting via Lockup streams.

## Protocol Overview

Distribute ERC-20 tokens using Merkle trees. Three distribution modes:
Distribute ERC-20 tokens using Merkle trees. Five distribution modes:

- **Execute**: Claims execute arbitrary calldata
- **Instant**: Recipients claim tokens immediately
- **Vesting**: Claims create Lockup streams for gradual vesting
- **LL (Lockup Linear)**: Claims create Lockup Linear streams
- **LT (Lockup Tranched)**: Claims create Lockup Tranched streams
- **VCA (Variable Claim Amount)**: Linear unlock; unvested tokens forfeited on claim

Campaign timing options:
Expand All @@ -21,19 +23,27 @@ Campaign timing options:

```
src/
├── SablierMerkleFactory.sol # Factory for campaigns
├── SablierMerkleInstant.sol # Instant distribution
├── SablierMerkleLT.sol # Lockup Tranched vesting
├── SablierMerkleVCA.sol # Variable claim amount
├── interfaces/ # Campaign interfaces
└── types/ # Structs, enums
├── SablierMerkleInstant.sol # Instant distribution
├── SablierMerkleLL.sol # Lockup Linear vesting
├── SablierMerkleLT.sol # Lockup Tranched vesting
├── SablierMerkleVCA.sol # Variable claim amount
├── SablierMerkleExecute.sol # Execute-based campaigns
├── SablierFactoryMerkleInstant.sol # Factory for Instant campaigns
├── SablierFactoryMerkleLL.sol # Factory for LL campaigns
├── SablierFactoryMerkleLT.sol # Factory for LT campaigns
├── SablierFactoryMerkleVCA.sol # Factory for VCA campaigns
├── SablierFactoryMerkleExecute.sol # Factory for Execute campaigns
├── abstracts/ # Shared base contracts
├── interfaces/ # Campaign interfaces
├── libraries/ # Helper libraries
└── types/ # Structs, enums
tests/
├── integration/
├── concrete/ # BTT-based tests
│ └── fuzz/ # Fuzz tests
└── fork/ # Fork tests
├── integration/ # BTT-based and fuzz tests
├── invariant/ # Invariant tests
── unit/ # Unit tests
└── fork/ # Fork tests
scripts/
└── solidity/ # Deployment scripts
└── solidity/ # Deployment scripts
```

## Commands
Expand All @@ -53,8 +63,10 @@ just airdrops::full-check # All checks
- **Claim**: User proves eligibility via Merkle proof
- **Expiration**: Optional deadline after which admin can claw back

## Import Path
## Import Paths

```solidity
import { ISablierMerkleFactory } from "@sablier/airdrops/src/interfaces/ISablierMerkleFactory.sol";
import { ISablierFactoryMerkleInstant } from "@sablier/airdrops/src/interfaces/ISablierFactoryMerkleInstant.sol";
import { ISablierFactoryMerkleLT } from "@sablier/airdrops/src/interfaces/ISablierFactoryMerkleLT.sol";
import { ISablierMerkleInstant } from "@sablier/airdrops/src/interfaces/ISablierMerkleInstant.sol";
```
24 changes: 15 additions & 9 deletions airdrops/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Sablier Airdrops [![Github Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord] [![Twitter][twitter-badge]][twitter]
# Sablier Airdrops

[![GitHub Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord] [![Twitter][twitter-badge]][twitter]

In-depth documentation is available at [docs.sablier.com](https://docs.sablier.com).

Expand Down Expand Up @@ -44,16 +46,20 @@ bun add @sablier/airdrops

This installation method is not recommended, but it is available for those who prefer it.

First, install the submodule using Forge:
Install the monorepo and its dependencies using Forge:

```shell
forge install sablier-labs/airdrops
forge install sablier-labs/evm-monorepo@airdrops-v3.0.0 OpenZeppelin/openzeppelin-contracts@v5.3.0 PaulRBerg/prb-math@v4.1.0
```

Second, install the project's dependencies:
Then, add the following remappings in `remappings.txt`:

```shell
forge install sablier-labs/evm-utils@v1.0.0 OpenZeppelin/openzeppelin-contracts@v5.3.0 PaulRBerg/prb-math@v4.1.0 sablier-labs/lockup@v3.0.0
```text
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
@prb/math/=lib/prb-math/
@sablier/evm-utils/=lib/evm-monorepo/utils/
@sablier/airdrops/=lib/evm-monorepo/airdrops/
@sablier/lockup/=lib/evm-monorepo/lockup/
```

### Branching Tree Technique
Expand All @@ -76,7 +82,7 @@ bug bounty program per the terms outlined in the aforementioned policy.
## Contributing

Feel free to dive in! [Open](https://github.com/sablier-labs/evm-monorepo/issues/new) an issue,
[start](https://github.com/sablier-labs/evm-monorepo/discussions/new) a discussion or submit a PR. For any informal concerns
[start](https://github.com/sablier-labs/evm-monorepo/discussions/new/choose) a discussion or submit a PR. For any informal concerns
or feedback, please join our [Discord server](https://discord.gg/bSwRCwWRsT).

For guidance on how to create PRs, see the [CONTRIBUTING](../CONTRIBUTING.md) guide.
Expand All @@ -85,8 +91,8 @@ For guidance on how to create PRs, see the [CONTRIBUTING](../CONTRIBUTING.md) gu

See [LICENSE.md](../LICENSE.md).

[codecov]: https://codecov.io/gh/sablier-labs/airdrops
[codecov-badge]: https://codecov.io/gh/sablier-labs/airdrops/branch/main/graph/badge.svg
[codecov]: https://codecov.io/gh/sablier-labs/evm-monorepo
[codecov-badge]: https://codecov.io/gh/sablier-labs/evm-monorepo/branch/main/graph/badge.svg
[discord]: https://discord.gg/bSwRCwWRsT
[discord-badge]: https://img.shields.io/discord/659709894315868191
[foundry]: https://getfoundry.sh
Expand Down
Loading
Loading