Control Theory & Cryptoeconomics

ETHCC 4 · July 2021 · 25:09

Guillaume Felley explores how control theory could inform algorithmic monetary policies. He describes onchain PID controllers as a way to regulate supply and demand, interest rates and prices in autonomous financial systems.

Speakers

Topics

From ETHCC 4, hosted by Ethereum France.

Transcript

all right let's go so thank you everyone for coming so my name is uh guillaume and i'm with reflexolabs and today i'm gonna speak about what happens when consort theory meets crypto economics and uh yeah so at reflex lab we are building a new kind of stable coins that involve control theory so console theory is a widely known engineering field where it's about algorithmic control of dynamic systems and pretty much basically like the science of stability so it it's pretty good thing to when you want to build a stable

coin so like console theory is uh is everywhere it's in like probably all over this room there are plenty of uh control theory systems like from heating systems or like power supplies and like you have those controllers everywhere also in like industrial systems and so on and so on and like the the one typical example you have is like it's when you are in your shower and like you want the temperature uh you want a certain temperature in your shower so your tub you turn the knob back and forth until you reach the desired temperature so like the most elementary building blocks in console theory are pid controllers

if you studied engineering you probably heard a lot about them and like a pid controller takes and takes an input and outputs a control variable to to control your system so it works it works by having three three constants set three terms proportional integral and derivative uh proportional just it's just a constant that multiplied the input and gets the output integrals accumulate the error over time so like if you are off your target for a longer period of time it will accumulate and output a stronger signal is the derivative it's based on the rate of change of

the air and this allows you to address things like uh to to anticipate like the state of your system and to address like overshooting and things like that this is a very simple example of like what a pid controller does this is just a stick that mounted on a motor that tries to point to 45 degrees always and you have a pid controller that like control this this motor to get back to 45 degrees and then someone comes with stick and perturbate the things and like after sometimes it's uh it gets back to like its targeted state and

it converge faster yeah it converges fast to it and like the the key to tune the pid controller is like setting the three variables that i've talked to you in the previous slides okay so like before we move on to crypto stuff i wanted to point out this like like this this uh this academic paper shows that like uh central bank policy like actually could be implemented or like are like pid control and for example this is with the taylor rule which expressed like the fed funding rate as the regarding to the gdp growth i think

and the rate of inflation and this can be expressed as a pid control and the same goes on for many of the most well-known and used in practice policy policy rules used by central bankers so at reflexolab we are building rye rye started out as a fork of maker dao's mcd which is die that probably most of you know and there is one very key important difference is that it has no fix pegged to one dollar so it's free floating and the peg is moving around and the key to that is an algorithmic interest rate set

by a pid controller and the last important thing to note is that it's ether only collateral so how that works i want to define three things first so the the redemption price the reduction rate and the redundant rate feedback mechanism so the redemption rate is the moving peg instead like makers as always one dollar we have something that moves around and like it's supposed to be the price at which uh ride trades on the market but it's also the price at which you will mint rye so like there is also like cdps or volt or we call them safe and like the redemption price is the price at which you you meant

you mean try and it started as an arbitrary value so when we launched it we choose pi so 3 14 16 something and the next term i want to define is the reduction rate so the reduction rate is the rate of change of the redemption price it can be seen as an interest rate and yeah so for example if the redemption rate is minus 10 that means that the reduction price will go down 10 over a year and last is the reduction rate feedback mechanism it's the this this system with the pid controller that set the reduction rate so like the pid controller sets the reduction rates which change the redemption price so how does that work quickly so on the

top left we have uh the market price in green and the redemption price in blue so uh like the pid controllers sees the market so the market is an amm on uni swap and like it sees the error so like for example the red arrow like there is a the current right price is like above the redemption price and like the pid controller does its math and sets the redemption rate and like for example here the redemption rate will be minus 11 percent that means that the peg will go down 11 over a year and then that way the redemption price goes down and ideally uh it is expected that this change in peg will affect the market

which will drive down the price of rye so what are the effects of like a moving moving peg or like changing this reduction price from the perspective of right order is pretty obvious like if the redemption price the peg goes down like you are entitled to sell or you would like to sell because you're losing money and if the pay goes up like you can buy and take advantage of this thing and make money like from the safe owner perspective it's a bit more uh it's a bit more complicated like when the redemption price goes down that means that their c ratio their collateralization ratio is going up so they can mint more rye without

taking more risk of getting liquidated and therefore like they can mint some more rye and this will likely put some pressure price pressure and like drive the price of right down and like the opposite now when the redemption price goes up like it's bad for a safe holder kind of because their c ratio goes down and they are at a greater risk of getting liquidated so they need to buy right from the market and to repay a part of their debt to yeah avoid liquidation so this is since they are buying from the market this will likely push the price up so there are of course other mechanisms

