New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

"Rai: Building a Money God" - Ameen Soleimani

ETHGlobalSat, Oct 9, 2021, 12:00 AM

Speaker

Ameen Soleimani

Ameen Soleimani of Reflexer Labs presents RAI - a new semi-stable coin.

Transcript

Next we have Amin Solommani who will talk about Rai, which will talk about Rai, which is a secured Ethereum stablecoin for the DeFi ecosystem, and I will let Amin introduce how he started this project and how Rai works. So please welcome Amin. Does it work? Am I seeing everything clearly? Yes.

Class. Perfectly. Thank you for inviting me. Yes. So, my name is Amin Solommani.

I'm here to present Rai: The Making of a Money God. Co-founder of Reflexer Lab . Thank you for inviting us, ETH Global. Today I will give an introduction to this project. I'll talk a little about what I mean by money gods.

We will talk about control theory. I will explain the reflexive index, which is Rai. This is a new type of DeFi asset. And I'll talk about our upcoming launch of the demo prototype demo prototype . I want to start with why decentralization is important, and it is important because some things are more important than countries.

So, blockchain networks are global utilities, and Bitcoin utilities, and Bitcoin is a store of value vending machine for the whole world. ETH is a globally neutral financial system. We want them to stay that way. There is a reason why we are building on ETH. That's because we believe it will be sustainable, and decentralization is a tactical decision, maybe even a formation, something like a phalanx, where you eliminate the dependence on centralized leadership to reduce the payoff matrix for an adversary's attack.

You know, if there's one person who can drop everything, then they're really worth hunting down. But if she's not there, then maybe there's no one worth hunting at all. In short, if you want your financial infrastructure, or any other infrastructure, to outlast your country, you should consider decentralizing it. So, what is Rai? Rai is a new DeFi asset backed by ETH.

It's kind of like a stablecoin because it's a reflective index. It's not exactly a stablecoin. This is an index of its collateral with suppressed volatility. It is designed to counteract sudden price fluctuations, but can drift over long periods of time. This is a fork of MakerDAO's multi-collateral DAI.

We thought this was a great place to start because it had been formally verified, had no external dependencies, and had a network of experts who understood it deeply. The system minimizes management minimizes management . Therefore, we are trying to eliminate control over this system as much as possible. We, uh, want to have " " anti-management" meetings, where, you know, the main goal you know, the main goal is to stop having meetings and find a way to completely automate the system so it can run itself. Uh, one of the things we've learned to automate is interest rates.

So we automatically, uh So we automatically, uh , set an interest rate that maintains the stability of the RAI asset. Uh, and this asset is optimized as collateral for DeFi. It will have low volatility, and we believe that since it doesn't have the counterparty risks of USDC or USDT, or even DAI, considering the Maker governance system as your counterparty could be beneficial could be beneficial . So, RAI is being developed by Reflexer Labs. The CEO is a CEO is a charming young man named Stefan Ionescu.

He is a 22- Stefan Ionescu. He is a 22- year-old Solidity wizard in the UK. Uh in the UK. Uh , the team consists of five developers, including Stefan. I work as a freelancer.

I just work here. Uh I just work here. Uh , we also have Nikolai, the technical co-founder of Maker, as our advisor. And we raised $1.6 million from MetaCartel Ventures, Paradigm, Standard Crypto, and Variant.

And Robert. RAI was born out of frustration with multi-collateral DAI. So, single-collateral DAI was pretty cool in 2018. Er, he only had ETH as a form of collateral. The management didn't really do anything except establish a stability commission, and, uh, the project cared deeply about decentralization.

I'm going to turn on a little time capsule from the past now. Uh, but anyway, the thing is, this whole model in general, I don't think it can scale at all in the same way that DAI or Maker does, right? Because they are not decentralized. So it's essentially just a different product. Because, let's say, if you build something based on Tether or USDC, it's no longer a dApp, right?

It just became an application because you're actually building it on top of the bank, and underneath your product is the bank, which is essentially the platform that you're building on, because they're the ones who, to some extent, have to agree with everything you do. And if not, you're in trouble, because they actually can and do confiscate your funds, uh, freeze them or something , right? Yes, uh, that was in 2018. Uh, and now it seems like, you know, with Maker, and RAI by default, it's become more of an app than a dApp. Because at this point, the collateral backing Dai consists more of USDC than ETH.

Um, and the administration has greatly expanded its influence to do a lot of things. I love this meme where Mariano throws all the tokens into Maker. So, oh yeah , one more thing. In addition, it is worth noting that spankchain had about 400,000 Dai at the time. We liked it because it was, you know, cypherpunk money, and now it's a little harder to explain what it is and justify it.

