07
Apr
20

Decentralized Operating Sysem EOSIO (EOS) explained - Full Guide

Today we are going to learn about one of the most well-known projects in the crypto space – EOS. It aims to become a decentralized operating system that can support industrial-scale decentralized applications. Over the last couple of years, EOS has become one of the most polarizing projects in the crypto space. The believers feel that EOS is the “Ethereum-killer” and brings together the best features of the various smart contract technologies. On the other hand, detractors believe that EOS is a highly-centralized platform due to its decentralized proof-of-stake (dPOS) mining algorithm.

 
Block.One Team member images
 

The company that created EOS is called “Block.One”. The CEO is Brendan Blumer, who has been involved in the blockchain space since 2014. However, the main star of the show and the face of EOS is CTO Dan Larimer. Aside from EOS, Larimer also created the delegated proof-of-stake consensus algorithm, decentralized organizations, aka DAOs, BitShares, and Steem.

 

EOSIO and EOS

 

At the core of EOS lies EOS.IO and the EOS tokens.

 

EOSIO

 

EOS.IO is the underlying software that powers the ecosystem. It uses blockchain architecture that is built to enable vertical and horizontal scaling of decentralized applications. It possesses a lot of attributes of a real computer such as hardware for processing (CPUs and GPUs), RAM, hard-disk storage, and computing resources distributed evenly among EOS crypto holders. There are two main objectives that the platform seeks to achieve:

 

  • Scalability.
  • Eliminating transaction fees.
  •  

    EOSIO accomplishes by integrating both multithreading and a version of the proof-of-stake consensus protocol.

     

    EOS tokens

     

    The EOS token is the cryptocurrency of the EOS network and powers the EOSIO protocol. It is a utility token that plays multiple roles in the ecosystem:

     

  • A means of exchange.
  • A staking coin.
  • It provides a proportional amount of bandwidth and storage on the blockchain. Eg. Owning 0.5% of the total EOS supply gives you 0.5% of the total bandwidth and storage.
  • Holding EOS tokens allows you to participate in on-chain governance. Your voting power will be proportional to your stake.
  • As opposed to Ethereum, where developers need to pay high gas fees, a developer can simply hold on to EOS tokens to be eligible to use network resources and to build and run dApps.
  •  

    EOS and Scalability

     

    The biggest problem in the blockchain space is scalability. Bitcoin can manage only 7 transactions per second (tps), while Ethereum can only do 15-20 tps. When you compare this with traditional payment methods like Visa (1667 tps) and PayPal (193 tps) then it falls pretty flat. A big reason as to why both of these protocols are so slow is the proof-of-work (POW) consensus mechanism. Let’s do a quick overview of the POW protocol:

     

  • There are specialized nodes in the network called “miners” who use their ASICs and GPUs to mine cryptographically hard puzzles.
  • The puzzles require a lot of computational power and energy to solve. It has been purposely designed like that.
  • When the miner has successfully solved this puzzle, they present it to the entire network for verification.
  • The moment more a supermajority of the network (> 2/3rd) approve the block, it gets added to the blockchain.
  •  

    In a nutshell, that’s how POW works. However, the process is highly wasteful and sluggish, which is why several projects have started opting for virtual consensus mechanisms like proof-of-stake (POS).

     

    What is POS?

     

    POS uses a staking mechanism instead of ASIC/GPU mining. Instead of miners, POS uses validators.

     

  • The validators lock up some of their tokens coins as a stake within the ecosystem.
  • Validators get a validating and voting power directly proportional to their stake.
  • The validators validate a block by placing a bet on it.
  • When the block gets added to the blockchain, the validators will get a reward proportionate to their bets.
  •  

    While POS is not as wasteful as POW, the block will still need to be verified by a supermajority of the entire network. EOS will be using a variation of the POS algorithm called the delegated proof-of-stake (DPOS). If properly executed, EOS claims that its system will be able to compute millions of transactions per second.

     

    What is DPOS and how is it different from POS?

     

    Image Credit
     

  • Instead of working with the entire network, DPOS just deals with 21 special nodes known as “Block Producers.”
  • At the start of every round, 21 block producers are chosen. Top 20 are automatically chosen, while the 21st one is chosen proportional to the number of their votes relative to the other producers.
  • The producers are then shuffled around using a pseudorandom number derived from the block time.
  • EOS wants to maintain a block time of < 500 milliseconds. This is why block producers are expected to produce blocks continually and are punished for not participating.
  • In the event of a fork, the DPOS consensus automatically switches to the longest chain.
  •  

    Criticism of DPOS

     

    While DPOS does cut down on time and deliver very high speeds, a lot of people are concerned about the fact that only 21 people are in charge of network consensus and overall well-being. This puts a lot of power in the hands of the few.

     

    How does Block Producer election work?

     
    block producer elections
    Image Credit
     

    Any EOS holder can vote for their block producer through a continuous approval system. The block producers will be allowed to produce blocks proportional to the total votes they receive relative to all other producers. However, producing blocks is just one of the many critical tasks that the BPs take care of.

     

    As we have mentioned before, when you stake EOS, you receive resources like network and CPU bandwidth. As the price of EOS fluctuates, it shouldn’t affect the number of resources you have at your disposal. In cases like these, it is up to the block producers to maintain the relationship between resources and tokens. The BPs must work on bringing the cost per unit of resources down to a reasonable range.

     

    As you can see, voting for the right BPs is extremely important for EOS. It is critical for the community to not suffer from voting apathy and feel like their vote won’t change anything. This is why EOS has a system called “vote decay.” The vote decay system works like this:

     

  • The power of each vote halves every year.
  • The voter can reassert the strength of the vote by revoting every week.
  • Not only does this give voters the power to re-evaluate their vote, but it also holds the block producers accountable for their actions. After all, if they don’t do their job well, the vote will be given to someone else.
  •  

    This idea is so revolutionary that it has the potential to change the concept of voting forever. As SpringWorks CEO, Kartik Mandaville puts it:

     

    “The base time for the calculation of weight is Jan 1st, 2000. Now instead of rewriting the weighted vote to the blockchain every time, Dan came up with the idea of increasing the weight of the future votes. eg Jan 1st, 2019 is 2¹⁹ and Jan 1st, 2018 is 2¹⁸ — this makes the vote on Jan 1st, 2019 twice as powerful as Jan 1st, 2018.”

     

    However, there is a potential obstacle here. What if the voters choose to automate the voting with bots instead of being wholly involved with the system? Dan Larimer addressed this issue by saying:

     

    “We recommend that the constitution contain language forbidding the use of automated voting bots as the purpose of vote-decay was to ensure that voters re-evaluate their decisions rather than ‘set-it and forget it.’ While it is not possible to prove the use of bots, it will be possible to prove that people do not use smart contracts to auto-vote.”

     

    Resource allocation in EOS

     

    One of the more exciting value propositions of EOS is the elimination of transaction fees. This is currently a massive problem in Ethereum. The gas price involved in the early stages of development in Ethereum can be enough to turn off new developers. EOS works on an ownership model whereby users own and are entitled to use resources proportional to their stake, rather than having to pay for every transaction. So, in essence, if you hold N tokens of EOS, then you are entitled to N*k transactions. This eliminates transaction fees.

     

    As a developer, the three resources that you will require to build your applications are – network bandwidth, CPU bandwidth, and RAM. The moment you stake your EOS, you will get an equivalent amount of network and CPU bandwidth. However, when it comes to RAM, the interchange isn’t that straightforward.

     

    The RAM problem

     

    Image Credit
     

    RAM is an extremely scarce and precious resource. Since high-performance and scalability is such a big deal, it will always be in high demand. Now imagine this scenario. When you stake an amount in EOS, you get some resources in return, and when you return those resources, you will get the original staked amount back. However, this system won’t work economically for RAM.

     

    Early investors will get RAM for pretty cheap, however as more developers come over to build their dApps on EOS, the demand for RAM will go through the roof, which will inevitably increase its price as well. However, if the investors sell back their RAM, they will get back their initial investment and won’t make any profit. This will lead to mass hoarding of RAM.

     

    To mitigate this issue, EOSIO utilized the Bancor algorithm to build a “RAM Marketplace.” Let’s see how it works:

     

  • If someone wants to buy or sell RAM, a 0.5% fee is going to be charged on both the buyer’s and seller’s side.
  • This fee will economically incentivize RAM sellers.
  • The fees collected are eventually burnt to make sure that there is not speculation in the marketplace.
  •  

    Dan Larimer gave a working example of how this marketplace will work in the real world:

     

    “Our math indicates that if 1TB of RAM was allocated on a pro-rata basis to token holders then the cost-per-byte would be $0.018 (assuming $20/token). The reality is that most token-holders don’t actually have an active need to use the RAM they might be entitled to; therefore, we are initially pricing RAM at $0.000018 per byte (assuming $20/token). New accounts require about 4KB of RAM which means they will cost about $0.10. As RAM is reserved the price will automatically increase so that the price approaches infinity before the system runs out of RAM.”

     

    Note: He was working with a 1% fee in this example instead of 0.5%.

     

    A marketplace system will also ensure that RAM is always available. Plus, block producers have the power todd more RAM to the marketplace and increase its supply to curb speculation and demand bubbles.

     

    Getting the most of RAM with parallelism

     

    EOS plans to scale up RAM usage with side chains and parallelism. EOSIO block producers will be able to operate on multiple chains and use the same token for buying RAM. Each sidechain will have more than 1 TB of RAM allocated to them and they will all be able to communicate with each other via IBC (inter-blockchain communication). This opens up some intriguing possibilities.

     

  • Each sidechain will have its own price for RAM. As such, a dApp developer can choose to operate on a sidechain where they get the cheapest price.
  • DApps can buy unused RAM from other sidechains.
  •  

    How Much RAM will your dApp consume?

     

    The EOS Resouce Planner is a great way for developers to know how much money they will need to stake to get the necessary resources for their dApps. Eg. In present market conditions, if you invest 500 EOS each to RAM, Network Bandwidth, and CPU bandwidth respectively, you will get the following amount of resources:

     

     

    The Resource Planner also shows you how much RAM is available and how much is reserved.

     

     

    Right now, nearly 166.50 GB RAM is available in the marketplace.

     
    The Code behind the RAM marketplace
     

    Let’s take a look behind the scenes and see how the buying and selling functions work. A quick lexicon check:

     
    payer: Someone who pays tokens to get RAM.
    receiver: Someone who sells RAM and receives tokens.

    #1 buyram()

    void eosiosystem::system_contract::buyram (
    account_name payer,
    account_name receiver,
    asset quant
    )

    What is it doing?

    Checking the number of tokens provided by the payer and seeing if they can afford the amount of RAM (quant) they are asking for, or not.

    #2 buyrambytes()

    void eosiosystem::system_contract::buyrambytes (
    account_name payer,

    account_name receiver,
    uint32_t bytes
    )

    What is it doing?

    Calculate the exact amount of the RAM that the payer will get and bill them accordingly.

    #3 sellram()

    void eosiosystem::system_contract::sellram (
    account_name account,
    int64_t bytes
    )

    What is it doing?

    Reduces the corresponding amount of RAM from the receiver’s quote and gives them the required number of EOS tokens.

    #4 setram()

    void eosiosystem::system_contract::setram (
    uint64_t max_ram_size
    )

    What is it doing?

    Adjusts the amount of RAM available for sale in the marketplace.
     

    Block Producer rewards and inflation policy

     

    EOS is an inflationary system when the overall supply increases by 5% on an annual basis. This supply will be distributed as follows:

     

     

  • 1% goes to the producers.
  • 4% goes for worker proposal systems.
  •  
    This system was put in place to achieve two things:
     

  • The BPs are generously rewarded for their services.
  • EOS has enough funding for future developments.
  •  

    The 1% that is meant for block producers gets split into further two parts:

     

  • 0.25%. (Block Rewards)
  • 0.75% (Vote Rewards)
  •  

    All the 21 BPs are entitled to the 0.25% block reward in proportion to the number of blocks they discover.

     

    The 0.75% share gets distributed among the 21 BPs and the rest of the standby producers in proportion fo the numbers of votes they get, provided they fulfill the two following conditions:

     

  • The vote rewards need to go out once daily.
  • The producers need to qualify for at least 100 EOS tokens.
  •  

    EOS believes that this mechanism will economically incentivize low-performing producers into stepping up and doing more and better work.

     

    What about the worker proposal systems?

     

    The worker proposal system is basically a protocol that allows the community to vote on future network improvements. The 4% collected here is supposed to finance that in the future. The majority of the funds raised here will be used for research and development on the EOS blockchain, but there are also proposals of keeping some of the tokens for charitable and relief purposes.

     

    DApps on EOS

     
    Finally, let’s look at the dApps operating on EOS. The smart contract language that developers will be using to code on EOS is “Web Assembly,” which is a mobile stack machine that is developed at the World Wide Web Consortium. Anyway, so what’s the current dApp landscape on EOS? We will be taking data from DApp Radar and the numbers have been taken from the last 24 hours.
     

    Ranking dApps by users

     

     

    Firstly, let’s look at the top five most popular dApps on EOS. Only EOS Dynasty, a gaming dApp, and IPSE, a search engine, have more than 2k users. In the top five, three are gaming dApps. Rounding off the top five with a little over 800 users is Newdex, a decentralized exchange.

     

    Ranking dApps by transaction volume

     

     

    While Newdex may have a little more than 800 users, it has, far and away, processed the highest transaction volume with a whopping $9.7 million. Apart from that, the rest of the top five is full of gambling dApps.

     

    Ranking dApps by total transactions

     

     

    Now let’s look at the five busiest dApps on EOS with the most number of transactions. WhaleEx, an exchange, has had the most amount of transactions with 226.6k. Up next, we have two gambling and one gaming dApp, while HireVibes, a job-seeking platform round off the top five.

     

    Conclusion

     

    So, there you have it. Everything you need to know about EOS, one of the most famous and infamous projects in the crypto space today. According to EOS Network Monitor, EOS achieved an all-time high of 3,996 transactions per second, which is eons above anything Bitcoin and Ethereum have ever managed. Despite this, it is a little bit of an anticlimax to see that the majority of the dApps built on EOS are gaming or gambling dApps. Here’s hoping that EOS will be able to host some killer, game-changing dApps in the near future.

    disclaimer

    CHAIA.iO is not a registered investment, legal or tax advisor or a broker/dealer. All investment/financial opinions expressed by CHAIA.iO or the authors of the respective articles on www.chaia.io are from personal research and experience of the owner of the site or the authors and are intended as educational material. Although best efforts are made to ensure that all information is accurate and up to date, occasionally unintended errors or misprints may occur. You should take independent financial advice from a professional in connection with, or independently research and verify, any information that you find on our Website and wish to rely upon, whether for the purpose of making an investment decision or otherwise.

    Rajarshi Mitra
    Blockchain Researcher