AI as a Curator Layer for DeFi Lending: From Static Rules to Adaptive Risk Management
EthCC[9] · 31 Mar 2026 · 28:26
Krzysztof Gogol presents AI and reinforcement learning as control mechanisms for DeFi lending. The presentation examines adapting interest rates and risk parameters using on-chain data and stress scenarios rather than fixed rules.
Speakers
Topics
From EthCC[9], hosted by Ethereum France.
Transcript
Let's uh make a step back and look at what actually defy lending uh is generally generally protocols like Morpho and AVA they are today a key primitives of D5 they are being heavily used like almost 30% of all of the capital in D5 is actually being gathered there and what those contracts are doing they are simply allowing one types of users borrowers to borrow uh liquidity for example to borrow stable coins using some another crypto as a collateral.
However, those protocols they face some challenges especially during the during the market stress situation. In the past it was during the USDC deact um caused by the FTX collapse but uh we can also think uh a little shorter like one two weeks ago during the hack on USR also a lot of uh vaults on morpho were simply affected by that leading to some bad debts um for those LPS and simply those situations those extremist situations are showing that the humanbased government no matter whether it's a curator it's a DAO. They are very often too slow.
When it comes to a DeFi lending, the idea is very simple. It works almost like a bank. You are having uh for example a bitcoin token. That bitcoin token, let's assume it's worth 100k. You put that bitcoin as a collateral and in exchange you are taking a loan of 60,000 worth USDC. So your loan to value is 60%. Generally in defi lending uh nobody's doing KYC lending is fully anonymous meaning that it needs to be overallized and in the example you can see there is a 40,000 of over collateralization and you can ask who is actually deciding on those rules that for example when I
use bitcoin as a collateral the maximum loan to value is for example 60% not 90% but for liquid staking tokens for somewas It is actually uh 90 or 95 uh%. And those decisions are being made by uh protocol governance or by the curators. There are generally two different approaches. One initiated by a and the other initiated by Moro. When it comes to the AV and this is a screenshot from the I think last one month. You can see that you can supply uh one type of a tokens as a collateral for example USDC and you make two and a
half% yield on that but on the other hand you can also borrow some tokens with those uh with those uh with those tokens on the right as a collateral and then a other DA is simply deciding what are the risk parameters what are the rules uh of the loan that you can take here and also avid is deciding actually which tokens are allowed to be used as a corella and which tokens are allowed to be borrowed.
As a result, we are getting a protocol that is actually extremely robust. A is very long on the market. It wasn't hacked. It's having almost 20 billions uh logged there and it's working as it should uh be. However, we are having today especially today much more uh innovation coming from LWAs from the new stable coins from the uh new types of the tokens and other because of its conservative approach is simply not accepting or it's difficult for those new tokens to get listed there and the Moro is took a different approach whereas in a yeah to get into the market you need to pass a D vote in
Moro markets are fully permissionless and simply mean that anyone can come to Morpho and can create a market for his token against USDC. The the process is fully permissionless. However, there's a trick and because the those markets in Morpho are isolated, meaning that there are different currency uh cryptocurrency pairs like you can see in that example um CB uh Bitcoin against USDC or SUSDS against USDT and then simply when you are a lender then you decide to which market you provide liquidity or maybe to which uh vault with which markets you provide
liquidity. In case of a you just provide one big pool of USDC that's always paying yeah two 3%. In case of morpho, you simply decide which market you feel comfortable to uh provide liquidity for. And the difference is quite important because those markets are permissionless and one can create them and then one can put any risk parameters he wants and simply some of those markets they can be quite um quite risky. Although they are they are yielding very high yield and simply vault curators there are kind of intermediators that are stepping in and they simply analyze those risk
parameters they create uh risk parameters for the new markets and they allow the users to create in a vault that is automatically managed by them and thanks to that nobody uh or let's say the LPS they don't have to do a very deep due diligence but they can simply trust the curator that the curator already checked what are the risk parameters inside how the vault is being managed and can deposits their tokens there you can see here actually example of such accurated uh markets for USDC you can see that actually some vaults are yielding something like 10% whereas others 7% I mean most of the vaults today uh yield something around five
six% I mean if you uh if you want to get something more above that then you need to accept a vault with a higher risk with some yeah Pendle tokens or some new markets for the new AWS but actually those two approaches they have some uh sim similarities like u in case both of a and morpho everything is being managed by the smart contract so actually technically it's a a smart contract that is a lender there are some liquidity providers And there are also borrowers. But this is where actually similarities end. Um and the biggest difference is in the form of the governance because in case of a
everything is centrally managed by the DAO. In case of Morpho, it's permissionless. And we have that intermediary layer which which are vault which are vault culators that simply create those vaults and allow you or allow any users to interact with those um landing markets via curated vaults. And right now I'm going to show you actually the third approach where instead of a uh like DA DO based management instead of the curators we can simply have uh landing markets that are fully based on artificial uh intelligence and based on the um based on the AI agents.
So I'm going to show you like a research uh that we did at the university and in that research we look at the different reinforcement learning algorithms, different policies, how that agent was learning, how to make decisions and we simply uh discovered that I mean those agents they outperform both DAO and the human curators especially during the times of deeps of the market stress when you need to um when you need to take very fast decisions. There were already some uh uh re research uh earlier about how reinforcement learning or machine learning can actually accelerate the
decision uh within those here we taking like a extreme approach and we simply propose that AI can actually replace the creator and manage the markets by itself and what's happening uh in our setup is actually AI agent is deciding on this landing curve this is a screenshot from other I mean it works the same in morpho and simply that curve is being implemented inside a smart contract and based on what's what's the current utilization of the market then the borrower needs to pay higher or lower interest rate. So you can see that for example currently the utilization is
around uh 80%. Meaning that for example if the vault is having 1 million and 80 and 800k is being borrowed out the utilization is 80%. And in case of the 80% utilization of the market then simply the interest rate are around uh 2%. When the utilization rate is goes up then the interest rate is going up. when the utilization goes down interest rate is going down and the idea is that actually the utilization should be around 90%.
This is a place in the chart where you can see the rates are becoming to go u steep very sharply but this is like a very static approach implemented by a morpho. Now we are uh going to check what's going to happen when actually AI steps in and AI is managing those interest rates and decides how steep there should be based on the market conditions. Reinforcement learning is actually uh it's not LLM so it's it doesn't work like judge DP it's a part of the artificial intelligence and a machine learning and this is simply the u the area of the computer science where there
is independent agent and that agent is observing the environment making decisions and acting upon those decisions like mathematically it can be formalized into different states actions and rewards because that agent is being rewarded. If it makes a good decision, it's being punished when it's when it makes bad decisions. And it's also very important that the state that the the agent is um observing is actually realistic, meaning that he can observe what actually is observable like the current utilization, the current prices, but maybe the agent can also observe the volatility that is on the market or user behaviors. doesn't have to be only the
things related to uh smart contract of a lending protocol but in general and the market information that are publicly available. There are I mean formally there are different uh policies. Polices simply u decides how the agent is making a decisions. It maybe to cut long story short, it it also decides how severely agent is punished for making a bad decision. Meaning that sometimes agent is willing to take more um risky decisions, sometimes it's behaving uh more conservatively. And in that study, we simply look at three different algorithms for reinforcement learning.
And these are conservative Q-learning, behavioral chlorine, and the TBC. And we simply analyze based on the historical data from a how agent that is acting according to those three policies would perform. Okay. We look at the uh data set both from the a v2 and v3 and on the uh pools with the two largest cryptocurrencies rap bitcoin and rap ethereum for the last uh for the last four years and the agent was observing the current utilization. It's observing also the rates for the borrowing and lending and the what's happening on the market
especially volatility of bitcoin and ethereum turn out to be a very important uh factors. This is uh how actually that utilization function looks like. So this is like the brain behind that engine and you can see that agent that agent is having a few objectives like one of the objective is that uh he wants to keep the utilization of the lending pool close to the optimal as is defined by a or morpho which is yeah typically 90%. The second thing is agent wants to keep the borrowing rates as low as possible so that the borrowers will be happy but it also wants to keep
the lending rates high so that the liquidity providers yeah will be happy. So trying to combine the best the best for the uh two groups but also very important the agent doesn't want the market to be very volatile. So yeah, it wants uh one of the objective is actually to keep the whole market stable. And yeah, in our data we look at the u we took a data for the last four years and we run a daily uh daily an uh daily analysis and simply what it turn out is that those uh agents respond very well to the early signals
of a stress and it also makes the predictability of the LP returns uh much better. I mean if you're already using other on morpho you can see that those rates actually they jump quite a lot especially when there is a large LP coming then the rates go down significantly I know from eight to 1% and then after four eight hours they go back to uh 6%. uh it's the same happening with uh when the large borrower is coming then the rates can jump I know from four to 20% and then go uh down after again one day or two days back to 4%. And simply with the AI deciding on those how those
curves should look like we can smooth uh that effect and that liquidity uh impact on the on the rights. The third the third I think very important is that especially in the pools with a lower liquidity that effect of the large LP or the large borrower is very strong and with that AI based approach simply borrowers and LPS can get more stability. This is visible in the morpho vaults. If you look there actually most of the votes they are relatively small. They are yeah very often below even one a million.
Okay. And the next finding is that very important because the agent is acting especially during the market distrust it helps to mitigate the bad debt. But that is a situation when the the lending uh when simply the collateral is being sold at a decentralized exchange. It's being called a liquidation in DeFi and simply those liquidations are being executed in order to mitigate the bad debt because when you are a lender in a D5 lending you don't uh I mean you want to make return and you uh never want actually to lose the money that you are lending and simply a situation when you lose the money. So you put 100 uh 100k and you
take out 90k it's simply example of a bad debt and yeah we want to avoid it and the best thing actually to avoid it is to act very quickly when there is something uh bad happening on the market and again there was a very good example two weeks ago with USR uh where actually some curators managed to uh close their positions and liquidated very quickly whereas others were rather slow to respond and or even they had bots that were uh seeing the high yield for those markets and they were instead of decreasing exposure to that market they start to uh incre uh increase it and uh they are in a serious situation now with a potential high bad
uh exposure and I mean it's also showing that it's very difficult to fully automate those things purely based on the on the static simple rules But we need some engine, we need some AI that will be uh that will be acting. And the similar situations happened in the past during the FDX collapse and uh the related USDC pack with uh Silicon Valley bank and yeah area uh if crashes in all those situations simply AI agent which is observing the volatility on the market can actually distinguish that what's happening is actually the what's happening currently is a deep and even
those interest rate are uh spiking this This is not a situation where uh you should put more money as a liquidity provider but this is a situation when you should uh withdraw uh withdraw your money because the uh market volatility is uh suspiciously high. Okay. I mean this I mean also AI agents they are uh they can make not always the perfect decisions. So maybe very important work is on the guardians. Guardians are like another type of the actors that simply supervise what AI agents are doing and they are making sure that the agents actually are acting within the mandate and the policy they are having. That's the one very
important area of the I would say further uh research or applications and the other one is about uh using zero knowledge to make sure that actually what we see in the pool and also what the agent is doing is honest. The issue with those AI agent is uh very often and also in our case the agent uh was running um outside of the blockchain. So it was running in the cloud doing the calculations there and then simply sending information onchain with the current uh decisions. So you can always ask whether that agent is honest or what's happening inside uh its logic on the cloud and here as zero knowledge can be a perfect solution.
Okay. So maybe to conclude um AI agents they are like a potential improvement for their defy protocols like uh we have a we have morpho introducing the vaults. However, both of those protocols they assume the interest rates are static. They are statically implemented inside um smart contract and yeah here we propose that actually though those uh those rules then can be automatically adjusted but but within the predefined uh ranges.
Okay. Our uh work is actually accessible uh online so you can yeah download it. uh there is no payw wall uh and if you have any questions yeah feel free to ask me now or yeah reach out after our talk. Thank you. >> Uh thank you very much Kristoff. Uh we have question from the audience. So one question uh slide 24 you had the essentially the results of what you uh um pre and post training now uh one yeah that one um did you do did you train
your agent on the full data set and then evaluated on the full data set or did you train on a subset of that and evaluate on another period? Yeah, this actually uh thank you very good question. Uh so what's the second? So we train uh the age on one subset and we evaluated on a different one. >> Yes, I think we split it like the first uh I mean there were some months uh in every year when we were learning and also like a random months when we were evaluating Um so I wondering because you are
mentioning you are measuring the cumulative return for the agent. Um so I wondered how does it take into account of like liquidation and losses from that like which kind of variables you were using and also in some cases for example in the resolve liquidation um like do you need to mark those liquidation events like manually because uh I think they have their oracle price hardcoded to one. So in those cases how would you like adjust the return the cumulative return function?
Yes, that's actually very good uh questions about oracles and liquidations. So that that agent and also that re reward function uh is not looking at the risk coming from the oracles and here the reason is because uh it's working on the highly liquid markets like rapid and rough bitcoin. So we assume that the liquidations will happen uh instantaneously and there is like a competition between the liquidators. But actually your point is very good especially with those new assets like RWAS that are less liquid simply uh you can't assume that the liquidation is going to happen and then yeah how liquidation is being
performed will have an impact on the uh will have an impact yeah on the performance of the agent and also how the Oracle is implemented also has a big impact here I mean for those two assets it's quite obvious the the market depth is quite uh quite deep and the oracles are uh reporting the price from multiple sources. But for the less liquid assets uh sometimes there's only one data source uh sometimes data source actually is pointing offchain to some nav it's not pointing to any exchange onchain. Uh so yes with those new types of the assets other than if and bitcoin there are a lot of new complexities coming uh
coming to play and actually we are currently looking at them. So that's this is a very hot topic. >> Maybe in the meantime the next speaker can start preparing for the presentation. But do we have one more question for the audience? >> Um uh I might I might have the wrong end of the stick. So, if I do, please uh please tell me I'm an idiot. Um would it be fair to characterize the the agents as effectively establishing a better fair price for the or better a better fair clearing rate or clearing interest rate for the pool at any one point in time? And secondly, if
they are doing that, does that imply that if the rate is either in the marketplace is either above or below that, it is under or overvalued and that there is an opportunity there? And secondly, could you over could you sorry, thirdly, could you apply this across all lending markets to actually determine whether something was under or overvalued in terms of the current state of the of the marketplace? >> Yes, thank you. These are very good uh questions. So generally yes I mean that methodology that approach can be generalized to any uh to any markets. I mean maybe that there are two important uh restrictions. One are those uh guardians. So it's important actually to
limit what the agent uh can or cannot do. So how much he can modify uh exactly those rates here because if we allow too much modification then simply neither borrowers nor LPS would trusted and also the second thing about making it more general for other assets. There are those new risk coming from other assets like yeah oracles and liquidations that yeah does not exist for the liquid uh crypto markets. >> Thank you. We have a few more minutes um before the next speaker starts. So maybe I would like to follow up um because I'm particularly interested um with the
intersection of AI and protocol design token engineering. I mean we here at the token engineering stage. So it would be just appropriate to ask the question of what are your conclusions from for a proper and stable design of token systems uh or protocols because with respect to agents you do not only have uh kind of the security risks of like it is a blackbox you don't know what's actually happening but also you give a lot of freedom to the agent to enact on on the governance of a system so I would be especially separated in how do you ensure properties or how do to uh separate the protocol functioning and make sure that we have a robust uh stable system versus how can you
optimize the governance with the solution that you propose. >> Yeah, thank you Kushov. This is a very good question. Uh I mean and on this slide you can see a summary of those uh two approaches that we have today to governance like in case of a everything is decide uh decided by the DAO. DAO is voting which token can be a coratellar which can be borrowed. DAO is voting about approving risk parameters. Then we have a morpho that is fully permissionless and the one can create a market for anything can put any oracle there. And then we have those intermediaries called curators that are doing some form of a duty regions to make it less risky for users. And now
what we are proposing we are having actually the third option like the AI agent that is simply uh taking over the protocol governance and I believe that uh might be difficult in the future to replace for example a with a AI agent making all of the decisions but in the markets like Morpho where anyway it's they are permissionless they have curators I mean curators or big part of their activities they can be replaced by the AI agents.
>> Perfect. Thank you so much. Uh thank you so much Kristoff. Uh you can wrap up now. >> Thank you. >> Perfect. So while the presentation for the next speaker is still being uh prepared uh we can give a brief introduction and uh maybe give you the stage regardless and let you um give um a light dive in into the topic. So um let me introduce here uh I have it on my list um the next speaker. Sorry.
Um so we is trying to to answer is um how whether challenge based optimistic protocols are truly incentive safe. >> Yeah, thank you for introduction. Hello, I'm