But let's talk about the " talk about the " money god" thesis. The idea of ​​a money god is that it is possible to build a system that is beyond human intervention and is therefore perceived with a certain divine awe, so to speak. You know, you have faith in this system. And so one of the things you have to have is to perceive control as a commitment. And if you eliminate these control points, you can reduce the likelihood that insiders will exploit the system or outsiders will try to damage or attack it, even through regulation.

And this increases its stability. And then, with minimal management, you get social scalability. So instead of trusting some group of people to make the right decisions about what interest rates should be, or, you know, risk tolerance for different things, you just trust that the algorithm will continue to work the way it was programmed to. It may be less flexible, but you don't have to worry about the "black swan" risk associated with human error. Of course, you can worry about the technical risks, but the bet is that the bet is that it is easier to scale, and you can see that with Bitcoin, right?

Bitcoiners are willing to bet their lives on Bitcoin because they trust the system that it will not change unexpectedly for them. There is no group of people who could go and just change Bitcoin unilaterally, and they all essentially support this norm. Another thing is to this norm. Another thing is to break the dependence on the US dollar. The US dollar is losing its purchasing power and may disappear altogether.

It seems unwise for a god to tie himself to such mortal systems. And the last thing is durability. Because you want to design a system to outlive its creators, and have that approach when you think about design. The idea is that if you do all of this , people interact with the system differently than they otherwise would, and you encourage them to accept the terms and participate in the development of the system because they know that no one can change the rules, and you can see that effect. So, let's talk about control theory.

Control theory is ubiquitous. It is the science of maintaining stability. In this context, we are interested in control theory because we want to remove management control over the system. So if we don't want people to vote on interest rates, we need an algorithm that sets them, and we need to design it so that it can handle crazy " crazy " black swans" and everyday things without unnecessary human intervention. Ideally, we will reach a point where such intervention will become unnecessary.

So, the control system works like this. It has a certain output that you are trying to bring to the desired state. It has an input that you control: you measure the output and adjust the input accordingly. My favorite example for beginners is a shower, right? You get in the shower and know what temperature you want the water to be.

You have an input— water to be. You have an input— it's a faucet that you turn so that eventually the water in the shower becomes the right temperature. If you turn the faucet too quickly, if your regulator is too sensitive, you will make the water too hot, you will have to turn it back and repeat the process again. So the whole science of control theory is about optimizing a system to quickly achieve a goal without allowing excessive fluctuations. The most common type of controller is the PID controller is the PID controller.

A PID controller. A PID controller works by combining three components based on error based on error —the difference between where the system should be and where it is now. The proportional component directly depends on the current error. So if the desired water temperature is 100, and the current one is 105, then at 110 this component will be twice as large. So it just points in the direction of where the error is, and you can think of it as a kind of standard: okay, if it's getting hot, I have to counteract that.

If it gets cold, I have...Um, integral—that's another matter. The integral accumulates error over time, and it is usually used to work with constant error. So if there is a small error that the proportional component doesn't sense sensitively enough, it will accumulate over time until it becomes large enough for the integral component to grow and respond to it. You can imagine this using cruise cruise control as an example.

Your car may be doing well: if you set the speed at 80 mph and it's one mile off and stays there , something will eventually bring it back to 80. The derivative is based on how quickly you approach or move away from equilibrium. I won't say much about it. This is not as important for this example, but it is another way to quantify the error. This is usually used for faster reactions.

So faster reactions. So , when we create this algorithm, we are essentially configuring the controller. Each of these terms has a constant associated with it, called the gain factor. There are KP, KI and KD . So, there is proportional gain and integral gain.

Our goal is gain. Our goal is to determine what these parameters should be for the system to respond and remain stable. We're going on a little excursion. This will be a short video in which we will see a man stabilizing his robot. So let's start again and look at just proportional control, how to choose the gain, and what happens if it's too high or too low.

OK. So, right now my robot is lying on its back. I took, if you look at the bottom three graphs, the integral and differential components, that is, the gain coefficients, and zeroed them. So they have virtually no influence. Now we only have a feedback loop with proportional control.

And let's see how it works. So, since it has the gain that I chose earlier, it actually balances out. OK. But let me try to fit it all into the frame so you can see better. I'll try to get it.

This is what we do in, uh, displaying everything in the frame. Okay. So, it's stabilized. As far as possible. Okay.

So if I, um, if you look at the graph on the bottom left, the P- P- factor or P- factor or P- gain graph. Um, well, let me take it for a ride first , I guess. So you see it balances pretty well, but not very well. Uh, you see that when I give him a command, he seems to waver a little. And that's even with the proportional ratio set up pretty well, if you set it, um, significantly lower.

