Log In
CoinEx Research

CoinEx Research: Payment LEGO: An Overview of Streaming Payment Projects (I)

2022-04-19 02:07:26

I. The Origin of Streaming Payments

While studying at the London School of Economics (LSE) in 1949, New Zealand economist William Phillips ("Bill" Phillips) invented MONIAC (Monetary National Income Analogue Computer), which consisted of a series of transparent plastic tanks and pipes for simulating the process of the UK’s national economy. Phillips illustrated the constant money streams through water flows, which reflects the natural state of money — it flows over time. 

(Source: https://www.researchgate.net/)

In a national economy, time functions as the bridge connecting wages, consumer spending, investment funds, and government spending. Picture a world with “streaming money” — payments are no longer discrete but continuous, enabling the completion of money transfers within seconds. Time determines people’s net worth. In theory, work should be paid in real time, but factors such as management costs prevent us from achieving real-time payments.

Fortunately, the advent of blockchain technology removed both the spatial (borderless payment) and temporal restraints of payment. With blockchain, payments can be made every second, giving rise to a continuous stream. This payment model is called “streaming payments”, or real-time payments. The concept of streaming payment was first proposed by Andreas Antonopoulos, the author of Mastering Bitcoin, back in 2017. In 2019, Paul Razvan Berg implemented streaming payment technology through Ethereum smart contracts and founded a project called Sablier.

II. The Realization of Streaming Payments

Streaming payments are achieved through smart contracts and crypto programming. It defines the directional relationship between two account addresses (sender and recipient) : Once a stream is created by the sender, money is continuously streamed towards the recipient according to a certain rule or within a certain period.

The rules of smart contracts differ across scenarios and can be put into the following categories:

1. Streams with a fixed amount

This rule applies to scenarios (e.g. investment) where the payment amount and the start & end time are known. During the period from the start time to the end time, money is streamed towards the recipient per second at a certain streaming rate. 

Streaming Rate = Payment Amount / (End Time - Start Time)

Streamed Balance = Streaming Rate * (Current Time - Start Time)

2. Streams with a fixed streaming rate

This rule applies to scenarios (e.g. salary payment) where there is no fixed stop time. After the start time, money is streamed towards the recipient per second at a specified streaming rate until hitting the maximum payment amount. In addition, the rule does require any end time — the duration of the stream can be extended by increasing the maximum payment amount.

End Time = (Maximum Payment Amount / Streaming Rate) + Start Time

Streamed Balance = Streaming Rate * (Current Time - Start Time)

3. Streams with installments

This rule is applicable to streams with a large fixed amount. Moreover, with this rule, the number of installments can be randomly set, and the cash flow will no longer be occupied.

It should be noted that the amount transferred through a stream is not the real amount, and we will not see these ongoing payments on every block. What is transferred via a stream is the “streamed balance”, which is the amount that the sender or recipient owns at a certain point on the streaming payment protocol. Additionally, the sender/recipient may end the stream at any time before the stream ends and obtain the streamed balance at that time by making withdrawals.

III. Overview of Streaming Payment Projects

In this chapter, we will introduce four streaming payment projects currently available in the market in terms of the deployed network, technical framework, product features, and interactive process. 

1. Sablier

Sablier, the earliest streaming payment protocol, was launched on December 14, 2019. According to data from DeFi Pulse, Sablier’s total value locked (TVL) reached $158 million at the end of March 2022 and peaked at $800 million in November 2021. Most of the TVL comes from protocols that use Sablier to unlock tokens. With Sablier, projects can unlock tokens automatically, and recipients can claim tokens seamlessly.

(Source: DeFi Pulse)

Mainnets supported by Sablier now include Ethereum, Arbitrum, Avalanche, BSC, Optimism, and Polygon. Meanwhile, it also supports testnets such as Goerli, Kovan, and Rinkeby. It features a wide range of token payments within these networks, covering mainstream USD-pegged stablecoins, stablecoins pegged to other fiat currencies, Wrapped assets, as well as certain native tokens on the network.

Sablier features a well-designed UI and simple operations. The protocol provides separate operation interfaces for both senders and recipients (https://pay.sablier.finance/ and https://app.sablier.finance/, respectively). When creating a streaming payment, a sender only needs to enter the token type, total amount, recipient address, and duration (ranging from 1 hour to 20 years). During this process, the fees include the Gas fee and platform fee (a portion of the tokens deducted from the stream). Once the contract is created, an info-sharing link will pop up on Sablier web-app, leading the sender to a page where he can view information such as the token amount that has been streamed, the remaining time, as well as the withdrawal amount on the part of the recipient. He may also click on “Links” to go to the blockchain explorer and check out more information about the transaction. In addition, the sender could also tap “Cancel” to terminate the transaction. If a stream is canceled before the set end time, money that has been streamed still belongs to the recipient and the remaining deposits will be returned to the sender.

In the case of the above stream, the recipient’s interface looks similar to that of the sender, and the only difference is that the recipient can click on the “Withdraw” button to withdraw the amount that has been streamed. The recipient needs to withdraw the money to have it transferred to his wallet; otherwise, the funds will remain on the Sablier protocol. 

(Source: Sablier’s official website)

Sablier was acquired by Hifi Finance in July 2021 and has yet to issue any tokens. 

2. Superfluid

Superfluid had attracted much attention during the “airdrop craze” and was also one of the tasks of RabbitHole. Initially, Superfluid was only listed on Polygon and xDAI (Gnosis Chain). Now, it is also deployed on Arbitrum and Optimism. In terms of testnets, Superfluid supports Arbitrum Rinkeby, Avalanche Fuji, Goerli Testnet, Kovab Testnet, Optimism Kovab, Polygon Mumbai, Rinkeby Testnet, and Ropsten Testnet.

Superfluid’s framework primarily covers the following components:

(1) Super Agreement Framework

Super Agreement is the cornerstone of Superfluid that allows it to expand and add new features. It is also the key of payment LEGO. The Super Agreement consists of a host contract and multiple agreement contracts. An agreement contract must be on the approve-list; otherwise, the host contract will not execute the agreement code.

To be more specific, Superfluid now features two agreements: 1) Constant Flow Agreement (CFA), which allows tokens to flow out of a user’s wallet; 2) Instant Distribution Agreement (IDA), which lets a user send tokens to multiple recipients in one transaction. The independent or combined use of the two agreements enables a wide range of application scenarios. Additionally, the Superfluid community is also exploring more innovative and practical agreements.

