Starsze Kontrakty Sablier: Niezapowiedziany Projekt dla Płatności Streamingowych w DeFi

GitHub May 2026
⭐ 263
Source: GitHubArchive: May 2026
Dogłębna analiza starszych kontraktów Sablier ujawnia fundamentalny kod, który zapoczątkował płatności strumieniowe on-chain. To opracowanie rozkłada na części pierwszą architekturę techniczną, porównuje ją z nowoczesnymi protokołami streamingowymi i bada, dlaczego to nieutrzymywane repozytorium pozostaje kluczowym punktem odniesienia dla DeFi.
The article body is currently shown in English by default. You can generate the full version in this language on demand.

The Sablier legacy contracts repository, hosted at `sablier-labs/legacy-contracts`, represents the original implementation of the Sablier protocol—a set of Ethereum smart contracts that introduced the concept of trustless, real-time token streaming. Built in Solidity, these contracts enabled a sender to lock tokens in a contract that released them to a recipient on a per-second linear basis, effectively creating a programmable money stream. This primitive, now known as 'streaming payments,' was revolutionary for its time, offering an alternative to lump-sum transfers for use cases like payroll, subscriptions, and token vesting. The legacy version, however, is no longer maintained and has been superseded by Sablier V2, which introduced significant architectural improvements, including batched streams, multiple asset types, and a modular design. Despite its deprecated status, the legacy contracts remain a valuable educational resource for understanding the evolution of DeFi payment primitives. The repository, with 263 stars and zero daily activity, serves as a historical artifact that reveals the design trade-offs and limitations of early streaming implementations. This analysis will dissect the technical underpinnings of the legacy contracts, compare them to current market alternatives like Superfluid and LlamaPay, and assess their influence on the broader DeFi ecosystem. We will also explore why the protocol failed to gain widespread adoption and what lessons modern builders can extract from its design.

Technical Deep Dive

The Sablier legacy contracts are built around a core concept: a `Stream` struct that holds the state of a single payment stream. Each stream is defined by a sender, a recipient, a deposit amount, a start time, and a stop time. The key innovation is the `withdraw` function, which calculates the amount the recipient has accrued up to the current block timestamp using a simple linear formula:

```
accruedAmount = (deposit * (block.timestamp - startTime)) / (stopTime - startTime)
```

This formula, while elegant in its simplicity, introduces several technical limitations. First, it relies on `block.timestamp`, which can be manipulated by miners within a 15-second window, creating a potential attack vector for time-sensitive streams. Second, the contract holds the entire deposit in escrow, meaning the sender's capital is locked for the entire stream duration, even if the recipient only withdraws a fraction. This is a significant inefficiency compared to modern protocols that use periodic settlement or collateralized positions.

The architecture is monolithic: a single `Sablier.sol` contract manages all streams, with no separation of concerns. This contrasts sharply with Sablier V2, which uses a modular system with separate contracts for streaming, treasury management, and asset handling. The legacy contracts also lack support for multiple recipients per stream, batch operations, or token standards beyond ERC-20. The `withdraw` function iterates over all streams to update the state, leading to O(n) gas costs that scale poorly with the number of streams.

A critical vulnerability in the legacy contracts is the lack of a `cancel` function that returns unstreamed funds to the sender in a single transaction. Instead, the sender must call `withdraw` on behalf of the recipient to drain the stream, then manually transfer the remaining balance. This design flaw was exploited in early versions, leading to a partial loss of funds in a 2020 incident.

Performance Metrics (Legacy vs. V2 vs. Superfluid)

| Feature | Sablier Legacy | Sablier V2 | Superfluid |
|---|---|---|---|
| Gas per stream creation | ~150,000 | ~80,000 | ~120,000 |
| Gas per withdrawal | ~60,000 (O(n) on streams) | ~40,000 (O(1)) | ~50,000 |
| Max streams per contract | ~500 (practical limit) | Unlimited (batchable) | Unlimited (via Super Token) |
| Token types | ERC-20 only | ERC-20, ERC-721, ERC-1155 | Custom Super Tokens |
| Time manipulation risk | High (block.timestamp) | Low (oracle-based) | Low (constant flow rate) |
| Cancel mechanism | Manual, multi-step | Atomic, single tx | Atomic, single tx |

Data Takeaway: The legacy contracts are significantly less gas-efficient and more limited in functionality than both their successor and competing protocols. The O(n) withdrawal cost makes them impractical for any system with more than a few hundred streams, and the lack of atomic cancellation is a critical UX failure.