So if you see on the TV now, I set the gain to about 5000. And now it really doesn't want to, uh, balance at all want to, uh, balance at all . I have to, uh, I have to constantly, I have to maintain it manually. Uh, he just keeps swaying back and forth. So yes, if your proportional ratio is too low ratio is too low , it will just drift.

He won't , uh, hold his position well and might even fall over. Okay. So if you, uh, if you increase the factor, we'll raise it to about 12,000, as it was. You see that it works perfectly fine. He's still drifting a little bit, but now he can—is that in the frame?

Uh, now he can, you know, work pretty well on his own , um, but he's still drifting a lot. And then if you set the ratio too high, so you see right here, the ratio is set to 24,000. Um, it balances a little better, but then it starts to fluctuate, and, uh, you can even see it on the chart. Um, yeah, that's one thing to be careful of. If you set it too high, it'll, uh too high, it'll, uh , become pretty pointless.

So for my particular robot, uh, proportional ratio uh, cool. Yes, that was it. Um, so the point is that this is actually, uh, what we're doing, uh, except instead of keeping the robot, we're keeping, uh, the price stable, and we're not fighting gravity or anything like that. We are fighting market forces. So, our tuning process and what we are trying to achieve with the with the online demo and also the development of the system over time is to understand the market dynamics in order to properly adjust the parameters for the stability of the system under different conditions.

One of the interesting things I learned in this process was that central banks actually operate on the basis of control theory. They just don't know about it yet. So, they have these empirical rules of policy. Most of them come from the Taylor rule, where you have the inflation gap pi and the output gap igrek, and they determine the federal funds rate, the interest rate er. And, you know, some of them have historical metrics like integral and so on.

And if you break down many of these policy rules, they actually all fit into the same conditions as the PID conditions as the PID regulator, in terms of adjustments focused on the future and the past. So let's talk about what Paradise is as a reflexive index. To understand what Paradise is, you need to understand these concepts. So, the concept of redemption price is different from Maker's, because in Maker, the redemption price is always one Dai equal to one dollar. This is the meaning of having a binding.

In this case, the redemption price value is the value of Rai within the system used for the collateral ratio, just like in Maker, but it is in dynamic equilibrium with the market price. So, the redemption price can change over time and is set by the redemption rate, so the redemption rate is the current rate of change of the redemption price, and it doesn't really matter to the redemption price where it starts. It can be somewhat arbitrary. So arbitrary. So , the redemption rate feedback mechanism is redemption rate feedback mechanism is what updates the redemption rate in response to the difference between the redemption price and the market price to bring them into equilibrium and ultimately keep the price of Rai stable.

So, here are two peculiar cycles. If the price of Rai increases If the price of Rai increases , people start buying Rai. Then the Rai redemption rate becomes negative, which means that the Rai redemption price starts to fall, and so if you own Rai at this point, you are effectively receiving a negative interest rate. You are effectively paying to hold Paradise, so some of these owners may want to sell it to avoid this negative interest rate. And in that case, Paradise will return to its equilibrium.

And I say "new" here because when the redemption price starts to fall, it will continue to change until the market price catches up with it. It will not return to the level it was at first. Eventually, it will deviate slightly from its starting point. And the same thing happens the other way around happens the other way around . If the price of Rye falls, then the redemption rate becomes positive.

Suddenly becomes positive. Suddenly , if I hold Rye, I get paid for holding it, and if I lend Rye, I pay additional interest on my loan. The redemption price begins to rise, so Rye borrowers who don't want to pay this interest buy back Rye to pay off their loan, and then Rye returns to a new equilibrium. Received a message in chat. How can I check this?

Oh, cool. Um, yes. Here's what it looks like in practice. So, it's on the right and on the left. This is the same graph from a 2016 data analysis that Maker made to try to model how TRFM, or the Target Rate Feedback Mechanism, would work.

Market price Rate Feedback Mechanism, would work. Market price - the terminology is slightly different. We renamed the target price to the redemption price and the deflation rate to the redemption rate, but in the end, they are almost the same thing. You can see that this system causes a shock between the fifth and fifteenth days. On the fifth day, the market price increases dramatically, and you can see it here from above.

In response, the interest rate falls significantly and continues to fall until the market price reaches equilibrium. And once this happens once this happens , they remain in equilibrium for a few more days until the shock passes days until the shock passes , after which the market price recovers. Then the interest rate also bounces in the opposite direction until it reaches equilibrium again. Note that the final redemption price, given that the redemption rate has been in the range of one to three all this time, is slightly positive. So she is not attached to anything .

