The high price of EOS RAM has become the focus of EOS community these days. As you can see in the following graph, the EOS RAM price has been hiking up rapidly since the beginning of July, from 0.11 EOS/kb to 0.91 EOS/kb, and gradually went down to 0.2684 EOS/kb at the time of writing.
To learn more about what has happened, it is essential for you to learn some basic knowledge about EOS RAM. This article provides beginners with a full picture of EOS RAM.
What is RAM?
In computer science, RAM (Random Access Memory) is a form of computer data storage that stores data and machine code currently being used. When running an application, RAM is used to hold active data for a short period of time because RAM is very fast when it comes to reading and writing. Such data includes keys, balances and contract state.
However, EOS RAM is a more complicated concept. It does not precisely correspond to the RAM concept in computer science. Simply put, it is all the resources used except CPU and bandwidth in EOS, roughly corresponding to RAM and database in computer science sense.
Who needs RAM on EOS?
DApp developers do. RAM is a precious resource to their development of dApps. Storage of application state will require a dApp developer to ensure there is enough RAM until that state is deleted. When RAM is insufficient for a dApp, some operations are unable to carry out and smart contracts cannot be deployed.
What’s the relationship between EOS tokens and EOS RAM?
EOSIO is a powerful infrastructure for dApp developments. It is designed in a way that the allocation mechanism of RAM, along with other crucial resources for EOSIO users, is embedded in its token ecosystem.
For dApp developers on EOSIO, there are mainly three kinds of resources needed:
EOS token holders can exchange the liquidity of EOS tokens for the resources in the system, or simply put, they can stake EOS tokens and bear the risk of potential price volatility to exchange for resources on EOS. However, the allocation of RAM allocation is quite different from the other two resources.
For bandwidth and CPU, token holders can stake their tokens to get access to the amount of resources proportional to their staked tokens. Whenever some resources are spared, and token holders want to release the tokens staked, they can un-stake to get back the exact number of tokens they have staked. That is, the exchange rate is fixed, and there is no exchange-rate risk to be borne by token holders.
It is not the case for RAM. Token holders bear the exchange rate risk between RAM and EOS. When they free the RAM resources in their hand, the EOS tokens they get back generally does not equal to the number they staked. The so-called RAM “trading” is actually this stake and un-stake activity (however, with exchange risk between EOS and RAM). There is no peer-to-peer trade and transfer of RAM, and the counterparty of all players is the system market maker (i.e. system contract).
How does EOS RAM Allocation Model work?
The big change in EOS RAM Allocation Model is in EOSIO Dawn 4.0. Under the Dawn 3.0 system contract, token holders can only sell RAM for the price they paid, just as the other resources. You can check more details in Daniel Larimer’s article. EOS switched to a market-based allocation approach using the Bancor algorithm from Dawn 4.0.
Rationale behind a Market-Driven RAM Allocation Model
It is reasonable for the existence of this RAM sub-market.
For the older version where the exchange rate is pegged, the upside is to disincentivize hoarding and speculation, as no extra EOS could be gained by merely buying and selling RAM: you always get what you have paid.
However, the lack of market mechanism causes some allocation efficiency problems. Think about a dApp developer, say Peter, who bought 1,000 EOS and staked 500 EOS for RAM resources for developing a dating dApp on EOS. However, his dApp turned out to be incompetent when a better dating dApp appeared and few users remained. Peter stopped his dApp 2 months later, however, seeing the rising price of EOS tokens, he did not sell the token, and there’s no incentive for him to un-stake his RAM. These RAM resources will therefore be wasted as a result of inefficient allocation. With the market-driven model, Peter can receive capital gain from un-staking his RAM, and therefore willing to free the resources.
A simple Illustration of Bancor Algorithm
Bancor Relay Algorithm used in EOS RAM Allocation Model can be explained using a simple example:
Peter holds 1,000 ABC tokens in his wallet and wants to exchange it for XYZ tokens. What he does using a market with Bancor Relay Algorithm is:
1. Buy the relay token (kind of IOU with floating rate of return within a sub-market) named ABCXYZ using what he has, that is, 1,000 ABC tokens. He has to pay a fee for this conversion, say, 0.1% of 1,000 ABC, that is, 1 ABC tokens. Therefore, now he has 999 ABCXYZ tokens
2. There are many traders in this ABCXYZ sub-markets. Some buys the relay tokens with ABC while others with XYZ. A relay token always contains 50% value of each of its two connectors. Simply put, when ABC tokens’ supply is less than that of XYZ tokens, the price of ABC tokens in this sub-market will rise, and vice versa.
3. According to the Economics 101, when the exchange rate of ABC and XYZ in this sub-market is different from that in the external market (exchanges). there will be arbitrage chances that will finally drive the exchange rate to the same level.
4. When Peter wants to take out XYZ, he has to pay a fee, say 0.1%, and receive the number of XYZ according to the current exchange rate.
EOS RAM uses quite the similar algorithm; therefore, this algorithm ensures that the free market is setting the price. The system market maker is purely responding according the algorithm. EOS token holders can stake EOS to the system (and pay a 0.5% fee for this action), bearing the risk of potential price volatility, and in exchange get access to RAM resources of the system proportional to their staking tokens. When there is more RAM than needed, token holders can un-stake their staked EOS from the system (and pay a 0.5% fee for this action), freeing the RAM resources for future allocation to more needed developers.
Challenges and Solutions of EOS RAM allocation algorithm
As more dApp developers join, and more data needed to be stored for a long time, more RAM used is extracted out of the market, making RAM more and more expensive.
Daniel Larimer (BM) has written an article on b1’s plan to lower EOS account creation fees. Here is the article.
There are 3 steps for b1 to fix this problem.
1. Increase RAM Supply: The EOS blockchain has been configured for a total of 64GB of RAM. B1 has released an update to EOSIO system contract that enables BP to specify a rate-of-increase of RAM
2. Lower Account Memory Usage: B1 will provide an update to the system contract to reduce the minimum account creation RAM requirements by almost 50%
3. Free Accounts with Block.one’s iOS Wallet: B1 is building a free iOS hardware wallet using Apple’s Secure Enclave to offer a free EOS account.
The continuous increase of supply can satisfy the future increase of demand for EOS resources.
The speculators’ irrational behavior on RAM will push RAM high, making it expensive for dApp developers to buy the resources they need, and thus deteriorating the ecosystem. There is large amount of RAM, due to the speculation or other reasons, are unused, causing a waste of RAM resources.
Candidate Solution A:
The Bancor Relay algorithm, as described above, has some parameters that impact how fast the price moves in response to incoming requests to buy and sell RAM. It determines the sensitivity of the price of the sub-market to the dynamics of supply-demand relationship, and the shape of the orderbook and the degree of slippage someone would see when buying or selling a large quantity.
Daniel Larimer has mentioned in his article that this parameter is set at .05% rather than 50% due to an unintentional configuration of the Bancor Relay weights on the EOS blockchain, and he recommended to update this parameter to the intended value of 50%. This adjustment will allow market participants to interact with the market maker to push it back toward market value in a more efficient way. It will provide a more predictable and stable market for both RAM speculators and RAM users.
Candidate Solution B:
Eyal Hertzog, Bancor Co-founder & Product Architect suggests in his article that one solution is to continuously burn EOS tokens from the RAM contract. The declining EOS supply makes its value higher relative to RAM, and thus decrease the price of RAM dominated in EOS.
This solution represents a form of “rent” costs on the RAM that is being used. By changing the RAM contract to burn EOS at a constant rate, speculation becomes riskier. Speculators must predict that dApps (or additional speculators) will buy RAM at a certain rate, rather than simply anytime in the future. This would have a similar effect to continuously adding RAM to the contract; however, adding RAM is labor intensive and could take some time for testing and community readiness.
The design of EOS RAM allocation system is a crucial part of EOS ecosystem. The high price of EOS RAM may imply people’s upside expectation of EOS’ future, or may just indicate the disorder of speculation and impede EOS’ development. No matter what condition it is, in a decentralized world, what we should do is to keep optimize the mechanism together to make everything work more efficiently.
Some helpful websites for you to track data about EOS RAM
Find more information about EOSREAL :
EOSREAL is dedicated to EOS governance from the very beginning. Our team is multicultural, professional in different fields such as compliance, psychology, finance/economics and international affairs.
Please vote for EOSREAL: eosrealbpcsg
Website : Mail: eos[at]eosreal.com