Back to Library

Token Stream

Continuous transfer of tokens between accounts at a predefined rate, creating a real-time payment stream without discrete transactions.

Token streams enable the gradual transfer of funds to a recipient at a steady rate, rather than lump sums, with payments flowing continuously. The mechanism allows senders to define the flow rate (e.g., tokens per second) and recipients to withdraw accumulated funds at any point. Some implementations also include the option to specify a future start date and end date when the stream terminates.

Andreas Antonopoulos introduced the concept of real-time money streaming in his 2016 keynote talk “Bitcoin, Lightning, and Streaming Money,” where he discussed its application within the Lightning Network. Inspired by Antonopoulos, Paul Berg, co-founder of Sablier, proposed ERC-1620 in November 2018, introducing a standard for streaming payments on Ethereum. The standard required users to lock funds in a smart contract, releasing them to recipients at a predetermined rate per second. Building on this innovation, Superfluid introduced the Constant Flow Agreement (CFA) in 2019, introducing open-ended flows without pre-funded deposits. Common use cases for token streaming include salaries and subscription payments.

Advantages

  • Reduced Working Capital: Recipients gain immediate access to funds as they stream, while senders retain untransferred tokens, optimizing liquidity for both.
  • Smooth Cash Flow: Provides a predictable, steady flow of payments, avoiding delays of periodic payments.
  • Lower Transaction Costs: Consolidates multiple periodic payments into a single stream setup.

Limitations & Risks

  • Balance Maintenance: Senders must actively monitor and replenish funds to sustain streams, risking interruptions if balances run dry.
  • Virtual Balance Lag: Real-time stream totals are provisional until withdrawn or settled, potentially misaligning perceived and actual funds.
  • Accounting Misalignment: Continuous flows may not integrate cleanly with traditional systems expecting discrete transactions, complicating reporting.

Design Considerations

  • Stream Modification Rules: Decide if senders can adjust rates mid-stream for flexibility or keep them fixed for predictability.
  • Stream Bundling: Design multi-stream aggregation where recipients can consolidate multiple inflows into a single dashboard, improving usability in payroll and revenue-sharing applications. Implement batch withdrawals that let recipients claim multiple streams in one transaction, reducing gas costs and enhancing efficiency for frequent recipients.

Examples

Superfluid Money Streaming

Formerly Constant Flow Agreement (CFA), it implements token streaming by wrapping standard tokens (e.g., USDC) into “Super Tokens,” (e.g., USDCx), streaming them at a sender-set rate—like 0.01 USDCx per second—from the sender’s live balance to a recipient. The sender’s balance decreases continuously, offset by any inflows, while the recipient’s grows, both tracked in real-time without pre-locking funds. Recipients withdraw anytime, and senders can adjust or cancel the stream, pulling from their live Super Token balance. This offers designers a dynamic, real-time payment tool for subscriptions or wages, with automatic netting of flows ensuring seamless updates.

Llamapay

Utilizes the token stream mechanism with an open-ended model, streaming raw ERC-20 tokens (e.g., DAI) from a sender’s live balance at a fixed rate—like 0.01 DAI per second—vesting per block for instant withdrawal. No upfront deposit is required, and senders can cancel anytime; if funds deplete, it tracks debt as a negative balance, offset by later top-ups. Avoiding wrapped tokens or liquidation, this straightforward approach gives an efficient, manageable streaming option for payroll or subscriptions, prioritizing simplicity and recipient access, though it demands sender vigilance to prevent debt buildup.

Sablier Payment Streams

Applies the token stream mechanism with two modes: "Lockup" for closed-ended streams and "Flow" for open-ended ones. In Lockup, senders lock a fixed amount—like 3,000 DAI—to stream over a set period, cancellable with refunds and optionally transferable by recipients. It supports custom curves, such as linear or exponential, which can include cliffs, initial unlocks, and step-functions for tranches. Flow streams tokens at a fixed rate (e.g., 0.001 DAI per second) from a sender’s live balance, tracking debt if funds run low; it runs indefinitely, pausable or voidable by either party, with flexible top-ups.