# Let's start a RAI-ot! by Fabio Hildebrand | Devcon Bogotá

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2023-10-07
- Duration: 28:26
- Watch: https://streameth.org/watch/yt-4QIl_9mojow
- YouTube: https://www.youtube.com/watch?v=4QIl_9mojow

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.
https://archive.devcon.org/archive/watch/6/lets-start-a-rai-ot/

Launched Feb 2020, RAI—a fork of DAI—is an ETH backed stable-ish coin that uses an onchain PI controller to set interest rates automatically and emphasizes “ungovernance”.

If you’ve ever looked at a central bank and thought about replacing it with a computer, this talk is for you!

Come listen to the RAI story so far, what we’ve learned, where we’re going, and why we think the RAI model of controlled, floating exchange rates are going to be the future of DeFi and beyond.

Speaker(s): Fabio Hildebrand
Skill level: Intermediate
Track: Opportunity & Global Impact
Keywords: Stablecoins,DeFi

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

foreign [Music] guys to join us in Orion so who in the audience have heard about uh die raise your hands nice so when the audience has heard about Rye nice and who has uh use dry up to now yeah few people we need to work more on that I guess so right is a fork of maker Dao dying so with a bunch of differences it has eth only has collateral he has a floating pad so it's not one USD as back to when USD as dies it's self-stabilizing with a pi controller and it has minimal governance too that's what we call in governance and we're pretty sure this is the future of Finance so here we have a quote by Nikolai he's the technical co-founder of maker and the main architect or the main head behind uh die and I'll actually read his quote because it's very relevant to the presentation until this is in textbooks as a historical turning point for theory of Central Banking we're still early so yeah suffice to say we're we're still early so before uh I go into what the system is and how it works I'll tell you guys uh a story more of a personal story actually so let's do the interactive thing again and please raise your hands if you have lived in a place with inflation over a hundred percent a year yeah there's quite a few it's a lot of them right so that's great kudos to the EF for making the event here so keep your hands up if you've lived through over a thousand percent a year so yeah a few of them right two thousand three thousand Good Times so I'm Brazilian and as a kid I remembered uh when my family got you know their paycheck we would run to the store and buy stuff because if you wait until the weekend next day you'd pay you know you got less stuff for your money basically prices were raising every day in a big inflation in Brazil we had uh over three thousand percent yearly inflation between 93 and 94 uh the average yearly inflation was over two thousand percent so here we have the roller coaster that it was right it wasn't like really smooth uh after the military dictatorship uh in Brazil uh from the 60s till mid 80s they left with a really messy economy so all the leaders that came in they came in with a plan basically the focus was you know how do we deal with inflation some of those plans were disastrous right they involved freezing prices freezing wages in this one the color plan they actually seized people's savings it never gave it back this is actually new to me I learned this while preparing to the presentation here we have a graph of the number of people in the monetary Council of Brazil or the guys you know setting rates and the inflation in Red so you see how they correlate right so the less people you have it seems to be better right so yes and and this sharp decline in the inflation was in 94. it was called Plano it was really interesting I mean they did some obvious things right cut government spending uh stop printing money right and they also did one thing that was not really obvious they created another unit of value so things were priced in this new unit that was called urv or when he died or unit of real value but they were still paid in the currency of the time that was the what's it called crusadero and after a while once people were you know free from the inflation mindset urv became the Brazilian Herald that we have to this day this plan was mostly successful so we went from over two thousand percent inflation to mostly single digits since then so now we think okay the US is exempt from this right so far so good but uh yeah actually they seem to be losing control there so during the covet years they printed 30 percent of the money supply and they seem to have underestimated the resulting inflation from it so they took long to act and now they seem to be overreacting throwing the whole world into a recession right and now going back to crypto so we have like a speed run of what we're talking about right so oops we had here the Luna UST you know Fiasco graph let let's do another one raise your hands if you lost money in Luna UST so yeah lots of people and yeah please the other ones should pay a beer you know to those guys so yeah I know it was painful so vitalik wrote an article recently about stable coins just after the Fiasco right comparing Rye to UST and the main takeaway for me at least was that if your stable coin cannot contract if if it cannot win down it's likely a Ponzi right so here we have you know the the graph showing you know when Luna or UST had to win down for the first time it was ugly 50 million was erased from the market in a so that's uh billion with a B right so lots of money uh now think about what happens if the USD has to contract the USD with a d right how would it work so but I'll leave this you know as an exercise for you guys to think about this so here having lived through hyperinflation I can't help but wonder you know how do we get ourselves out of this Dark Age so these are some of the questions we were obsessed when building rhyme so what if the humans are the actual main source of instability what if our currency was honest waiting for currency was not a Ponzi what if our money supply automatically expanded and contracted what if proper Central Banking has never been tried so here's a picture of Milton Friedman he's a famous economist and we're trying to achieve you know his his vision here so back to what is right we will now go through you know not that you guys know why I care so much about this thing uh we will go through and explain each one of these bullets to you guys so like die rise over collateralized you open a collateralize that position by depositing eth and minty Rai we call it a safe it's not to be confused with it knows it's safe you know so the die CDP is a safe for us if our collateral Rachel drops below the minimum 135 percent your East will go to a liquidation auction just like die we have no Ascend there so you haven't one time one hour time delay to react in sharp you know price changes and like mkr we have flx so that works as a domain backstop if liquidations fail and Rye is backed by eth only this is very very important because centralized collaterals have a way of taking over if you're not careful dye is now generated from around 80 percent centralized collateral the vast majority being usdc so we all know after the tornado cash events recently that you know they can freeze any holder including you know pools and systems if that happens you know die holders will suffer die will lose most of the value by only backing Rye with eth we want right to inherit the money-ness that eth has earned we also made the decision you know to prevent sort of like this actually prevents Rye from really scaling Rye can only grow so much you know and we expect that it will grow as it grows in in value too I'll get back to this uh towards the end of the the presentation so people often ask us you know how is it stable if it's not one USD so the way we see this it's more like like a foreign exchange foreign currency right so here we have the exchange rates of several currencies the largest ones against USD and the Rye Redemption price is the smoother line in green there so as you can see it's not much different than well foreign exchange we're doing about as good as China there so bagged stable coins have a big problem also highlighted by vitalik they're either pegged when everything is okay you know or they're off bag and everyone is freaking out you know what the is going on so right has one mode it's always off pack you know that's business as usual it's a matter of degree so we're not getting out of bed because it's soft pack right see how cozy it is Pepe is and here we go to the pi controller that's the heart of the system the coolest part too so we have a graph here the market price from uniswap curve is the red line over there Redemption price is the smoother line in Gray so when the market price goes above the Redemption price or Redemption price is basically the internal system Peg right when the market price goes above the Redemption price the Redemption rate goes down and starts pushing the Redemption price down the opposite is also true so if the Redemption price or if the market price goes below the Redemption price the Redemption rate will go up and here below we have actually the rates the Redemption rate is formed like two rates we have the P rate in blue and The Irate in Orange the period in blue is instantaneous so when the price market price crosses the Redemption price it will immediately cross to the other side we can see recently in the recent days it's been the first time in a while where the market price went below the Redemption price and the period immediately goes positive there the eye rate starts the error of the last 30 days so it's like a memory it makes the controller stickier this is why it's not yet positive right The Irate is a lot higher than the or a lot higher to the negative side than the period there stability for right means balancing rise supply and demand and not begging it to one USD so with Rye you know where the yield is coming from when rates are negative right holders are paying right borrowers when rates are positive right borrowers are paying right holders this value transfer between right holders and Borrowers is mediated by the pi controller we saw previously and they the controller actually incentivizes the balancing the supply and demand for Rye so we have a saying that the money God always wins so we say this because it's pointless to fight against the money gun push against the controller the rates increases potentially against you and you burn money basically you don't want the angry money God against you so you want to keep him happy if you help him work though you can make money out of it now on to ungovernance that's what we call you know minimal governance so the system has been controlled by the community since July this year when we started we started with the usual team multisig and we completely transitioned to the Dow now so the team multi-sig is no longer active and has no control of the system but before doing that we actually locked down pretty much everything you know to prevent governance from being used as an attack Factor so unlike him die where the governance can do whatever it pleases in right governance cannot print right cannot print flx cannot steal collateral and so on so the only things it does right now or it can do right now is govern external dependencies like oracles like saviors and some of the parameters the system has I mean some parameters we felt we were not ready to set in stone like the pi controller parameters everyone's still learning so the community can't govern them through a vote so we believe Rye represents the future of Finance central banks in the future will be open source programs the cost of operating a central bank will drop by a thousand times even more you know they were run transparently and autonomously so the way the Fed works today is like maker down they get together in meetings and they decide on rates as autistic people we know you don't need meetings to set rates one day everyone else will learn this too you know today we treat currency management as a holy art that only some Arcane Wizards can perform in truth the more we can demonstrate Simplicity the more we can dispel the Illusions around how money should work we believe in a future where communities can take ownership of their own money where the cost of deploying and maintaining a currency is as easy as the deploying you know some open source code so as ameen said there we can stay autistic longer that they can stay if Lords you guys should join us right if you have eth as a collateral in a system that has risk from centralized uh collaterals you should move right deposit is like borrow rise spend it you know long Rye short Rye do basically work with the money God this is a tweet interesting one from cure and uh it talks about a position vitalik has in the system so vitalik in the recent months with the negative rates he made 75 000 by shorting right so he's helping the money God and making money you guys should maybe try it too you know uh also join us on Discord meme the dream right help us write explainer content uh there's a really interesting research Channel where people discuss monetary policy control theory and whatnot uh at least also in our Dev Reserve Force we're building right now and there are plenty of bounties available there also at not only technical you know the response is for everyone so uh check it out and lastly we're also building the money God League so what what do we call the money God League basically we know Rye won't scale so instead of envisioning one huge stable coin to rule them all we envision a future with thousands of Rye like systems so as you can see over here let me get a front makers discussing becoming a ride-like system now right abandoning the bag so they can get rid of usdc so maybe they join us in the future you know by getting back to the original Nikolai Vision there uh there's also H2O from Ocean protocol it's a fork of ride that is collateralized by their data tokens there's also a group working on Thai which is a multi-collateral version and maybe you should join us too you know if you have a good idea you want to build another flavor of the system come talk to me join our Discord we're happy to help you know the more systems out there the better right sort of like the Hydra vision of the thing we don't need a huge stable coin we need several smaller ones to contain failures too you know and allow for experimentation so this meme was made by Charlie Noe from Paradigm it's some true VC value add here so I'll leave this running here while I take any questions from you guys we still have eight minutes left so um so good morning Fabricio two questions uh could it be like a PID controller instead of just Pi controller and other could it be checking the price of it corrected by inflation or that's like impossible to do yeah uh interesting questions I mean we started with a p only controller actually now it's a pi I don't see why not could be a PID too so in its experimentation right there's still room for a lot of experimentation with Rye we try to make it like as pure as possible so only if minimal governance now with the forks you know I mean there's a ton of possibilities we see like Thai for example the guys explained that for a multi-collateral version you need more governance right to onboard new collaterals and their goal is of course to try to keep it to decentralized collaterals uh onto the other question I forgot what was the second one please remind me at that price could be checked by corrected by inflation not just USD yeah so pegging is a true challenge right by having Notepad I mean uh uh I went through the like the advantages of it so if you're pegging to an inflation index for example you have the same problems of a packed currency I mean it could be done but then the negative rates could not be applied to price as we do right they could maybe be applied to the stability fees right or the borrow fees people pay you know on their borrowed amount so yeah I guess it could you know if you feel this is a nice idea I guess you know come join the money God league and yeah good it working to help so hmm hi thank you since there is no Peg when does right fail and under what scenarios yeah that's what has happened what are the 30 modes yeah that's uh hard to say I mean uh there's no Peg and and I mean the there are a bunch of failure scenarios too right I mean we could as in the black Thursday you know maker failed to liquidate cdps this could happen uh regarding the controller you know there are some cases in control theory where the controllers go crazy too right you've seen like robots going out of control and spinning like crazy and then destroying yeah that's a PID controller failing that happens we would need to Global settle the system as maker did with Psy we had a proto-ri before right to be Global settled so if the system becomes unsustainable it can still be closed down and that everyone both uh safeholders safe owners and Rye holders can go back there and and get their East back so it's not a complete loss but we have to keep an eye on this this is also an experiment right so we're trying to be conservative but I don't know in future iterations it could be that not on rye rice pretty much closed down but I mean on other many God League members this could happen I don't know we just have to keep an eye to see if you know controller is not going crazy on us thank you yep um this summer during the uh over here in front of you dear right hello okay this summer when it was when the market and Redemption price were different for like months and we were seeing like 30 different rates it I mean um it kind of struck me that um why can't the system tolerate some sort of steady state error where market and Redemption price are just like different for a while instead of the eye just punishing us more and more and more yeah that that's actually a good point uh this happened at the time we're not sure why you know like Nikolai claimed we were being attacked by some actor you know trying to prove us wrong uh some people think you know because of the UST Fiasco then because of the tornado cash thing you know a bunch of people Market bought right and then the money God got mad you know and punished everyone and vitalik made a bunch of money that's the so yeah we're still discussing this there's actually there will be a proposal to tweak this we do feel the item right now is too strong maybe it could be punishing less you know they make it less sticky so yeah please join the discussion you'll like it uh there will be a discussion in the Forum soon and until the end of the year we will tweak the perms we try not to tweak him really like with a lot of with uh I mean too quickly so we see the results you know we see the thing how it plays out but yeah there will be one change in this year uh it's been like that for over six months now so and it I mean it withstanded some pretty big shocks in between you know which was we switched from uh Raging Bull Run to a bear market right and then things collapsed and that there were I mean people tried started valuing decentralization more so uh yeah I guess let's see if next year is more stable too with new params and we will see the idea is to tweak less and less and and on a smoother way you know like uh until we can set the programs in stone and just ungovern the controller too so what are the incentives for executing liquidations and maintaining the the system Health um like for example like maker has this decaying uh you know auction where like Ave you can have you'll find out there's a lot of a lot of people that should be liquidated that are not liquidated but maker everybody eventually gets liquidated so what's the incentives and how is that maintained and so what Telemetry do you have into to see what needs to be liquidated so when we started the collateral auction house was a fixed discount collateral auction house so it provided a fixed discount on it you know against the market price then after six months or so even before maker liquidations 2.0 we started with an increasing discount auction so it's pretty similar to maker I mean the implementation is completely different but the the mechanism is the same and we're decentralization freaks too so every call for Keepers in the system is incentivized somehow uh actually the system right now for the keepers out there is grossly overpaying calls so you can make a lot of money by helping the system uh there will be a proposal soon to lower the rewards because they were adjusted for gas prices from the bull run too and now the network is you know a lot I mean block space is cheaper so we can lower the rewards and you know the system can save money until it's needed to raise them again for other things I mean for everything there's an incentive there I mean uh it depends on the call and on the on the on what you're doing so hello um what's the point of using a rye instead of straight eat if it's free floating and it's just backed by eth yeah Rye is supposed to I mean it's free-floating but it's uh way less volatile than eth so while it's it is free-floating it is a stable coin right it's kind of like the Euro against the USD you know of course it's gonna oscillate right tomorrow it's gonna have a different price but it's not going to go crazy on you and crash 50 from today to tomorrow right so right is a very dampened version of eth basically and we early on it's actually quite interesting because we had like we didn't want to call it a stable coin because everyone called stable coins you know the one USD thing and now we sort of we're sort of reclaiming the name so we feel right is the only true stable coin and all the other ones are what we call peggies or pegged coins you know so yeah that's it so if you need a stable client that retains you know the moneyness of it that's right that's the goal of it yep as the money God grows and adoption grows as a currency what do you see or what do you expect from central banks and other institutions trying to corrupt or crack down on coins like right uh so yeah the more decentralized you are the harder it is for them right so we're taking our precautions from day one uh the idea is to have it you know almost trustless in the future so yeah they can try to stop ethereum I mean it's gonna be hard right and yeah our main goal is actually you know uh some Central Banking Bankers are actually noticing this so we feel that Central Bankers should not be setting rates right because they're people and they're like subject to politicians you know making pressure and influencing them so in the future as we see you know they need to be very predictable on setting rates so in the future as we see they will have a software right might not be ours might be theirs but you know they will have a set of you know an algorithm setting rates and then Central Bankers instead of monthly setting rates they will just tweak the parameters you know until they perfect that their their own controller right yeah isn't there a danger though in where there will be Crackdown let's say on the use case and then the attention towards stable coins like rise will just yeah I mean there is I mean everyone is noticing this right uh we feel rise last in line though uh the risk is there I mean I agree with you but for example if if you look at die they have usdc inside so you know they're one action from circle from being frozen uh they also have you know a huge governance thing going with lots of people uh that can tweak and that can do many things in the system we prevented that so we try to close these doors there's also another thing right when you look at stablecoin regulation we're lucky that Regulators think stable coins are all packed to one so I think they're overlooking still you know like all right works and how stable it is so yeah I guess this is going to happen eventually but we feel rise the most resistant of all you know and we're keen to improve it too you know with new designs new iterations of it so that's amazing