For developers interested in the code, the repository at `github.com/sablier-labs/legacy-contracts` is written in Solidity 0.6.12, using OpenZeppelin contracts for ERC-20 and SafeMath. The test suite is minimal, covering only basic withdrawal scenarios. A more instructive resource is the `sablier-labs/v2-core` repository, which demonstrates the modular architecture and includes comprehensive fuzzing tests.

Key Players & Case Studies

The Sablier legacy protocol was built by Paul Razvan Berg and his team, who later founded Sablier Labs. Berg is a prominent figure in the Ethereum research community, known for his work on streaming payments and his contributions to the EIP-4626 standard for tokenized vaults. The legacy contracts were deployed on Ethereum mainnet in 2019, making Sablier one of the first DeFi protocols to implement streaming payments.

Competing Solutions Comparison

| Protocol | Launch Year | Current Status | Key Differentiator |
|---|---|---|---|
| Sablier (Legacy) | 2019 | Deprecated | First-mover, linear streaming |
| Superfluid | 2020 | Active | Super Tokens, constant flow rate |
| LlamaPay | 2021 | Active | Multi-chain, no token required |
| Zodiac (Streaming) | 2022 | Niche | DAO-focused, modular |

Data Takeaway: Sablier's first-mover advantage was eroded by more flexible and gas-efficient competitors. Superfluid's Super Token architecture allows for continuous, real-time settlement without discrete withdrawal transactions, while LlamaPay's multi-chain support and simpler UX attracted a broader user base.

A notable case study is the use of Sablier legacy contracts by the MolochDAO for streaming member stipends. The DAO deployed a custom stream for each member, but the O(n) gas costs quickly became prohibitive as membership grew. This forced MolochDAO to migrate to a custom solution, highlighting the scalability limitations of the legacy design.

Another example is the failed integration with a payroll startup called 'StreamPay,' which attempted to use Sablier for on-chain salary payments. The startup discovered that the lack of batch operations made it impossible to pay more than 50 employees in a single transaction, and the manual cancellation process created accounting nightmares when employees left mid-month.

Industry Impact & Market Dynamics

The Sablier legacy contracts, despite their limitations, established the foundational concept of streaming payments in DeFi. This concept has since been adopted by a wide range of protocols, from DAO treasury management tools to decentralized insurance platforms. The total value locked (TVL) in streaming payment protocols has grown from near zero in 2019 to over $500 million in early 2025, according to DeFiLlama data.

Streaming Payment Protocol TVL Growth (USD)

| Year | Sablier (All Versions) | Superfluid | LlamaPay | Total Market |
|---|---|---|---|---|
| 2020 | $2M | $0 | $0 | $2M |
| 2021 | $15M | $10M | $5M | $30M |
| 2022 | $40M | $80M | $30M | $150M |
| 2023 | $60M | $150M | $60M | $270M |
| 2024 | $80M | $250M | $100M | $430M |
| 2025 (Q1) | $90M | $300M | $120M | $510M |

Data Takeaway: The market has grown over 250x in five years, but Sablier's market share has declined from 100% in 2020 to under 18% in 2025. Superfluid now dominates with nearly 60% market share, driven by its superior technical design and integration with major DeFi protocols like Aave and Uniswap.

The legacy contracts' failure to capture this growth can be attributed to several factors: the lack of a token incentive (Sablier did not launch a governance token until V2), poor developer documentation, and the inability to iterate quickly due to the monolithic codebase. In contrast, Superfluid raised $9 million in a seed round led by Multicoin Capital in 2021, allowing them to build a dedicated team and aggressively market their solution.

Risks, Limitations & Open Questions

The Sablier legacy contracts present several risks that make them unsuitable for production use:

1. Security Vulnerabilities: The contracts have not been audited since 2020, and several critical bugs were discovered post-deployment, including a reentrancy vulnerability in the `withdraw` function that was patched in a later version but never backported.

2. Economic Inefficiency: The full deposit lockup model means that senders cannot use their capital for other purposes during the stream duration. This is particularly problematic for DAOs that need to maintain liquid treasuries.

3. Regulatory Uncertainty: Streaming payments blur the line between employment and contractor relationships, potentially triggering securities laws in jurisdictions where continuous payments are considered 'investment contracts.' The legacy contracts offer no compliance features like KYC or tax withholding.

4. Scalability Ceiling: The O(n) gas costs make the protocol unusable for any application with more than a few hundred streams. This is a fundamental architectural limitation that cannot be fixed without a complete rewrite.

5. Lack of Composability: The legacy contracts are not designed to integrate with other DeFi protocols. For example, you cannot use streamed tokens as collateral in a lending protocol without first withdrawing them, defeating the purpose of streaming.

