Editor’s note: This article from the orange book, the author: orangefans, authorized to release the daily planet.
Watch a movie on the Internet, I can play with the progress of the progress bar to pay? For example, each watch a second to pay a little money, rather than a one-time buyout film single watch right? So I enjoy a long time in this movie, I would need to pay much money.
This is the concept of “programmable currency”.
“In your perception of money has been seriously out of date” in this article, Andreas M. Antonopoulos proposed that the real meaning of the programable money, called “streaming money” – the “money flow”.
When the threshold is low enough to pay, pay the cost was negligible, this change will put money from “quantity” to “exchange of media streaming media”. This development process with music, video is the same. It will not only change the money circulation way, but also change how we make money, how to use the money, and ultimately create a new format completely different for money. Because essentially we have changed the time scale of money”.
There was an interesting discussion on the etheric Fang recently, someone tries to according to the above this “flow of money” thinking, this paper proposes a new ERC standard. (what is the standard of ERC, you can simply understand it as a specific type of intelligent contract, or take a look at this article and this article).
The new ERC standard to allow people to create such a smart contract can be used as the “money streaming service”, to change the traditional views of currency.
This new contract is very interesting, it can do some of the traditional financial and payment system to do things.
For example, imagine a task:
I want to deposit 100 dollars, every ten minutes to take out 2 dollars to buy a lottery ticket, until sold so far.
Or such a task:
Orange book to make a $1000 budget, as long as the volunteers, no matter who he / she is in the background of the orange book editor to write articles, each playing a word, this 1000 yuan will be real-time distribution of a piece of money to him / her, and in return.
The two tasks are difficult to achieve in the traditional financial payment system, or can do, but the cost will be very high. Of course, you may say these two tasks are pseudo demand, no one will really do. On this point, temporarily unable to refute, but I think you can read this article.
The following are some discussion about the new ERC standard, including the concept, motivation and technical specifications. Now the orange book translation, for a friend interested in understanding.
Money streaming represents the concept of continuous payment in the limited time. Block number as a proxy for time to continuously update the account balance in the.
The following attempts to describe a standard, the standard uses block number to measure time, flow streaming services through smart contracts for mapping.
The standard process is this:
Intelligent contract developers set up ahead of a Money streaming.
The payer can interact with intelligent contract, deposit a selected length of time the funds required, you can immediately start the service flow.
The payee may according to the contract for the solvency of smart money from in. The payment rate * (the current block height – starting block height)
Money streaming (the terms of payment rate, the length of time, metadata) at any time to update, as long as the two sides signed together.
Any party may at any time to turn off the Money streaming contract, does not need to reach a consensus on the chain.
If the Money streaming end of the time, but is not terminated by any party, so the payee has the right to extract all the money is in the.
The ERC standard is to change our long-term financial planning (long-term financial commitments) view. The blockchain, do not need to make the payment to “block” form (such as a monthly payment of salary), because pay as (paying-as-you-go) the payment of the cost has been reduced a lot. Put the money into a function of time, can in many cases better coordination and incentive mechanism.
Here are just a small part of the application scene. There are some other people think is worth discussing, with hair standing on end “such as time dependent anti incentive mechanism (time-dependent disincetivisation), but for the sake of simplicity, we here first not listed in the.
RICOs, or “reversible ICOs” is a concept proposed by @frozeman in Devcon4, the idea is to let investors according to the progress of the project “reverse” to recover the investment, thus empowering investors and greater security. We talked about a similar concept, called SICOs, or “ICOs” service flow.
Money is not a one-time investment, give out the project, but in a flexible form of contract holders, are allocated according to the passage of time. The project can be a small part of the funds in the extraction of active contract during the day, but investors have the right to withdraw their remaining principal in the project is stopped.
The stream data structure should be as follows:
Sender: to intelligent contract savers
Recipient: to get money from the payee in intelligent contract
TokenAddress: used as payment assets ERC20 token address
The balance: streaming service contract can be assigned to the remaining balance of the money
Refer to the following definition of timeframe:
Refer to the following definition of rate:
Start: streaming service at the beginning of the block height
Stop: stream service at the end of the block height
Payment: from the payer payee to transfer money
Interval: from the payer payee to transfer money once a long time
All the data returned to the streaming service, if Id refers to a valid service flow
Function getStream (uint256 _streamId) returns (address sender, address recipient, address tokenAddress, uint256 balance, uint256 startBlock, uint256 stopBlock, uint256 payment, uint256 interval)
According to the current service given ID and address, return contract available balance.
Function balanceOf (uint256 _streamId, address _addr)
Create a new streaming service between msg.sender and _recipient.
MUST allow senders to create multiple streams in parallel. SHOULD not accept Ether and only use ERC20-compatible tokens.
Triggers Event: LogCreate
Function create (address _recipient, address _tokenAddress, uint256 _startBlock, uint256 _stopBlock, uint256 _payment, uint256 _interval)
From the available balance in cash.
Only the recipient can carry out this operation.
Triggers Event: LogWithdraw
Function withdraw (uint256 _streamId, uint256 _funds)
Stop the flow of services, and the remaining funds to the payer and payee.
To allow the payer and any party can carry out this operation.
Triggers Event: LogStop
Function stop (uint256 _streamId)
Update stream service terms.
To allow any party can put forward the operation request, but both sides must all take effect after signature.
Triggers Event: LogUpdate
Function update (uint256 _streamId, address _tokenAddress, uint256 _stopBlock, uint256 _payment, uint256 _interval)
Some of my questions
After the draft of the ERC standard, I still have some questions:
To measure the time block number, this feasible? There is no potential problems?
If continuous payment in a very short time interval, such as a second for a fee, do gas, how to ensure that the transaction is packaged successfully?
Suppose the smart stream service in this contract is in a large amount of money, is expected to slowly pay out in ten years, so that a large amount of money will continue to attract hackers in a contract? Like the the DAO case.
On the implementation of intelligent contract, means the payer and the relationship of money completely transparent open, no privacy? For example, in this way wages, the whole world knows how much money I pay?
There are several application scenarios seem not ideal (the center of the month, according to the time of charging mode may have better), a new scene is more appropriate? There is no previous scene?
Welcome to discuss.