The next killer app? DeFi streaming payment protocol prevents your prepayment from being "run away"
If you pay attention to the development of DeFi , a recent application called sablier will be very interesting. According to its founder Paul Razvan Berg, it is a real-time DeFi streaming payment protocol. How do you understand it?
For example, you can use this application to pay employees at set time points (which can be every minute, 15 minutes, 1 hour, daily, or other). It is developed based on the smart contract of Ethereum. You can use this contract. Deposit a lump sum of money, and then the contract will distribute the money to your designated employees according to your preset time.
In addition to payroll, potential applications for such agreements include leases, parking, consulting, and tax payments.
However, the application mentioned by sablier is actually not cool enough for me. The main application of real-time payroll is very novel, but it is not necessary. So what is necessary for me?
- Meng Yan: Digital Economy Upgrading Leads to New Global Competition, Blockchain Opens New Chapter in Digital Civilization
- Can the Circle, which has its core business centered on stablecoins, withdraw its divestiture business, can "bet" this time?
- Dry goods | Pure coins, points, stocks, three simple token valuation models
DeFi protocol + prepaid
It's the prepaid market.
In recent years, there have been more and more pre-paid running events. Common examples include gym running, barber shop running, and recent education and training institutions running thunderstorms.
People are facing increasing risks of prepaid running. The education and training industry is particularly serious. For example, Hangzhou Bestall Holding Group, an early education institution where the author reports to his daughter, has recently been exposed. Many parents are defending their rights …
This continuous thunderstorm is triggering a crisis of parents' trust in training institutions and may lead to the decline of this industry.
And if the streaming payment financial protocol is applied to prepayment, then in theory, the trust problem can be effectively solved!
Because the contract is written, the merchant cannot roll the money to run. If you want to stop the service, or the merchant really chooses to run, you can still easily get back the remaining funds in the contract!
Sounds amazing, does it make sense to use pre-paid functions with sablier?
Use sablier to achieve prepayment
In theory, it is also achievable, here is a simple tutorial:
Before using the application, make sure to install an Ethereum wallet, such as metamask.io, then visit the https://pay.sablier.finance/ page and link your wallet:
Then click the "Stream Money" button, and the following page will appear:
Select the type of stablecoin you pay (Dai, Sai, USD coin, Compound Dai, Compound USD coin), quantity, recipient address, and stream payment time (prerequisite: you have a corresponding amount of stablecoin in your metamask wallet, and reserve enough Part of the funds are used as transaction fees).
Confirm the funds, service time, and address with the merchant and click the "create Stream" button.
This then implements a payment stream, which sends funds to each other every second.
For example, the above option is to pay about 0.0003858 Dai per second and about 33.33 Dai per day.
If the merchant runs away or you do not want to continue using the services provided by him, you can click the REDEEM button to redeem and get your remaining funds back.
So what is the implementation principle of this application?
Fund flow agreement through ERC-1620 standard
This starts with a mechanism called RICO. It is a mechanism proposed by Ethereum developer frozeman at the Devcon4 conference. In short, it is a revocable token financing idea. The basic idea is as follows :
- Allocation stage: Investors contribute ETH and receive a financing commitment token (LIA). Investors can return their LIA at any time, and they can recover the corresponding ETH.
- Distribution phase: At a fixed time, the ETH received will flow to the financing party. At this time, investors can also refund, but at this time, according to the current point in time, investors can only recover part of ETH.
The refund is made by sending LIA back to the RICO smart contract. The RICO smart contract will send ETH and the locked LIA back to the sender.
The proportion of refunds is inversely proportional to the time elapsed during the distribution phase, which means that if the investor refunds late, he can only refund part or all of his investment.
Paul Razvan Berg, the founder of sablier, integrated this mechanism and developed an ERC-1620 token standard that uses the Ethereum block timestamp to measure time. The following is the implementation process of sablier:
- The developer establishes a fund flow contract;
- The payer (sender) can create a stream by depositing funds in the contract and selecting the stream duration;
- The payee can withdraw funds from the fund flow based on its continuous solvency, that is, pay * (current block timestamp-start block timestamp);
- Both the payer and payee can terminate the flow of funds;
- If the flow of funds has ended but has not ended, the payee has the right to withdraw all remaining balance of the contract;
The stream structure is as follows:
- deposit: the amount of funds to be streamed;
- ratePerSecond: the number of tokens allocated to the payee per second;
- remainingBalance: the remaining funds in the stream;
- startTime: the unix timestamp when the payment stream started;
- stopTime: Unix timestamp when payment stream stopped;
- recipient: the address to which the funds flow;
- sender: the address of the funding flow;
- tokenAddress: ERC20 token used as the currency of the money flow;
- isEntity: shows whether the stream exists;
struct Stream { uint256 deposit; uint256 ratePerSecond; uint256 remainingBalance; uint256 startTime; uint256 stopTime; address recipient; address sender; address tokenAddress; bool isEntity; }
Summary: At present, the sablier application is still at a very early stage. The security of its contract needs to be further verified and strengthened. Therefore, it is not suitable for larger payments for the time being. In addition, its current user experience still needs to be improved. , And when it is perfect, or there are better similar products, and the merchant is willing to accept this form of payment, then I will be happy to use this method for prepayment, for me, its attractiveness is Much bigger than lending applications.
References:
1.https: //medium.com/sablier/introducing-sablier-continuous-payments-on-ethereum-c2bf04446d31
2.https: //github.com/ethereum/EIPs/issues/1620
3.https: //github.com/lukso-network/rico-js
We will continue to update Blocking; if you have any questions or suggestions, please contact us!
Was this article helpful?
93 out of 132 found this helpful
Related articles
- Has the golden age of the alliance chain arrived?
- Trust crisis for charity projects, but only blockchain can solve it?
- Cryptocurrencies behind Africa's economic "crash" have become a new battleground
- Can smartphone + hardware wallet save HTC?
- Ethereum welcomes hard fork upgrade again, Reddit community supports block rewards reduced to 1 ETH
- The road to low-defense DeFi: how to achieve it? Let's take a look at these four options
- DeFi's windfall, ConsenSys researchers find that DeFi is driving Ethereum decentralization