Building a Staking Program Using Sablier

How to streamline staking rewards with real-time vesting and scalable airdrops.

Building a Staking Program Using Sablier

If you are wondering how to set up staking for tokens being vested in Sablier, head over here.

You want to build a staking program, and you want to spend hundreds of thousands of dollars on audits, countless hours of programming, etc.? Sablier provides two battle-tested tools, Flow and Airdrops, to help you launch incredibly gas efficient and secure staking programs.

What is Sablier Flow?

Sablier Flow is a debt tracking protocol that tracks tokens owed between two parties, enabling indefinite token streaming.

In practice, this means you can create streams that last indefinitely, that will account for debt when the sender runs out of debt, while not relying on a liquidation system, or wrapped tokens. Streams can be paused, voided, and optionally transferred (if allowed by sender) using the stream NFT, an NFT owned by the recipient that represents the stream (whoever owns the NFT is the recipient of the stream).

Flow was initially built with recurring payments in mind. Use cases like payroll, subscriptions, rent, and other similar use cases. It truly shines for those use cases, being battle-tested, immutable, and incredibly gas-efficient.

Using Flow for Staking

However, it turns out that it also happens to be a great fit for staking. One of the features of Flow is that a stream can be topped up. In practice, this means that in a staking program, a new stream doesn’t need to be created every time rewards are distributed. 

One can imagine a system where when a user first starts staking, the stream is created, and from that point on, every time they claim their staking rewards, those rewards are deposited into the stream and vested over time to the staker.

This has two great implications:

  • A cost-effective structure in terms of gas fees: the vesting stream is only created once, and from that point one it’s just top up transactions that are light in gas
  • A vesting distribution program for staking rewards: ensures token holders stay committed to the project for the long run and don’t immediately dump.

When a user unstakes funds, the stream can simply be paused, or alternatively voided, either right when the unstaking happens, or after all funds have already been streamed over in the stream.

You can offer a complete integration from your end, allowing stakers to manage their vested staking rewards on your interface, or just use the Sablier interface.

The streaming rate of a stream can also be modified subsequently, as many times as you want, to dynamically modify how many tokens each recipient receives by the second.

The best part? Sablier Flow is an immutable protocol. The Sablier Labs team has no access to user funds, meaning stakers can safely let their staking rewards accumulate within Sablier, and only withdraw funds from the protocol when actually needed, saving up on gas fees. Only they can access their funds anyway.

Sablier Flow also has the advantage of being deployed on virtually every EVM blockchain out there, ensuring you can build your staking program on the chain where your community is active on.

What is Sablier Airdrops?

Sablier Airdrops is a tool that allows you to airdrop tokens, either instantly or via vesting streams, to hundreds, thousands and even millions of people. 

Eligible recipients either claim on the Sablier interface, or on a custom interface on your own website that Sablier can provide or you can build yourself by integrating our protocol. 

For vested airdrops, when users claim, they receive a stream in which the tokens are vested in. For instant airdrops, they receive the tokens directly into their wallet when claiming.

Sablier Airdrops is available on just about any EVM chain, and soon coming to Solana.

Using Airdrops for Staking

It turns out that you can use Sablier Airdrops for a variety of use cases, not just token launches. One of these is the distribution of staking rewards. 

Instead of continuously streaming rewards like with Flow, you can run recurring airdrop campaigns (e.g., weekly, bi-weekly, monthly) that distribute tokens either instantly or in a vested manner to your stakers.

Here’s how it works:

  • Take a snapshot of eligible stakers and their reward amounts
  • Upload it as a CSV to Sablier’s interface and create the campaign
  • Tokens are distributed instantly or as vested airdrops

Using Sablier Airdrops has the advantage of being incredibly scalable. It’s a product specifically made for mass token distribution. The best part? You can offer the claiming experience on your own website, so stakers aren’t even aware Sablier is doing the lifting in the background.

Conclusion

Using Sablier for a staking program is an excellent idea. Our solutions are battle-tested and immutable, while enabling staking rewards vesting, ensuring long-term community alignment.

The future of staking is real-time token streaming. Start today, at app.sablier.com.


If you have any questions, ideas, or issues, ping us on Discord or Twitter — we’d love to hear from you.