How EARN’M Uses Sablier to Power Liquid, Programmable Token Rights

How EARN’M Uses Sablier to Power Liquid, Programmable Token Rights

OTC Boxes are EARN'M way of turning long-term token allocations into liquid, tradeable assets. Each Box is an NFT that represents the holder’s right to later activate a project-defined vesting schedule. EARN'M needed a way to convert a tradeable pre-vesting NFT into a controlled vesting stream only after activation, with enforced withdrawal rules and no possibility for users to bypass their logic. 

They chose Sablier to provide secure, efficient, and programmable token vesting that could integrate cleanly with a custom ERC-721C-style NFT design

Challenge

EARN'M’s product team wanted each user’s “right to tokens” to behave like an NFT:

  • Each NFT represents a different claim amount (e.g., 1,000 tokens).
  • NFTs can be traded on secondary markets with creator royalties. After a 2-month cliff, users must be able to forfeit the right to trade, then start unlocking tokens over time.
  • Once the user chooses to access the tokens, the NFT becomes non-transferable and must obey custom withdrawal restrictions enforced by EARN'M’s logic.

Implementing a secure vesting system from scratch would have been a slow anderror-prone process, and it would have required ongoing maintenance.

EARN'M wanted a battle-tested solution but with full control over custom logic.

Solution

EARN'M integrated Sablier Lockup directly into their custom NFT contract. The key pieces of the system are the following.

1. Stream = NFT

Each OTC Box NFT corresponds to a vesting schedule provided by the project.

Before activation:

  • NFT is tradeable
  • Vesting has not started
  • No tokens are in the stream yet

When the user activates (“opens”) the Box:

  • Transferability is permanently removed
  • A Sablier Lockup stream is instantiated
  • Tokens begin to unlock according to the vesting schedule

Before activation it's a liquid asset; after activation it becomes a non-transferable Sablier-powered vesting stream.

2. Custom Withdraw Logic via Hooks

EARN'M uses Sablier’s onSablierLockupWithdraw hook to gate withdrawals.

If the NFT is “frozen” (user opted to access tokens), EARN'M’s contract allows withdrawal.If not, the hook reverts, preventing users from bypassing EARN'M’s rules by calling Sablier directly.

3. Restricting Direct Calls

EARN'M enforces that only their custom contract can trigger withdrawals:

if (caller != address(this)) revert CallerNotCustomNFTContract();

This ensures users cannot claim tokens until EARN'M’s conditions are met.

4. Clean UX

When assigned as the stream recipient, users still see their stream in the Sablier UI, preserving full transparency while EARN'M’s contract controls permissions.

Results

  • Secure, audited streaming handled by Sablier
  • No need to build a streaming system from scratch
  • Seamless integration validated jointly between EARN'M and Sablier engineering teams

EARN'M is now preparing a public example repository to help other teams integrate similar custom logic on top of Sablier.

What’s Next

Sablier will continue supporting EARN'M as they refine their mirror-NFT contract and release a more polished integration example for the broader ecosystem.

EARN'M’s design shows how flexible, composable, and highly programmable token streaming can unlock new financial primitives.

If you’d like to build something similar, reach out! We’re always excited to support ambitious teams pushing onchain UX forward. Check out the Sablier Lockup codebase here.


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