DAPPCON 2024: Humans Vs Code - Towards Permissionless DeFi Risk Management - Yaron Velner
DappCon 2024 · May 2024 · 21:47
Yaron Velner examines the tension between human judgment and automated code in DeFi risk management, at DappCon 2024. The talk argues for permissionless approaches to assessing and managing risk across DeFi protocols, questioning how much of that process can be handled by code alone versus human oversight.
Speakers
Topics
From DappCon 2024, hosted by Dappcon Berlin.
Transcript
so thank you everyone uh so yeah M will not actually be the topic of this call but yeah but this call is somewhat related to the previous one uh because also here we are actually not trying to solve problems in oracles uh but rather try to uh suggest Oracle as a solution to a problem so yeah so this talk is a lot about risk management and the problems and a potential solution to it so yeah by the way for the stage the timer is not running so yeah so first of all you know what is defi economic risk management because I'm pretty sure everyone in the
audience are kind of aware there's a lot of risk in Defi and smart contracts crypto in general uh but most of the people are particularly concerned not with economic risk but rather smart contract hacks loss of key and all the classic cyber security attacks and this is mostly because we are at a very early stage where most of the issues we see stem from these kinds of things ER while in traditional SEC finance and eventually also in Defi and I'm hoping you know sooner
rather than later in defi we will reach into a stage uh where like all the classic bugs are kind of solved uh we can write like very robust software and smart contracts uh but then the economic mess begin and specifically in finance and also these days in defi credit an issuing credit is one of the most maybe settled issues and problems and a lot of Bubbles and problems and bankruptcy issue stem from there H so the focus here in this talk and economic risk management is right now mostly around lending you also see
it in maybe stable coins which are some particular form of lending and it's mostly about some protocol is giv alone and typically versus some collat where the goal is to eventually have the user to repay the loan and where the only reason where user do not repay is if the long terms were kind of too generous and at the end of the day the collateral might work less than than the user debt and then especially in defy where everything is permissionless the user will just run away with the depth uh yeah so risk management economic risk management is notorious
already in trade F not only in crypto and arguably it was one of the kind of uh factors that even led to uh the creation of Bitcoin right the 2008 financial crisis uh was largely a credit crisis where a lot of loans specifically mortgages uh were given H in such way that eventually borrowers did not had to repay their money because the collateral was some kind of subprime real estate which ended up wor much less than the actual borrowers
depth and this world is controlled like in the trade fight world this is controlled a lot by like very few agencies I think notably most of them are Americans known to be biased because of political and also business conflict of interest there's arguably kind of you know like very huge bias towards maybe the us as a country right the government that risk management right and we can only speculate it has to do something to the location of these agencies the connections they have Etc okay so this is three fi but now we
have crypto right and everything is perfect so now right like last year uh we had some bankruptcies that was largely doe H not only due to uh loans and credit but specifically due to kind of uh very creative risk management and issuing loans ER so Ser capital you can argue also FTX case might have been you know like a complete fraud but you know eventually also there were entities that were giving them credit Jenis uh I think Jenis trade or capital is notably kind of a you know
like very serious entity with their own risk management team H where at certain point they they took a decision which is to be honest very common you know like in Banks and trade F just not to liquidate three capital because otherwise it would trigger you know like a even bigger liquidation Cascade and must run to the bank Etc it didn't work out for [Music] them FTX poses liquidations for alamida so okay that probably frent not because of some risk management but still all bankruptcies you know like eventually stem for that H and then you can say okay so you know crypto is still you know like an
Emerging Market not heavily regulated uh but but here we actually see you know like an example from the London Metal Exchange where the exchange operator decided to pose trade for a while and like there were a lot of complaints and suggestions they did it to protect one of their whales from liquidations and okay so this is regulated so there are some lawsuits about it but you know like eventually we can only speculate you know why they H POS the trade uh when they did so okay you know so this is crypto this is a trade F but of course defi right defi is
different you know we have Dows everything is transparent uh we we have Forum posts right H we know the agenda of all participants uh so to some extent it it is true uh however at the end of the day it's still very common uh for humans to eventually take decisions on risk management also in defi whether it's a DA or some committed that recommends the da what to do or typically like a multi with some either offchain or onchain vote it doesn't really matter the point is that eventually you have
people with many interest and to be honest in these days you know there are mostly like good people all around H but you know one day it could change and like very recent example and again this is not like uh the worst example out there and eventually things there didn't really you know went too bad but like a month ago we all witnessed like a deeg of unknown LRT easy East ER and this had an effect uh in particular on two Landing markets and actually there we we saw like two phenomenas which are very typical ER in defy risk management so
one is that one platform decided to freeze liquidations uh which is again like perfectly valid decision to make in retrospect it saved the platforms from a lot of bad depth however you know this is defi you know we like to I I'm a developer when I'm interacting with s defi protocol my kind of source of learning how the protocol supposed to work and how it will work is from the code H it's very also very possible that this policy was somehow conveyed in a for post I don't know maybe yes maybe no but even if it was conveyed you know at the end of the day if you have like a
person that need to decide on whether you need to click the button you don't really know what what will happen and there are always you know some considerations here and there H and again this is something very common that a bank will do maybe you know it even has some sort of like expected positive value in terms of the outcome H but this is not really how we would expect defi to work and then like in another platform which might be might be the opposite but you know one of the issues with human risk management that it is slow to respond
and here so like the previous call was on me so it's not about not only you know we are not talking here about 10 seconds and about beting you know me Bots uh but here I'm talking about you know like hours even days and actually it is the norm H that in some Landing markets that are controlled by Ada da it can also take weeks uh so here like in this example in one platform so because of the dpeg liquidity was completely drained and like for over 24 hours uh you know this collateral was still offered with very attractive uh Landing conditions H even though the amount of collateral was like 10x higher than the
actual Dex liquidity out there uh so yeah so it take times for a human to respond ER so yeah so so what we offer is kind of solution for both however you know at least from the vision perspective or the narrative perspective ER I see like the the first problem of not about speed of response but actually about making the response political a nontransparent like an issue and yeah so like in slide will kind of give you know like [Music]
a quick crash course on you know how Risk Managers roughly work and by the way we ourself over year operated as risk consultant for over seven different platforms H so at the end of the day uh we all have some quantitative metrics uh that are kind of objective uh such as Dex liquidity volatility of the asset Etc H and these are numbers which in general you know all Risk Managers see the same also all defa user see the same ER and we call this you know kind of the objective risk of an asset where surely
you know like the the more Dex liquidity out there you know the better the less volatile the assets you know uh less likely we will end up with bankruptcy but then there's like more domain specific knowledge and this like very subjective both for Risk Managers also for platforms also for maybe you know like the community of the platform uh and you know Luna and us is like an obvious bad example of having you know like exactly the same maybe objective ER data or I like liquidity and volatility as a usdc for example and
to be honest even there it wasn't really the same there were you know like volatile periods there and you can also argue you know maybe the design is different but but still you know so maybe usdt is even you know like a better example because some people like usdt some don't H I think it's very maybe a lot about geography and news cases Etc right and you probably take a guess that like in in this forum people maybe are not very bullish in usdt but you know throughout the world especially in Asia people do like it and you know enjoy using it h and and this part is very subjective right and you know we can
argue you know like for hours on usdt and how it works but eventually if it's non transparent H you know so it's it's very hard you know to kind of rate it and eventually uh someone need to take kind of a subjective decision and what we observed you know like during the years of doing risk [Music] management ER is that eventually when you give it as a service people pay you both for the objective decision making or building quantitative models around it mathematical models but they also very often at least want to get an advice sometimes even a decision on the kind of subjective
things H and also even wors they don't even know like where to put the separation between objective and subjective ER and and yeah eventually you know like as a risk manager we kind of enjoy enjoy you know like charging a lot and you know really help us charge a lot but you know like in many cases our opinion is not more important then you know the the community or the da or you know like the users of the platform and you know like usdt is very good example uh where we cannot really say something very you know like smart about H so yeah so the question you know so we are in defi you know we have humans like right now very good and
smart humans making decisions but they are still humans H you know we don't know who they they advised to what's their you know like conflict of interest are uh so of course you know like right like one in one of the earlier talk today someone said like the recipe for solving you know like crypto problems is okay let's have a consensus committee so even more fundamental solution and preferable solution is let's have a smart contract right which is even better than a Comm committee or a DA H and this smart contract uh will take some quantitative data which is objective data as an input
from some feeds and right now this needs is mostly what we work about work on but then in general it will take something like a confidence factor or risk level which means okay how risky I want to be and this is not really anymore like as a so it could be by a risk manager but can also be like by like a business decision or other you know Comm this is what the community want the d wants maybe you know even uh you know like arguments like okay we are you know partnered with them Etc so right now a lot of it is implicit and users you know if you're a landing
Market user you have no idea about you know like eventually what was what was like the excess risk that a platform took ER but yeah so like here like very clearly like in a smart contract you put uh both of these and then depending on the risk you're willing to take and the data uh the smart contact will spit out uh loan to value ratio for the lending uh so specifically ER we are now live with a very specific formula however the concept could be and will be adjusted also to other formulas where eventually and this is a
bit technical but like eventually it's very much depends on kind of the volatility of the asset which is denoted here by Sigma uh how much liquidity is available so we can dump on it ER you know how much of the asset is offered for a loan which is the the borrow cap and then we have you know like this very subject so all of this is somewhat you know objective uh and we can relatively easily come to a consensus on what are these numbers and then eventually the confidence level or risk factor uh is very platform specific uh
yeah so this is a formula and yeah and uh and now this is live and actually manage or at least help manage a market of $30 million on top of Moro on one of the vaults uh and this is a bit technical slide so I will dip in uh dive in into how exactly it is built H and also specifically Mor for has a special setup that allow us to experiment uh with that H without breaking too much stuff and without you know triggering loss of funds but the
setup in Mor for right now is that we be protocol together with block analytica ER kind of manually guarding everything but uh but like we also deploy an automatic system which works as follow so we fetch Dex we fetch data ER like in a very concrete way from dexes and like from dexus we can aggregate both how much liquidity there is out there on the Chain but also we can fetch prices and specifically volatility and recall that these are the only two ER numbers we need in order to make the
decision H so we have reers who fetch data from here uh because it's on chain and because it's on Block Level it's very easy to reach a consensus there we don't need like any feny median mechanism or something else they put it on a database right now the database for Simplicity is GitHub uh but of course as it's grow it will have some sort of data availability solution so now this data is available either on chain but you know even if offchain it is cryptographically signed by the reers and now we have a risk manager logic that actually goes to the smart
contact ER the smart LTV contract and it feed it with the public sign data H and then it get and okay in okay and specifically now what it gets is from this data it gets the risk level that fits the current lo to Value ratio in the platform ER and and now specifically with Mor for if the risk level is too high then H then we just withdraw from that market if it was a different setup we could consider just maybe lowering the Lo to Value
ratio and of course doing it gradually uh to prevent liquidations ER and okay so now we have you know kind of a programmed a risk management strategy ER where actually anyone can you know fetch the data from the public uh database and enforce withdrawals uh H if it kind of exceeds you know like the risk level that we declared H and and just to finalize you know like the entire setup this risk level is public not only on a form post but like more importantly it is configured you know either here or here
but like actually on chain H and we can convey to users uh in a very transparent manner uh so yeah so this is like the smart LTV setup and again right now live in Moro but can easily be adapted to basically any Landing market and yeah with the slides I conclude and if there are any questions we'll be happy to take one [Applause]