that regulate the price of rye one is just arbitrage people buying low selling high which is like the main like driver of the price on a daily basis and uh like the redemption rate uh mechanism that we just discussed is like more on long term thing and yeah so people can take advantage of the redemption price either like when when it's positive you just all dry and you can earn like the interest rate and when it's negative you can just open it safe and your depth will melt according to the redemption rate so we launched rye in february 2021 at its peak we saw 369 million in

value lock so ether locked into the system and more than 2 000 users positions like this those cdps and currently like what we're seeing is that the price of rye fluctuates around two percent of the redemption price and now it does settle down the redemption rate is below 10 percent uh annual and so far we've seen about uh 10 million 11 million now i believe in liquidated collateral this is the the price chart of it since the since it's uh started like we can see that at the beginning it was pretty volatile and

like we also fine-tuned the controllers instead but like the price was a lot above the the redemption price which is in in red the redemption price in red and like it uh it drove the redemption price down and now nowadays we are we are more stable and if we zoom in so this is the last two months we can see that currently the redemption price is the the market price sorry in purple is is a bit below the redemption price and that's why we see a slight uptrend in the in the red curve so yeah the reduction price move fairly slowly and predictably and the the price volatility so far is

is good this is the redemption rate since the beginning we've seen so like as i mentioned before the the market is a bit below so the rate is positive as we can see on the on the right side and at the beginning we we had a lot of volatility and very high very high rates but nowadays it's it's like maybe two three percent uh you know redemption rate so like a question i get a lot is like what's the long-term outlook of uh the redemption price right like where will it be in one year five years hundred years because

that's something i care about if i want to to store value in right right and like the the very key factor to that is uh basically like uh like if there are any large and sustained imbalances between supply and demand for rye and like the thing the thing to keep in mind is that it's it's gonna move slowly right so it's and first it's bounded so like the the redemption the redemption price the peg is not gonna be like super volatile it's gonna be something in the lines that we just saw in the previous in the previous charts so why why are we doing all this and like what was the point and like

uh it's nice but why so like the thing to understand is that like with this kind of synthetic derivative asset like rye or die you want to match supply and demand and what are those like supply is basically the right meters so people looking in ether to draw some right depth and the demand which are basically the right orders like how much people are willing to all dry or much there is how much utility there is for rice so that people buy it so what drive the supply the supply depends on the pretty much depends on the appetite for leverage in the market so like there

are other reasons to to pro to mint rye but this is the the main one uh people that mint rye are pretty much like yeah like long east and they take a loan against this ether to to do something else with it and yeah questions sure yeah i can repeat sure i was just curious on the demand why it's listed as the holders why is it not the converse so like what rye withdrawers because in the supply it's people who are coming into the system and normally the demand is a complete opposite of supply yeah okay yeah good point i mean it could be

flip but uh yeah like from from the perspective of like the rise supply i don't know like there is demon but yeah you're saying that they could be like demand for leverage and i don't know i guess it's just the naming thing like sorry it's unconventional yeah so and the the demands for for rye is uh just like depends on upon the utility of table coins and like what we observe is that these two things are unfortunately fairly independent or if not inversely correlated right because of the nature of the crypto market like

when you have a lot of like leverage into the system and people want to go to the long east they they don't want to hold on to stable coins and like when you have the beer market people want to hold them to stablecoin and they don't want to leverage so like it's not exactly true like in practice we see that they are fairly independent mechanism that depends on different things but this gives a rough idea and like the key is that are independent so like what's the solution the solution is the is to is to balance market forces and that's exactly what the redemption rate is trying to do and one note if you're a trader you certainly know that long space shorts or short page longs with those derivatives and um like this is exactly what the

reduction rate is doing so like when the rate the reduction rate is positive like um cdp cdp others pay right holders and when the rate is negative like right holders effectively pay cdp owners so i want to talk about maker a little bit so this chart you've probably seen it elsewhere is like the share of dye that are backed by different collateral type and the big one here is usdc which is right now sits at about 60 percent of the all the die in circulation and it choose to not always be the case so like this

chart is like almond on like what's the share of usdc uh that bags die and right now we are sitting at 60 and uh yeah so like it all it all started with black thursday like uh in march 2020 when we had this big market crash and to solve some issue regarding to the peg like make her introduce the first like uh i mean that this uh usdc collateral took off for the first time uh more recently like in in may this year like we uh the the usdc biking die went all the way from uh 25 to 60 percent in a very short period

of time and this is this is due to the huge market crash we've seen in may when ether went from four thousand dollars to two thousand dollars and like what is important to to see here to understand here is that this shows what i was pointing out before that like um when like the leverage into the system into the market goes away and that there is not enough people to go leverage long or long heath then there is not enough like rye die into circulation so this has to be replaced by something else and in the case of maker what is replacing that is uh is usdc is more usdc collateral into the system the last thing that we could wonder is