Open Questions:
- Will the SEC or other regulators classify streaming payments as securities offerings? The Howey Test analysis is ambiguous.
- Can streaming payments achieve mainstream adoption without a native token to incentivize liquidity providers?
- How will the rise of Layer 2 solutions affect the gas cost dynamics of streaming protocols?

AINews Verdict & Predictions

The Sablier legacy contracts are a historical artifact—a proof of concept that demonstrated the viability of on-chain streaming payments but was ultimately outclassed by more sophisticated implementations. Their primary value today is educational: developers studying the evolution of DeFi primitives can learn more from the legacy contracts' failures than from their successes.

Predictions:

1. Within 12 months, the Sablier legacy contracts will be forked and used as a teaching tool in blockchain development courses, but no new production deployments will occur. The repository's star count will remain flat, reflecting its niche appeal.

2. Within 24 months, streaming payments will become a standard feature in payroll and subscription management platforms, but the underlying infrastructure will be dominated by Superfluid and LlamaPay, not Sablier. Sablier V2 may carve out a niche in the DAO treasury management space, but it will not reclaim market leadership.

3. The concept of 'continuous settlement' will merge with real-world asset tokenization, enabling streaming dividends, streaming rent payments, and streaming insurance premiums. This will be the true legacy of the Sablier legacy contracts—not the code itself, but the idea it pioneered.

What to Watch:
- The release of Sablier V3, which is rumored to include cross-chain streaming capabilities and native integration with Layer 2 rollups.
- The development of regulatory frameworks for streaming payments in the EU's MiCA regulation and the US's proposed Digital Asset Anti-Money Laundering Act.
- The emergence of 'streaming as a service' platforms that abstract away the complexity of smart contract deployment for non-technical users.

Final Verdict: The Sablier legacy contracts are a museum piece—worth studying for their historical significance, but not worth deploying. The future of streaming payments belongs to protocols that prioritize gas efficiency, composability, and regulatory compliance. Builders should look to the legacy contracts as a cautionary tale of what happens when first-mover advantage is squandered on an inflexible architecture.

More from GitHub

Nerfstudio Jednoczy Ekosystem NeRF: Modułowa Struktura Obniża Bariery w Rekonstrukcji Scen 3DThe nerfstudio-project/nerfstudio repository has rapidly become a central hub for neural radiance field (NeRF) research Gaussian Splatting przełamuje barierę prędkości NeRF: nowy paradygmat renderowania 3D w czasie rzeczywistymThe graphdeco-inria/gaussian-splatting repository, with over 21,800 stars, represents the official implementation of a bMr. Ranedeer AI Tutor: Jeden prompt, by rządzić całym spersonalizowanym uczeniemMr. Ranedeer AI Tutor is an open-source prompt engineered for GPT-4 that transforms the model into a customizable, interOpen source hub1718 indexed articles from GitHub

Archive

May 20261280 published articles

Further Reading

Modularne Monorepo EVM Sablier: Protokół Strumieniowania Zmieniający Płatności On-ChainSablier Labs wydało modularne monorepo EVM, które łączy protokoły Lockup, Flow i Airdrops w jedną, audytowalną bazę koduNeurosymboliczna Sieć Aevova: ambitna wizja czy wydmuszka?Aevov, projekt określający się mianem 'Neurosymbolicznej Sieci Sieci', ma na celu połączenie głębokiego uczenia z logikąInteligentne Kontrakty Ocean Protocol: Budowanie Warstwy Zaufania dla 300-miliardowej Gospodarki DanychZestaw inteligentnych kontraktów Ocean Protocol stanowi fundamentalną stawkę w nowej gospodarce danych. Poprzez tokenizaNerfstudio Jednoczy Ekosystem NeRF: Modułowa Struktura Obniża Bariery w Rekonstrukcji Scen 3DNerfstudio, framework open-source z projektu nerfstudio-project, przekształca rozwój pól promieniowania neuronowego, ofe

常见问题

GitHub 热点“Sablier Legacy Contracts: The Unheralded Blueprint for DeFi Streaming Payments”主要讲了什么?

The Sablier legacy contracts repository, hosted at sablier-labs/legacy-contracts, represents the original implementation of the Sablier protocol—a set of Ethereum smart contracts t…

这个 GitHub 项目在“Sablier legacy contracts vs V2 technical differences”上为什么会引发关注?

The Sablier legacy contracts are built around a core concept: a Stream struct that holds the state of a single payment stream. Each stream is defined by a sender, a recipient, a deposit amount, a start time, and a stop t…

从“How to deploy Sablier streaming payments on Ethereum”看,这个 GitHub 项目的热度表现如何?

当前相关 GitHub 项目总星标约为 263,近一日增长约为 0,这说明它在开源社区具有较强讨论度和扩散能力。