It is actually growing. Hmm actually growing. Hmm . So yes, reflex index behavior. So when you think of it as a financial product, what do you expect from it?

You expect it to counteract sudden price changes. He's actually using these interest rate-based incentives to counteract this and create his own little " own little " gravity hole." Um gravity hole." Um , but in the long run the price should follow the demand for ETH leverage, assuming , sorry, the demand for ETH leverage with the assumption that ETH leverage is also correlated with the price of ETH. So in the long term, we expect this to follow the price of ETH to some extent.

Um, and the mechanism for this is that when people leverage ETH, they leverage Rye. So, they borrow Rye, sell it, buy more ETH, borrow Rye again, you know, keep doing it. This pushes the price of Rye up, but in the long run it lowers the price of Rye, making the redemption rate positive and increasing the redemption price over time. So you can see that the equilibrium will shift over time. Another thing—we want to optimize Rye in terms of recovery time after shock.

How long does it take for the system to reach stability again? Minimize excessive fluctuations and add some level of resistance to manipulation. That is, how expensive is it for someone to introduce instability into the system, for example, by interfering with the controller, buying a lot, pushing the controller in one direction, and then selling, pushing it in the opposite direction, and essentially manipulating the oracle. Another goal is to maximize Rye liquidity, which will reduce slippage to make entering and exiting the Rye system cheaper. So, our progress so far progress so far : we've been pretty busy.

We translated the multilateral Dai into English, so there are no more strange names. We built all the smart contracts, including the control system, subgraph, keeper, liquidation bots, TypeScript libraries, developer documentation, and analyzed Maker historical data. We calibrated our CAD simulations. And now we are preparing for our demonstration on the main network. This is what calibrating our simulations looks like with our Solidity code.

On top you see Python, on the bottom you see our Solidity, and they look almost the same. On the left you see the Y-axis—this is the target price, and on the right is the interest rate, i.e. the set redemption rate. This is important because if they didn't match, our simulations would produce parameters that wouldn't be very useful in real Ethereum.

We also created diagrams similar to this one during development. If you are interested in such things, please go to our documentation. We would be happy to work with you. Um, Protoy. So, we are launching our first mainnet demo in four weeks.

A limit of 10,200 " pry" units will be set. It's about two dollars, so about 20,000 in total. It's just a game to see how people interact with the system. We are trying to use control theory. We want to experiment with the controller and test our system.

So if this sounds interesting to you, please join. And if you are a control freak, please join us and help take blockchain governance theory from zero to one. We are proud to collaborate with BlockScience and Michael Zarum, the developer of our CADCAD simulation software, and we are ready to work with anyone who is also interested. So, yeah, that's all I wanted to say. Perfectly.

Thank you very much. This was a great lesson not only about Rise, but also a good refresher on control theory. This reminded me of some of my university courses. Ahem. Several questions arose, and I will answer some of them for you.

But to keep us on schedule, I invite you to join the chat after the talk if you have time to respond to them directly. My first question is: control systems need a lot of reinforcement and specific information to work. I wonder if there are any limitations to smart contracts in terms of designing an ideal control system or feedback loop? Is there anything impossible, or does everything work exactly as you imagine in Rise? Yes, that's a good question.

We are fortunate that most even more complex control systems are mathematically efficient. Therefore, they are relatively easy to implement on smart to implement on smart contracts. But you have to consider the gas costs, because it's important to think about how often you update the system and how expensive it is, and whether you can, for example, update it less often, although there's always some trade-off, right? So great, and the second question from our chat, I'll just read it verbatim: what's the incentive to buy out Ry? Okay.

When redemption rates go negative, shouldn't we just wait until everything balances out on its own or when they are ready to redeem? What is the incentive to buy out Ry? If rates become negative, it means that the price of Ry is increasing, so the rate becomes negative. Ahem. I mean, um.

Part of it is arbitration. Do you know why people buy Dai when the price goes up? Partly because if the price is now, say, 1.1 relative to the original position, and the interest rate is -10, then you know it is going down. So you want to get ahead of that interest rate; if it doesn't bother you, you can keep going, and anyone who is concerned can take action.

I hope this clarifies the question for the person who asked it in the chat asked it in the chat . Thank you very much. We posted Mina's slides in our chat. So if anyone is interested in watching the presentation, you can just follow the link, and for any other questions for Min, we'll either pass them on to him directly, or he'll join the chat and answer you himself. Thank you very much, and thanks again for your time.

Thank you for inviting me. Back as I like it

Automatic transcript — names and jargon may be misspelled.