RAI System Simulations: Part 2 — RAI Traders

Money God
Reflexer
Published in
7 min readJun 21, 2021

In Part 1, we discussed the behavior of SAFE owners and how they affect the market price of RAI.

In this post, we will discuss RAI traders and see how they provide stability in the RAI system.

Where we left off

In the current simulation, the behavior of SAFE owners causes RAI/ETH to generally move inversely to the price of ETH. This is due to SAFE owners minting/selling RAI when ETH goes up and buying/repaying when ETH goes down.

This moves RAI/USD away from the redemption price. In turn, the controller detects this deviation and responds, moving the redemption price away from RAI/USD and in the same direction as the original ETH/USD movement.

RAI Traders

As a reminder, the redemption price is the system’s internal value for RAI/USD. If the system was to undergo Global Settlement, each RAI can redeem this amount of underlying collateral.

In the above RAI/USD chart, the market price is frequently above or below the redemption price. Some actors will believe the market price of RAI should be close to the redemption price(what RAI is worth at global settlement). For those actors with this faith in the redemption price, these are opportunities to sell/buy RAI.

For example, examine the final portion of the above RAI/USD chart. Some users might believe the final price of RAI, about $3.13, is too low a valuation of RAI when the current redemption price is $3.31.

Further, since the redemption rate(shown as APY) is positive at this time, the redemption price is increasing. So the future redemption price will be even greater and the current market price of RAI is an even better deal.

RAI actors can use the current redemption price and current redemption rate to estimate the future redemption price.

Defining the RAI Traders

Let’s define a simulated RAI trader strategy with two parameters

  1. Price Deviation: the deviation from the redemption price at which the trader will buy/sell RAI on the market. eg. “ When RAI/USD is 3% above the redemption price, I will sell RAI”
  2. Timeframe: the future timeframe in which to value RAI, based on the current redemption rate. eg. “When RAI/USD is 5% above what the redemption price will be in 7 days, I will sell RAI”

This strategy combines these two parameters to sell/buy RAI when the market price is too high/low against some future redemption price.

The traders will use the following strategy:

if market > redemption_price_in_future * (1 + deviation): # market is too high!
sell RAI on Uniswap
elif market < redemption_price_in_future * (1 - deviation): # market is too low!
buy RAI on Uniswap
else: # market price is just right!
do nothing

Consider an example

Let:
current redemption price = $3.14
price deviation = 5%
timeframe = 7 days
computed 7-day redemption rate = 1%

This results in the following buy/sell criteria for this trader:

  • if market price > 3.14∗1.01∗(1+0.05) ≈ 3.33, then sell
  • if market price < 3.14∗1.01∗(1−0.05) ≈ 3.01, then buy

Making a Population of RAI Price Traders

For simulation, each trader will have its own values for deviation and timeframe, drawn independently from some normal distribution. The mean and min values of these distributions in simulation are configurable. To pick a standard deviation for the distribution, we set our minimum to be 2 standard deviations away.

For example, let:

mean_price_deviation = 5%
min_price_deviation = 1%

To calculate the the standard deviation of price deviations:

In this example, the simulated distribution of trader price deviations would be:

deviations = Normal(5%, 2%), with a min of 1%

Similarly, let

mean timeframe = 7 days

min timeframe = 0 days, (traders value RAI at current market price)

Then, the standard deviation of timeframes is:

Our simulated distribution of trader timeframes becomes:

timeframes = Normal(7, 3.5), with a min of 0.

Note: This distribution of deviations and timeframes is not fit from real data and most likely different from production RAI traders. This is simply a way to add some randomness to the simulation and while being able to demonstrate and reason about general RAI market behavior.

Finally, we will give the traders a fixed amount of capital, split between RAI and USD , and distribute the funds equally between all the traders. This simple, uniform capital distribution is also contrived.

RAI Traders in Action

Let’s run a simulation with the ETH dataset, RAI/ETH Uniswap pool of 5M RAI, and SAFE owners from Part 1, and these new RAI traders.

Let’s see how these new users change the RAI/USD price action:

We can see the RAI/USD price action is much closer to the redemption price with the RAI traders present. We also see the peak redemption rates are much lower, as the RAI traders don’t allow the market to get deviated enough for the controller to enact large rates.

Let’s view just RAI/USD with and without the RAI traders. The red and orange lines are the RAI/USD and redemption price from the SAFE owner simulations in Part 1, and the blue and black lines are the RAI/USD and redemption price when we include the RAI traders with the SAFE owners.

The presence of RAI traders and their faith in the redemption price stabilizes the market price.

How did the SAFE owners and RAI traders fare?

The traders profit from the volatility created by the SAFE owners’ demand for leveraging and de-leveraging.

Note: Keep in mind these are total profits across all traders. Profits at specific thresholds(2%, 5%, 8%, etc) could be different.

Now with less trader capital

Let’s reduce RAI traders’ capital to 5M to see how that impacts the system.

With less RAI trader capital, the redemption price is less neutral and slowly follows ETH/USD.

Here are the profits:

The RAI traders achieve less profit as they are using less capital.

Now with more faith in the redemption price

Let’s keep the trader capital at 5M, and reduce the price deviation that the traders are using to enter and exit from their positions. By decreasing the deviation, the RAI traders believe that the market price should be even closer to the target price. Let’s lower the mean of the normal distribution from 10% to 5%.

By having more faith in the redemption price, the traders’ profits have increased. They have many more trades, but much less profit per trade.

Even more faith in the redemption price

Let’s further decrease the mean, from 5% to 3%.

The redemption price has even more long-term stability due to the traders’ tighter tolerance. The traders create less market deviation from the redemption price, which results in smaller rates from the controller(purple chart). Because of the smaller rates, the redemption price moves less.

Let’s visualize the affect of various RAI Trader strategies

These plots show the redemption price of simulations with the existing SAFE owners and RAI traders with different price deviations.

In this chart, we see as faith in the redemption price increases, stability in the RAI redemption price increases.

Conclusion

The effect the RAI traders have on the market price seems to be driven by:

  1. “Faith in the redemption price”: the belief about how close the market should stay to the redemption price
  2. Amount of capital the traders have.

In the next part, we will explore how different proportions of capital and behaviors of SAFE owners and RAI traders affect the RAI system.

🗿 Follow the Money God 🗿

Website: reflexer.finance

Twitter: @reflexerfinance

Discord: https://discord.gg/CfR74X22XE

--

--