like what is this huge spike in around october 2020 so like at the time make your problem with the peg like dye was consistently trading above the peg and to fix to fix that they like introduced i mean the lower the culturalization ratio for usdc volts from under 20 to 101 percent and that that worked that brought back the the the price of die to one but it had the consequence of driving a lot a big influx of usdc into the system so last um like why would i want to hold a coin that is

supposed to be stable but not to one dollar when what i wanted one dollar so like um yeah it's maybe true but like i think it's pretty much impossible to do without introducing custodial risk uh into the into the into the system and that's like the the trade-off that maker made like like very hard peg over uh like introducing a stolen collateral so like flexible pegs allows you to effectively balance market forces and to have a synthetic castle like cry that is effectively only backed by ease and still managed to stabilize itself yeah so is question microphone coming

could you elaborate on the custodial risk that dye has yeah so like um like usdc is a centralized stablecoin run by one single company and like this exposes maker to like a third-party risk which uh is this bank account or like that is holding the coin and like uh this ultimately rely at the end of the day that on whether circle will uh always be willing to so i mean i mean not usdc sorry i mean die not usdc because there's no bank account with diet yeah so but what that means is that like if your one die is backed by sixty percent of usdc sorry yes is that like if

usdc turns out to be worth zero your die is turned out to be worse much less what about single collateral die when it was just backed by so single collateral lie was just back by east and in fact what we're trying to do is much closer to what was a sigh single cultural die oh yeah and like yeah but the the thing that we see it worked at the time for for for sometimes pretty well it was more volatile but it was also more early but uh yeah like how would it would have work at scale like would have all if it would have all the peg for so long and across all the market cycle i'm not so sure

and uh yeah okay just one the custodial risk you referred to is things like usdc backing die exactly doesn't apply if it's just single cloud or about by eth exactly yeah so like does the trade-off you make it's that they made it's like they introduce collateral that is subject to counterparty risk all right so that's it for my talk and uh yeah if you have questions like feel free to check out our discord documentation do you have an idea where demand for

like which people are currently holding right because if you're getting like two percent interest essentially on it yeah that's not a lot for stable coins so why like which entities are holding this i mean obviously like rye is new and like it's fair to like where is the demand coming from for this thing right like it's all network effect like right now there is a liquidity mining program and people are mostly farming so yeah that's where it comes from mostly for now right and like but yeah the idea is to transition to some more organic usage over time so yeah like rye is on a bunch of landing platforms and it's being integrated here and there

and yeah slowly growing yeah no i mean yeah i guess for most like stable coins that are new it's or it's the same problem for everything they all have just demand because they have yield farms currently um and i guess it's also like the biggest advantage of maker is that die is just integrated and actually used and but obviously you need something like this to get hopefully to a stage where it's used so what yeah what's interesting about uh dye is that like is the most commonly asset used in defy very often like when it comes to all this d5 protocol they choose die first so there is a lot of demand for dye coming from there and that's what has causing issue to make her to all the peg yeah like all this crazy and defy summer

and so on and that's that's why they double down on usdc as collateral yeah so like a stone eating they could really do i think unless we just lose pack yeah otherwise you would yeah you need a way to get some more die into circulation otherwise you can't handle growth so yeah and like um i think it's pronounced fey or something like the stable coin um that one is like one dollar fixed but i think it has a different mechanism to yeah i'm sure it doesn't go so like overpack fey is like is like a it's like a yeah it's kind of like a bank or like i don't know a hedge fund if you

want so like that as like uh easter collateral that backfire and they are the the committed to like you can always redeem your faith or one dollar worse at collateral and we will always be doing that but yeah it's a very different model because like they own all i mean the da or i don't know exactly where the structure is there as all of the collateral and yeah it's it's to be seen over time if they will be able to maintain like to have as much collateral as there is into circulation because since people can always redeem it like uh yeah it can be that people just read him at the bottom of his price

always and then yeah treasury yeah goes down but yeah it's also an interesting experiment and but then if if like the man for face very highs actually goes over back like would they do they then just like mint pay and just use it to buy it yeah collateralize like uh that's what they should do yeah like the same as like right we do them right it's like other users will actually do this opening a cpd and yeah like the protocol does it themselves yeah oh sorry no yeah so like you're saying like when yeah when the price of fake goes above like uh this this the fake protocol is selling out faye

for for east and like there is more eth into the system yeah but like same like what if like people are meeting a lot of faye at the market top and then market goes down and people redeem like it can lose money no no for sure like you're not saying that it's better or just like wondering if this is how it works where yeah as you said like um themselves essentially they'll try to maintain a pack themselves yeah okay cool so they they are the ultimate guarantee or they guarantee the peg yeah however they do it to smart contract or governance proposal or whatever yeah okay interesting thank you thanks yeah okay um this is a really dumb

question because i'm not really into staple coins but i keep seeing on twitter people are part of homies the 3.3 they're also a stable coin right do you want