(2) Super Token Framework

Super Agreements set the “rules” of how a Super Token can behave. There are two types of Super Tokens: 1) Wrapper Super Token (the wrapped version of ERC20 tokens), and 2) Custom Super Token (tokens without an underlying asset). The former is wrapped at a 1:1 ratio through the Superfluid protocol (subsequently redeemed at a 1:1 ratio at any time), and the latter is issued through Superfluid and compatible with ERC777 and ERC20.

Superfluid’s token framework comes with the following features:

  • An extended ERC777 token standard: Tokens that can react to certain events using callbacks;
  • Batch Capabilities: Users can do multiple things in a single transaction;
  • Meta-Transactions: It allows for transactions where one person creates and signs data off-chain and that are executed by another person who pays the Gas.

(3) Super App Framework

A Super App can “manage” agreements and respond to changes. This is where developers can write their own custom logic/behavior. More specifically, scenarios that involve calling agreements include: 

  • If the sender starts streaming a token to the contract, then another token (e.g. Wrapped tokens) will stream back automatically using CFA.
  • If a project team unlocks tokens, then IDA will distribute tokens to all investors.

Generally speaking, the real value of Superfluid is that it effectively alleviates two problems: difficulties of key management and expensive Gas fees. Furthermore, the protocol has created a new composable, scalable network of value flows, which demonstrates the charm of the blockchain space.

On Superfluid, before creating a streaming payment, a user (sender) should first wrap the tokens in his wallet or create custom tokens. Next, the sender needs to enter or select certain information, including the recipient address, token type, and flow rate (one-time, daily, weekly, monthly, and yearly). It should be noted that a buffer will be withheld from all streams, except for one-time payment. The buffer will be returned when the user closes the stream or will be deducted when the token balance is 0. The type of Superfuild stream is with a fixed streaming rate. As long as the token balance of the Superfuild account is not zero, the stream will continue until the sender or recipient has it canceled. Tokens received by the recipient are also super tokens, which will only be shown in a wallet after being unwrapped. 

Favored by many institutional investors, Superfluid announced in July 2021 that it had received a seed round funding of $9 million, with involvement from investors that include Multicoin Capital, Delphi Digital, and DeFiance Capital.

CoinEx Research: Payment LEGO: An Overview of Streaming Payment Projects (II)
CoinEx | Types of Future Margins