In August 2018 EOS community was shaken up by Dan Larimer’s “Proposal for EOS Resource Renting & Rent Distribution” whose main proposal was to launch the Resource Exchange (REX). The idea behind REX was to create an efficient market for people to lend and borrow resources, thus, solving the problem that existed on the platform at the time. Lenders get to convert their EOS and make stable profit out of it while developers who require resources can borrow them paying a relatively small fee.

With the REX testnet being up and running for some time now, we at Attic Lab decided to see how it works in practice and whether it functions as expected.

Goals

The idea was to get a practical grasp of the mechanics of CPU and NET leasing on the REX platform as well to understand the system of pricing and income distribution.

Besides that, the process of testing shed light on the following questions:

How does the increase of the pool affect the fee?

What happens if all lenders sell REX for EOS while having existing contracts?

Testing method

In order to test the platform, we launched a local testnet and created 8 different accounts to participate in trading (6 lenders and 2 borrowers). The process was split into 2 rounds of transactions (for simplicity done on 2 separate days 4 days apart from one another). Altogether 4 deals were concluded on the first trading days and 1 deal on the second.

REX conditions

Trading on REX is only possible after staking EOS for voting. You can vote for minimum of 21 BPs or a proxy.

For simplicity of the article we assume that the rate of REX in relation to EOS is 1:1 (note that in cleos command line the rate is technically set to 10,000 REX for 1 EOS)

You cannot withdraw your funds from the REX pool sooner than 4 days after you have joined it.

First trading day

Overall, 5 lenders and 2 borrowers participated in the first trading day. All 5 lenders bought different amounts of REX for EOS. The table below shows the accounts with their REX balances.

This created a REX pool of 300 EOS. The pie chart shows the share distribution within the pool .

All the lending accounts voted for the proxy after which 2 borrowers conducted 4 CPU lease transactions for total amount of 200 EOS. As a result the lenders earned 27 REX on the first trading day which was added to the pool.

This is what the lenders balances looked like after the first trading day.

Second trading day

Second trading day was set 4 days apart from the first one. A and D decided to sell their REX and received 1.8 EOS and 7.2 EOS of profit respectively. Their stake participated only in 1 trading day, and the income derived only from 4 transactions.

Looking at the figures and their share in a pool, it can be concluded that everything worked correctly.

Additional lender F decided to join the REX pool with a total balance of 200 REX.

All these actions resulted in the change of the total pool balance which looked like this:

New REX pool = P-(A+D)+F,

where P = 327 and is the balance of the pool after the first trading day, so

New REX pool = 327-(21.8+87.2)+200 = 418 REX

Subsequently, the changes in the pool changed the share distribution.

On the second day there were 2 leasing transactions borrowing 100 EOS which brought 10 REX of profit to the lenders.

After the second trading day all the lenders sold their REX. B, C & E received their profit for 2 trading days while F only for 1 day.

Here’s what the final balances of all the lenders look like after 2 trading days.

Summary

After testing REX we can say that it works correctly and as expected. 10% of REX in the pool gives you the right to receive 10% of the profits from all the transactions concluded within 24 hours. Consequently, REX gained from transactions increases the REX pool.

Note that although the lender knows what share of the overall profit he is due to receive, he has no knowledge of the exact amount of EOS he earns.

REX can be sold for EOS 4 days after the initial transaction. In fact, the sale of REX by lenders at any time after the 4-day period has passed does not affect the transactions concluded with borrowers.

It is also worth mentioning that the lender cannot set the fee since the software does not provide such an option. Will the community find a borrower-centric market where the fee is regulated only by borrowers sustainable? This question is yet be answered.

Follow us!

Twitter: https://twitter.com/atticlab_it

Reddit: https://www.reddit.com/user/atticlab_it

Website: http://atticlab.net/eos/

Facebook: https://www.facebook.com/atticlab/

Steemit: https://steemit.com/eos/@attic-lab

Medium: https://medium.com/eosatticlab

Golos: https://golos.io/@atticlab

Telegram Chat: https://t.me/atticlabeosb