CPU, NET & RAM — The raw materials of the EOS economy

EOS is pioneering a new digital economy, and like any economy, it requires raw materials for the production of goods and services. The commodities used to build and interact with finished products on the EOS network are RAM, CPU and NET(Bandwith). While RAM is utilized exclusively by developers building decentralized applications, CPU and NET are needed by ordinary users wishing to interact with applications on the blockchain. It can be quite daunting for first-time dApp users to configure their system to access dApps and future simplifications are crucial if EOS is to reach mass adoption. In the meantime, however, this tutorial will get you up & running playing dice games on EOS in no time.

CPU and NET: The what
CPU and NET are two concepts unique to EOS that were imported from wider computer science vocabulary. CPU stands for central processing unit and refers to the piece of hardware responsible for executing instructions and processing information in a computer while NET is a synonym for internet bandwith. On the EOS chain, these terms take on a slightly different meaning.

CPU is a time-denominated resource which measures the amount of time an EOS BP should dedicate to transactions from your account.

NET is a space-denominated resource measuring what share of a blocks’ network representation can be used to store your transactions as they transmit on the P2P layer.

CPU is calculated in microseconds. NET is calculated in bytes. The amount of each resource that each staked token secures you is determined by the relative capacity of the network.

CPU, NET and RAM are the resources with which EOS products and services are built.

CPU and NET: The how
CPU and NET are regenerable resources that can be acquired by staking EOS tokens. Staking is the process of locking up your tokens in order to allocate yourself CPU and NET. Your staked tokens are also the amount of voting power you have to elect the Block Producers of your choice. Depleted resources a renewed eventually, allowing you to further stake and transact.

Step 1a: Create an EOS account on the mainnet
Currently, EOS account creation suffers from a chicken and egg problem. In order to create an EOS account, you need CPU and NET which can only be obtained by someone with an EOS account. Thankfully, there are resources that can help you generate a new account. Go to

https://eos-account-creator.com/. An EOS account is broken down into an owner and an active account. The active key is used for daily operations such as staking, transferring and voting while the owner account is the administrative key that allows you to change both owner and active keys in addition to all other functions.

Note: This step cost about $6 to execute.

Step 1b: Download and install scatter
Scatter is the EOS wallet used by nearly all decentralized applications today. It is available for Windows, Mac and Linux at https://github.com/GetScatter/ScatterDesktop/releases/.

Once you have installed scatter and followed the prompts to keep your keys and recovery phrase safe, navigate to your Vault and search for your EOS public key. Generate two sets of keys to use in account creation 1a, one active and one owner

Step 2: Stake some tokens and get started
Scatter allows you to stake tokens from within the wallet in order to use dApps. Simply navigate to the account in your vault that you wish to use (owner or active account) and select ‘ click to manage account.’ This will bring you to a resource dashboard showing the amount of RAM, CPU and NET you have access to. Should you wish to make one transaction a day, 0.1 EOS staked should suffice for CPU and RAM. Interacting with dApps requires more CPU and NET, meaning around 1–3 EOS are needed for staking.

RAM: A dApp developer’s whiteboard
In traditional computer science terminology, RAM or Random Access Memory, temporarily stores all the data relevant to current operations, serving as the computer’s ‘working’ memory. Similarly, RAM on the EOS blockchain is responsible for holding data such as keys, balances and contract state for a short period of time. dApp builders use RAM’s quick read and write capabilities to store the state balances of users interacting with their applications. Insufficient RAM will hamper dApp performance. Unlike CPU and NET which are regenerable, RAM is a scarce resource priced according to the unique Bancor liquidity algorithm (explained in this video by Eyal Hertzog, Chief Architect at Bancor.) In the early version of EOSIO, users could only sell RAM for the price they paid for it. However, this disincentived holders and developers from releasing their idle RAM back to the market. As a result, Block.one switched to a market-driven allocation model that would price RAM according to demand and supply. A smart contract holds reserves of both EOS and RAM, using the ratio of available RAM to EOS tokens in the contract in order to calculate the price of RAM.

The RAM market, built on Bancor technology, is priced according to supply & demand

Speculating with memory
Applying free market economics to the EOS RAM market is an invitation for speculators to enter the RAM market and trade the price swings. While speculation can contribute to price discovery, in times of increasing RAM prices traders are likely to hold onto their unused RAM in anticipation that RAM demand from large dApps will drive the price up even further. dApp developers will, therefore, incur unforeseen expenses while speculators horde empty RAM. A solution proposed by Eyal Hertzog, Chief Architect at Bancor, and Beni Hakak, CEO at LiquidEOS, is to burn EOS tokens from the RAM contract in effect decreasing the price of RAM over time, making it less attractive for speculators to hold onto their RAM.

Unlike other smart contract platforms, EOS does not charge gas fees for executing transactions, preferring to utilize a stake-based ownership model. In exchange for staking EOS tokens, users and developers can access the CPU and NET resources required to build and run decentralized applications while RAM can be bought and sold at market prices using Bancor relay technology. Increased network usage will inflate the cost of these EOS raw materials, particularly RAM, making it untenable to build dApps. Adding in the possibility of speculators accumulating unused RAM for profit-making purposes further amplifies the risk of dApps becoming too expensive to build. For EOS adoption to scale, the market for RAM needs to develop into a more efficient and cost-effective economy.

Website
Twitter
Telegram
LinkedIn
Github