Introduction of REX

in #starteos4 years ago

What is REX?

REX is the abbreviation of "Resource Exchange" and was first officially proposed by Block.One on 8 August 2018. It is a risk-free network resource leasing market created in the EOS blockchain. This exchange allows Token holders to lease their idle EOS to Dapp project parties, organizations or individuals in need in order to earn "rents", RAM interest and account auction fees.

At the end of 2018, the development of DApp on EOS ushered in a small climax. While ordinary players were addicted to a variety of spinach games, the game mining gameplay was also extremely hot, which directly caused the mainnet CPU resources to be strained. The money gamer staked more EOS monopoly CPU resources, and did not optimize the consumption of resources from the code, which caused the CPU price to soar, and once made a large number of ordinary accounts unusable and required "activation" by others. At the time, according to DAppTotal, "The TOP10 quiz game consumes 84.15% of the CPU resources on the entire network." In this context, in order to solve the problem of resource constraints, the concept of REX put forward by BM in August 2018. After a series of simplifications and borrowing from the actual situation of the existing EOS CPU leasing, today's version is available.

Why do we need REX?

When REX was first proposed, EOS was highly congested, affecting ordinary users' normal on-chain transactions. It is also important that large distributed applications (DApps) worry about the scarcity of resources required to run DApps, leading to rising development costs. The resource leasing market can effectively solve the problem of resource demand. For example (the following data is for reference only): when you only have 100EOS, you can only mortgage 100EOS CPU / NET, and the same 100EOS can lease 10000EOS CPU / NET. For projects, organizations and individuals with huge resource requirements but limited EOS balance, leases are more attractive than mortgages.

What is the REX exchange ratio? How to make a profit?

The REX mechanism is: User A transfers EOS to the REX contract, and the contract will issue REX according to the rules. User A can exchange REX with EOS one day in the future. The difference between the two EOS amounts is interest.
According to the rules, the price of REX will not fall, therefore, holding REX can obtain stable income. And the longer you hold it, the greater the return.

Before calculating the exchange amount of EOS and REX Token, write down a conversion ratio:

total_eos: The total number of EOS in the EOS fund pool of REX, the source is the number of EOS exchanged from REX Token and the rental income in REX; it also includes the new processing fee for buying and selling EOS RAM and the new cost of short account bidding.
total_rex_token: The total number of tokens in the REX Token pool. The source is the total amount of REX converted from EOS to REX Token through buyrex.
The default initial value of rate is 10000.

EOS REX Token calculation:

image.png

How many REX Tokens can EOS be exchanged for? Simply multiply the number of EOS by the above rate value.

Leasing EOS Resources from REX:

image.png

When you need to lease CPU / NET resources, you can use a small amount of rent EOS to lease the right to use CPU / NET resources for 30 days from the REX system. At present, there is only this fixed lease period (30 days); at the same time, you can provide a renewal Lease funds which can be automatically renewed when the lease expires.
At the same time, EOS rents enter REX's EOS funding pool as revenue.

Lease calculation formula:

image.png

Pay a certain amount of EOS, and the resources that can be obtained, such as the number of CPUs, can be obtained by the above formula. total_unlent: indicates the number of EOS not leased in the EOS funding pool.
total_rent: The revenue after renting resources. The initial value of total_rent is 20000.
(Check the source code of REX and find that there is a total_lent: it is the number of EOS that has been rented. In addition, it is necessary to note that there is an interface setrex in the contract, which can directly adjust the value of total_rent, which affects the rental price.)

From REX to EOS:

After converting EOS to REX, there will be a 4-day lock-up period, after which the REX can be sold for EOS.

REX to EOS calculation:

image.png

Investment gains and losses:
From the above-mentioned swap between EOS and REX, if there is no additional source such as EOS rent, the conversion ratio between EOS and REX is fixed; once there is EOS rental income, etc., it will cause the EOS fund pool to grow more than The increase of REX, so that the same amount of EOS can be exchanged for fewer REX Tokens; if EOS RAM fees and short account auction income are added, the EOS fund pool will grow faster.
However, when REX is converted into EOS, the income of REX is shared according to the proportion of REX held in the total REX. Therefore, the worst return on investment is to convert REX to the original EOS amount. Therefore, the exchange ratio will not drop, so it will not lose money! !!

REX system specific exchange rules (easy to understand):
REX exclusive EOS pool total = EOS bought REX + rent for resource rental + RAM transaction fee + short account bidding fee
The number of REX that someone can redeem = the number of EOS someone is going to redeem × (the total number of REX issues / the total number of REX exclusive EOS pools)
The amount of EOS someone can redeem = the total amount of EOS in REX × (the amount of REX someone is going to redeem / the total amount of REX issued)

  1. How does REX trade?

Buy REX

In order to qualify for REX purchases, users must vote for at least 21 nodes or delegate their votes to an agent.

There are two ways for EOS holders to convert EOS to REX Token:

One is: deposit EOS into a REX fund, and then exchange the deposited EOS into REX Token (note that the newly generated REX Token, and the REX Token cannot really be bought and sold, just for convenience of calculation).
The other is: directly un-mortgage the EOS that has been mortgaged and exchange it for REX Token. At this time, it does not need to wait for 72 hours to un-mortgage.

When you buy REX, the paid EOS goes directly to the EOS pool dedicated to REX, and the EOS mainnet is uniformly leased.

  1. Sell REX

After you convert EOS to REX, if you want to convert it back to EOS, the redemption period is generally 4 days, but if most of the EOS in the REX pool has been leased, it is not enough to pay the amount of redemption, you need to wait for new users to purchase REX, up to Need to wait 30 days (rental expires).

Knock on the blackboard and draw the key points:

image.png

  1. Before redeeming REX Token, you need to vote for 21 super nodes or delegate voting to an agent account;
  2. REX Token cannot transfer transactions between ordinary accounts, it is only an intermediary tool for EOS lease;
  3. After exchanging REX Token, it can be exchanged for EOS at least 4 days later, but if most of the EOS in the REX pool has been leased, it is not enough to pay the redemption amount, you need to wait for new users to purchase REX, and you need to wait up to 30 days (the lease expires) );
  4. If you lease CPU / NET from REX, the minimum lease period is 30 days;
  5. The transaction fees of RAM and the new income generated by the auction of account names will be imported into the REX pool, providing an additional source of returns for REX holders.

For EOS holders, REX is a way to obtain stable returns. And to participate in REX, you must first vote. Therefore, the launch of REX will encourage more and more people to participate in node voting elections. The number of voters increases and the scope is wider. The EOS mainnet will also become more and more robust. At the same time, more and more people will pay attention to EOS nodes and the EOS community to promote the healthy development of the EOS ecosystem.

For DApp developers, the emergence of REX will play a matchmaking role. EOS holders can lease their idle CPU and NET resources to earn income; the project party or other demanders can lease CPU and NET resources at a reasonable price from the REX market without the need to purchase EOS and mortgage EOS. . This will greatly reduce the development cost of the EOS DApp project and promote the healthy development of the EOS ecosystem.

Note: The number of REX will not change, the change is the conversion ratio of EOS / REX, it will only increase, it will not decrease.

Coin Marketplace

STEEM 0.27
TRX 0.13
JST 0.032
BTC 65122.20
ETH 2988.31
USDT 1.00
SBD 3.68