How soft-liquidation works in curve lending
ETHCC 7 · 8 Jul 2024 · 26:20
Martin Krung, a Curve contributor, explains how soft liquidation works in Curve lending and for the crvUSD stablecoin. He says most of Curve's fee income now comes from crvUSD minting and lending rather than the AMM. In his account, collateral sits in price bands inside a special AMM, sold into crvUSD as the price falls and bought back as it recovers, at a cost to the borrower. He walks through a real position, describes soft liquidation as a kind of built-in stop loss, and notes risks such as losses in choppy markets, bad debt and the need for a granular price feed.
Speakers
Topics
From ETHCC 7, hosted by Ethereum France.
Transcript
Shall I start? Hi. Hi Arian. Hi, um, I'm Martin from uh curve, I'm a curve contributor. And I will talk about uh soft liquidation who is like part of curve landing and also curve usd. So um there's a QR code, you can scan it, so then you see also there are links under the to the documentation and also the slides. So about me, I'm like uh I would say D F DeFi OG. I'm like in this industry like since like full-time three years, but before I played all with all the protocols I've been around.
And curve is one of the protocols I've played with. And this is the reason I I was LP in Curve, I got the airdrop and uh so I know curve quite well. I joined Curve as like a full-time contributor in September. I my role is so kind of I would say facilitator a little bit, look what's coming from outside and try to integrate it for um yeah, curve as a curve as a curve contributor, basically. I it's not a tech role, even if I have a background, I have been a full stack dev in the past so the talk is about how software liquidation works in curve lending it's not so technical it's more like my goal is that everyone understands what's yeah soft liquidation basically what's the benefit for soft liquidation so um what's curve I know maybe you have an opinion and so I have some questions for you basically so um is curve what's is is it an AMM or who who knows curve or who knows curve everyone no okay so and uh so curve is uh is it the AMM curve for you yeah it's AMM okay but it started as AMM yes and then we we made a or we made yeah we made a like a uh a stable coin curve usd basically and now we have landing market now and uh we have a pretty we are cash flow business basically we we make not we but our holes make a lot of money because the cash for right now is like we take fees from the AMM side and we take fees um on the lay on on minting curve usd basically and last week we had like um 70k curve dollar per week we earned for our holders so if you hold a V token right now the price not very well very good but if all now you get 44 percentage cash flow a year currently with the fee level you have and the interesting in this is that the AMM is only 20, it's only 200K is from the AMM fees, and half a million is coming from the minting curve USD or lending out curve USD.
So in fact, we are not anymore. We are an AMM still, but in a way the most money we make is on curve USD. So this is why the reason why first very important to be to push curve USD because that's where the place we make money with basically. So curve is different things. It's an AM, yes, and it's a um uh we have curfews D as as stablecoin and curve has also now a landing market. And curve USD is like the first time, and this is like a brainchild of Mitch Mikel Egoff, the founder of Curve. He had like the idea, he had problems basically because he has constantly very close.
His curve has been very close to liquidation. I guess many of you know the story. Basically, so he tried to solve his own problems. And if you're lending out money and you're liquidated on a hard spot, then you lose your collateral and then you are basically. So this is the reason why he invented as part from um curve USD as a stable coin. That's like a graph somebody made for us. Um that's the full curve USD. But part of this is soft liquidation, and curve USD is around one year old, so the soft liquidation part is like also part of this. The stable coins a little bit complicated.
And now I'm showing different um views of um yeah, soft liquidation and how it works. And some of the views are from the curve USD minting process because yeah, there's made more data to show basically, and some of the things I show is from the um landing market. So this is curve USD minting. Curve USD is a fully collateralized um stable coin. Basically, that's the thing you can give as collateral, and then you draw curve USD. And what you see here is that the borrow rate is pretty high. This screen charge is like from last week.
So this is all the that's the income we generate basically because this all goes to the DAO at the end. And that's the minting. So I most look at the ETH curve USD pair, and here you see the total debt is 24 million, and the total card value is 46 million. And so now this is the current um state or last week, basically. Last week, you see here that the price of um Doracle is like in the middle or not in the middle, left side, but it's not on top, and you see black black um bands, we call them bands.
You see black bands and other ones, and the black bands are currently all in curve USD. And this means that's a little bit strange about it's not strange, but part of the curve USD who has been minted here is like uh depth by is collateralized by curve USD itself, basically. So you have it's collateralized by ETH and by curve USD at the same time, and uh just to show that curve usd and also curve landing, in fact, it's just a special AMM at the end. So this is uh this is the AMM part of the uh minting curve USD with ETH. So you see they're almost the same numbers, it's a little bit different.
So it's like um total collateral value. It's like the ETH and the curve USD together is like for 46 um millions and that's the same number as here total collateral value basically the total depth is the amount of people took curve usd out so this means and uh yeah this is like the soft liquidation curve usd but then we took out uh the soft liquidation had performed pretty well and then um we used we Mitch he he wrote basically and with help with others he wrote like uh a landing market and the landing market is only a siloed single side lengthy market so you have a collateral um uh you have uh people have to supply curve usd basically and then you can draw um here it's curve then you can some how to say suppliers supply curve usd and somebody can input so Bob gives gives curve USD Alice um deposits curve and then takes out curve USD.
So the reason why is we only mint one reason why why we do this is because we only mint curve USD on mainnet it's like a risk decision. So originally curve USD only exists on mainnet if you take eth as crackland then you call take curfews D and curfs D in other markets it's like bridged on to updom or so so this means if you want to have curves D on a arbitrum you either have to bridge yourself or you can use the landing mark and call use a collateral. It's only single market.
There are some landing marks you can land out both sides. So but this one is like the most simple way basically. So I go into data the soft liquidation later how it works the timing. So what soft liquid needs at the end you need a price feed you see it here the Oracle you need a price fit the information when you should like softly create. Then you need liquidity to soft liquidate basically and then you need collateral fielding bands and this is like the the thing yeah the idea itself is simple I guess the excuse not so so simple. So if you create a loan and this is not my wallet it's like I don't have 70 41 ETH if you create the loan on curved landing this is uh I guess this of yeah you you can say okay one ETH is my current I take out the max amount of um curve USD and then you see the R L R liquidation range there's the place where your bands are like um distributed over over different ranges uh price range basically you see the price is is here 2062 3000 um dollars you can choose the bands basically standard is 10 but you can more but it's not advisable to have many bands that we see later by so you take this out this again how so this is another picture where you see how all the different um lending people taking part landing mark, all the bands are like uh glued together in in the AMM basically.
So if Alice takes it out with less risk and Zobi takes out with more risk closer to the liquidation range, it's just combined in the AMM. And if you look close, if you are going into soft liquidation, then the bands are like sold to curve USD. So if you have ETH, if the price is dropping, the ETH is sold to curve USD and all the way around. So and it's not only that the band is like band sounds like it's like a full entity of um, yeah. You should just at the beginning at the feeling yeah, one band is just to sell in one go, but that's not true.
You can it's like very granular at the end. I think it depends on the price of the fee level basically. I did see a transaction yesterday on Maynet, somebody liquidated or soft liquidated somewhere, and it was like only two dollars because the gas level has been around one or two, I guess over the last days. So this is after the price stop, that's the same. So in a way, you can say I think this is a view you can just turn it around, and then for me, this is more like a trade-off view where you say you have like an order book basically, and uh it's top down, and if the price drops, then you're going to sell it, or if the price goes up, then you buy it back, basically. And um, so this is how it looks in the interface.
So it's relatively simple. So if the price drops, um ETH is sold to curve USD. If the price recovers, it buys this back, buys it back, basically, and then you're fully back to collateralized asset. But there's it's like, yeah, it sounds very good, but there it's a price attached. The the thing is, and there's a city, there's like a guy. I did like for the presentation, I click look for people with positions, and there you see that this guy he was like in the middle of the um his bands have been in the middle of the price, or in the other way around, you can say. So his the he's position is is like backed by curfew SD, 50,000 curve AD and 14 ETH here.
You see on the on the on the bottom basically. And what you also see, you see his health, he says four, seven, four percentage, and then you see um his loss amount. So there's a price attached to this. So he lost like three, seven, nine percentage of his um collateral, one ETH or a little bit more. And the reason why is if it's sold back and forth, you have to incentivize the people or the people, the soft liquidation has to be incentivized basically. That it's like that it's worth so you give a little bit discount, and then um, yeah, that's the discount.
That has a that's the price from discount, basically. And interesting, this guy got then two days later on the dump on Friday, he got fully out of range, basically. And um, you see now the debt position is full in curve USD. So this means the curve hit curve USD he land out with his ETH now are backed by curve USD basically, and you see his depth, yeah. He is not visible, and in a way that's that's uh in a way not so a bad so bad place to be because now he just has to pay for the rate. This is the borrow rate on the minting side.
It's quite expensive, but other markets are much more cheap on Arbitrum, it's much more cheaper to draw curve use DVDs basically. And then you see here there's a view. So I marked it, you know, you can just make a wallet and then you see positions, and then there's a view on his on on the curve USD interface. That's what you see basically. He has been in the liquidation range quite some time, so since 13th of January June basically has been liquidation range, and price has been going up and down, and the loss he generated was like by being in this um area basically. So now he's out, his position is fully backed by um curve USD.
So he is fine, he's fine in a way. Now he has only to pay the borrow rate, and the health will go constantly down basically. And you see he lost the health is like six uh point six percent. He lost the health, and the lost amount uh is uh somehow the same amount he lost more. So he's transitioning in a way, his health is training for the loss amount basically. So and this is another um there's like a dashboard on yeah, you find on Carl Slab, there's a dashboard, that's the dashboard of his position, and Carl Slab has a pretty nice interface.
You can see the all the risk of position, you can filter them out, you can see what's going to happen if the price drops, and but it's only on on for minting. And there you see how is how he has been um uh his position has been um he topped up in between, but the collateral side now he's full in curve USD, but at some point was like half of it and then he is you there you see how the loss accumulated over this time so the borrowers yeah that's the borrow borrow it's like 88k currently this just again to show that he's now out of range and this is a view where you see how um the performance of liquidation liquidation soft liquidation on um on last Friday and there you see it on the price stop you see how the um yeah this is also like on curve us on minty curve usd the positions have been sold to curve usd and then as the price has been going up again curve usd has been uh um uh correct has been bought back with curve usd so now it's this is a uh a uh a page where from the landing market on on on on Arbitrum there you see the landing rate is like yeah it's not so high as or the borrowing rate is not so high as on mainnet and yeah the difference between the landing market and minting there you have an utilization basically and you need the supply because on minting the supply is like printed but on the landing market the supply has to you need supply from other people who supply give you curve usd basically so and then if it's worth to give you curve usd um if you get some money for it basically so you inject it and there you also see now the landing rate.
Some people have been these are also the um this like last week. Now there's weath and for 70, 40 thousand curve USD, and then because the price dropped, more weath is is uh backed um the whole market is backed by more curve USD basically. So yeah, and in the background, just to show it's an AMM, it's a special AMM somehow with it has a controller, then controller below this like the guy the the contact who a lot of logic is in this side, and then there's a monetary police. This is like the the interest rate base.
So yeah, about how is soft liquidation happening? Soft liquidation is in the background process, it's like trade traded, it's traded. So people not people, some bots trade over this pool. So if they see there's like an opportunity and it's opening up, then you they can trade it, and then so they sell it back and forth. And here you see on the way up curve USD buys base buys back with basically. So and then our also myself was last week in preparation. I was like, what do you ever get hard liquidated?
Or what can I calculate calculate the point where I get hard liquidated? I asked Mitch, and he said, No, in a way, not the thing is if your health is of your health of your position is just um going back here. If your health is going to zero, then you're getting liquidated. But it's like independent where the oracle is. If it's Oracle drops to thousand um US dollar, it's it's it's still the same, but you pay you constantly pay for your um that yeah, you constantly pay for the borrow rate, of course. So you accrue more debt over time, and this is the reason why there are like two strategies basic basically you can or that's why it's good for users in a way it's like a a a a huge stop loss basically because you can just make it very close to soft liquidation level that you instantly go into soft integration then if the price drops it drops through the price and then you you already you got you sold it in a way you pre-sold it somehow and then it drops and then you you have to pay for this position with um yeah you pay for this position how long you want and if you decide it's too expensive then yeah you already sold and you close it basically so it's in a way it's a very good way to yeah like a stop loss and what you also can do is like a leverage so but then you never get the curve USD out of the lending market you just loop it and then you have a leverage position so this is uh the thing um so what's the mid why he did it yeah because he had this list liquidation level um issues basically and for this is like yeah perfect solution um so yeah the benefits for for borrowers are in a way yeah soft liquidation because other in other lending market you have to monitor very closely your position and if it drops you have to top it up and you also normally what I did you don't take too much risk if you're not monitoring all the time.
You try to yeah not take too much risk. So you the amount of you take out is not so high basically. So the thing is I think it allows to be more you can take more risk basically. And you can leverage up. So there are two risks, and one is yeah, you get stuck in the soft liquidation. So a place where you don't want to be is where the range, so if there's a crap market and that's exactly your position you have, and then it's traded back and forth, you bleeding constantly, yeah. You lose like money on this market.
If it's dropped, then it's not then then yeah, then it's like m much cheaper. Yeah, that's the for borrowers for lenders. If you provide curve USD, so it's isolated risk, so it depends on the other collateral, so and on the market, but we did see we had issues like it's like battle test with issues last yeah, several issues. That's just normal basically. You have it. So the risk is isolated and the contracts now is over a year old, so I guess it's like yeah, it proved that it really works, but um just to say we don't take fees from this market from the curve USD market. The DAO doesn't it's not earning any fees because we say that we earn on the curve USD side, and if you have more curve USD, then it's like um yeah that that's our business, not taking fees here basically.
Yeah, and then the risk is if bad depth is the risk. We did see it like with the curve position, but we had other instances. So the market size of the landing market and uh um it should be in proportion basically, and it's easier said than done. So and the reason why curve USD we call it softly because most of the position are liquidated over the um over the AMM part of curve base but it's not you don't have to you can buy anything and put it into another market it doesn't have to be curve usd but one thing uh curve pool one reason um so the benefit and risk for projects is that uh yeah you can self list in a way it's not it's not permissioned curve curve you can most of the thing you can just deploy and use it but it's quite complex so if you if you want to do that you can ask us and we try to advise you how we should do it but you can you can do it yourself if you don't don't do it and yeah many of it's like integrated in our tool set of other builds on top many projects built on top of curve and help us to be more yeah more user friendly basically and yeah the risk that's the the thing it has to be adjusted to the size of your liquidity and and it needs a good price fit so chain link is not good enough because if the price fit is like jumpy you then it just sells on the wrong place and risk you're making more depth it's it it's higher basically so it's like you need a very granular um price fit and that's the reason why most of the markets we use like internal price fit from from the AM because they are yeah they have a good quality and now they're also like better tested so the outlook is that um we work on a as there are plans to work on the ETH market where it's like now what the all if you create a market on the lending lending market it's always paired to curve USD.
You can't use another token. We've in a way if you want to have that, then you need then you have to use curve USD is the only stablecoin in the landing market. And now we're going to make a market who is like ETH based, with like the standard talk is ETH, and then you can pair every everyone, everything else to it if you want to have it. Um yeah, we build more integrations. We're going to deploy now. It's an arbitrum and on Mainnet, and we're going to deploy on Optimism. And then but this now, yeah, it's like just in the initial stage.
We try to work on a curved light version, but this is more on the AMM side because it's quite a complex pieced curve itself, and we try to find a more simple solution how we can deploy to other EVM chains basically. Yeah, that's it. So I don't know if there are any questions, or yeah, I think time is up, but you can ask me afterwards. So we have other team members who understand it quite well. So I don't know. I think yeah, I want to thank you for uh sorry I forgot that that Lama he read he did like all the these beautiful charts and Anno Moore who did all the docs, and the same as I just told you, you can read on the docs, and it's very well written basically.
So they're different areas and on the QR code you you find the links to the talks and and the rest of contact and stuff. Thank you very much.
Related talks
- DeFi: Todo lo que querías saber
- Next-Gen DeFi Protocols with Aave and Balancer
- StableCredit USD - Brand New DeFi Money Lego from Andre of Yearn
- The End of Wrapped Tokens: THORChain's Native-Asset Edge | Chad Barraford
- Mihail Milanov, Invest Club: From Yield Farming to NFTs: DeFi Applications in Crypto | ETHSofia 2024
- Enhancing the Curve Ecosystem & Advancing crvUSD
- Aave 🛠️ How to build DeFi applications with Aave & GHO
- Fireside Chat with Michael Egorov
- Kevin Jones I Beginner's Track, Lending & Stablecoins I ETHGlobal Prague 2025