This week we will investigate the liquidity crisis BendDAO had and its implication for the broader NFT market.
We are live. Welcome everyone. Welcome to our second Dhun Arcana session where we'll be learning how to do on-chain data analytics with current trends in the Web3 world. So today, we'll be talking about BendDAO liquidity crisis.
My name is Jackie. I am @agaperste on Twitter, and with me here, I have the wonderful Boxer to help us monitor the chat and a little bit of logistics today. We might have the BendDAO team joining us at the very end to answer any questions that you have…very much looking forward to that part.
So, I'm gonna be teaching a fish how to swim. Any questions you have, you can ask them at the end. Let me share my screen, and let's get to it.
Let me quickly do this. All right. So BendDAO liquidity crisis. About two weeks ago, right. Another big crisis started circulating on crypto Twitter, something something blue chip NFT, Bored Apes, BendDAO liquidity crisis.
So, we started seeing tweets like this where people are talking about serious peril of liquidation, the biggest risk to the NFT market. BendDAO and Bored Ape Yacht Club loan liquidation can nuke the entire NFT market.
BendDAO has run out of ETH, and lenders cannot pull their money out. And also Pentagon, Hexagon, Octagon, Octagon, your money gone. So I see these tweets, and I'm just like wow, I'm scared.
But I'm also confused at the same time. So today, we're going to talk about what BendDAO is, why it exists, the liquidity crisis, what that is, and what happened with BendDAO's liquidity crashes. Finally, it covers some factors that helped to avert this crisis.
So first, let's talk about what BendDAO is. Let's take a step back. So, NFTs, especially the blue chip, Bored Apes, Mutant Apes, and Doodles, are pretty valuable, but they're also highly illiquid.
Think about a house that you just bought. It's very nice. You love it. It's very expensive. You want to do something with it, but you can't. So, you don't want to sell your house because you just bought it, right? But you want to be able to get the liquidity from this very valuable thing and do more about it.
So, basically BendDAO would allow you to do this. BendDAO is a peer-to-peer lending solution. This means, on one side of the equation, we have the blue chip NFT holders, and they will basically deposit their NFTs into BendDAO as a collateral. In turn, they will borrow ETH, and then they will pay back the ETH with interest.
So, on the other side, you have the liquidity providers where they will deposit their ETH into this pool, and then in turn, they will get rewarded and earn some interest. So, in a nutshell, a very simplified version, this is what BendDAO does. BendDAO is a liquidity solution for the blue chip NFT holders.
And you might have heard other competitors such as NFTfi, who does what…like a peer-to-peer lending solution for NFTs. Recently, we've also seen Sudoswap, but yeah, just to understand BendDAO a bit more.
Let’s take a walk through an example. All right, so let's say that I have a Bored Ape. I do not to put a dream about having one. And currently the floor price is 100 ETH, right.
And even though these are blue chip NFTs, they are actually quite volatile. And we can see that through the analytics dashboard. So the launch team here has very nicely put together a chart of the NFT for the median price and the volume for us.
So, we can see a Bored Apes, and we can see the volume fluctuates. And we can also see that the blue line chart here is the 10 percentile of the price which approximates to the floor price.
We can see that it is quite similar for Crypto Punk because you see the drops and then the Mutant Ape. You get the idea that these blue chip NFTs, while they're blue chip, they're still quite volatile, so you can't really treat them as your house.
Okay, so I have one, and now I need liquidity as we've previously talked about. I don't want to sell it, but I needed liquidity. Potentially, I want to flip more monkeys to make more money.
And actually, you probably see this guy around already. So, his name is Frank, and he has 60 Apes. He talks about how he utilizes this BendDAO to keep flipping or making more money.
So yeah, let's say I'm gonna take his strategy and do similar things. So, then I come to BendDAO, and I want to borrow some money. And then I check the terms and conditions.
BendDAO has this risk parameter. So, in one of them is called loan to value or collateral ratio. So, here we see that, for the Bored Ape collection, it is 40%. What does that mean?
Meaning that the floor price right now is 100 ETH, supposedly, and then I can borrow up to 40% of 100 ETH, which is 40 ETH in this case. So, I check the parameters, and okay, I decided to borrow 40 ETH.
Alright. Awesome. And then next, I borrowed it. I know that I need to pay back the 40 ETH with some interest, right. So, that's something that I know and another thing that I need to monitor is the health factor of this loan that I took out.
So, health factor. The equation for that is the floor price of the collection times the liquidity threshold. This is another risk parameter that is set by BendDAO and then divided by the debt with interest.
Okay, so what does that mean for us in this scenario? The floor price: currently AYP is 100. And then the liquidation threshold is 90%. We can check on this other side, I'm going to switch back to the documentation you can actually see. Okay, currently, it's actually at 85%.
But while we were going through a liquidity crisis, it was actually 90%. So we're going to just use that as an example. And then I borrowed 40 ETH as the principal that's what I have so for two weeks, and then the interest, let's say the interest at the time was 25%.
So, times one plus 25%. Using this equation, I calculate that my health factor currently is 1.8. Alright, so what exactly does that mean? We can go into their documentation and take a look. So health factors, as we can see here, there are different levels.
But if it's below 1.0, then it's like you're in danger territory. Why is that because it says, when the health factor for an NFT is below one, anyone can trigger a liquidation in terms of an NFT auction?
So that's like when you cannot pay the loan, the mortgage on your house, and then the bank decides to foreclose your house. It's like that. So yeah, I definitely do not want my health factor to fall below one.
And we'll talk more about exactly what the auction means a little bit later. But for now, just remember, I want my health factor to be above one. And right now, it's 1.8. So, I'm quite happy.
And then some time passes. And now, there's a warning sign. Why is that? So, the floor price of Bored Apes drops to 60 ETH. Right? So, as we have seen in the previous chart, these blue chip of NFTs actually are quite volatile at times.
So, it drops to 60 ETH. And it creates a problem for me, right? So, this is the health factor equation. Instead of 100, I now have 60. So mathematically speaking, the top part of this equation goes down, then my whole factor will go down already, right.
And there's another thing, which is the interest rate that I'm paying back. So the interest, the borrow interest rate, is actually tied to the utilization rate. And let's explain what that means. So first, let's go into their documentation.
So, this is a chart that the BendDAO has about how they determine the model that they use to determine the borrow rate. And the borrower rate is tied with utilization rate.
Okay, so the utilization rate is the amount of money being loaned out divided by the total liquidity that they have in the pool. So, it's like how much liquidity is being utilized in this ETH pool.
So, as the utilization goes up, you can see the bar rate goes up drastically, right? So according to their documentation, we know this.
And actually, with Dune, you can see all this data happening. We can track the borrow rate throughout time and utilization throughout time with a new chart. So here, we've written some Queries, and then we can track…actually, it's a positive correlation between the utilization rate and borrower rates.
And then we know around two weeks ago — August 19th or 20th — that's when all the crazy stuff started happening, and we can actually see the utilization started going up drastically and then the borrower rates also went up to over 100%.
Yeah, so why is that happening? Think about it. When we had the floor price drop for these blue chip NFTs. There is a market panic, right, and people are still losing confidence and the liquidity providers start pulling out their ETH.
So remember, the utilization is the amount borrowed divided by the liquidity available. So when people start pulling out their liquidity, right, the utilization will jack up, but also the interest rate will jack up. This just creates an unhealthy cycle for BendDAO in this instance.
And we'll talk more about that later. But yeah, for now, we understand coming back for the price drop. So, in our scenario, the floor price drops to succeed. And then also the interest rate goes up because of the utilization shoots up.
And using the same equation, I now have a health factor dangerously close to one, and I have a 1.015 health factor. And we know that when the health factor is below one, bad things can happen liquidation can be triggered. So, let's go into this one more time to see what is happening.
So when it goes into, this liquidation stage, you have a period of time. Previously, it was a 48-hour course as the loan borrower, you have 48 hours to either partially pay back your loan, completely repay, or choose to default.
That's as a loan loner as a borrower. That's what you have. And as liquidators, someone has to place a bid to kick off the auction process, and then they are the liquidator. They will, in turn, start to liquidate the loan that you have.
So, these are the two things that can happen in liquidation, and just one more thing to mention, there is actually some requirement for the bid for these liquidators. So, for the first bid, the price has to be greater than the total debt.
And previously, when the liquidation crisis was happening, the bid must be 95% of OpenSea floor price. So, let me just read that. It has to be not only greater than the total debt but also greater than 95% of the OpenSea floor price.
As a liquidator, what’s going through your mind is like, “Oh, like the upside? Might be like 5%.” If I can sell this liquidated NFT, also remember there's a certain period where your money is just locked.
If you place a bid, let's say the period is like 48 hours. Basically, you're locking up your bid for 48 hours, but the floor price as we have seen fluctuates, so it can drop while your money is locked with, with BendDAO for your bid.
So yes, that's something to keep in mind going back to our example again. I don't want to be liquidated. I basically go find some money from under my bed like behind the wall. And I decide to repay my loan, and I redeem my monkey. So happy scenario for me.
Yes. So, that's in a nutshell, a walkthrough of what BendDAO does as an example. So, now with the knowledge of BendDAO, let's talk about what a liquidity crisis is.
Okay, so a liquidity crisis technically happens when you don't have enough cash or assets such as cash on hand. So, think about if you're a bank. I'm not saying this is what happened.
But if you're a bank, you have depositors putting money in your bank. Then, all of a sudden, these depositor market conditions go down, and then they start losing confidence. They line up in front of your bank to decide to withdraw their assets and then you don't have the money to give it to them.
So, that's what happened during the Great Depression. And that's a mental picture that you can have for a liquidity crisis. And as for BendDAO, let's start with some visuals and role like dive in with diagrams of things like what triggered the liquidity crisis and what exactly happened.
Let's go into this dashboard and then let's hone in on this particular visual in front of us. In this chart area graph, where the blue represents the amount of available ETH in the BendDAO reserve, their stress…this is a zoomed-in version between August 19 and 24th.
So as we can see, drastic cliff, okay, here…cliff here…cliff. At some point, they basically approach to zero, so there was like zero ETH available to be borrowed and to be paid out. Okay, so that's one visual to help us understand about the liquidity crisis at BendDAO.
Another visual, I want us to look at is this one. We have the total validity versus the total borrowed over time says the burned out contract is deployed. So, the green area chart represents the total liquidity that they have.
And then the orange represents the total borrowed amount that they have. Alright, so we are always in a healthy situation. We always want the green to be bigger than orange because we always want more liquidity than that was loaned out.
Right. But as you can see, it has been pretty healthy throughout. But then in the liquidity crisis about two weeks ago, what we are seeing actually is that the borrowed amount exceeded the total liquidity, meaning that the unpaper didn't really have enough ETH to cover the amount that's being lent out.
So, this is going back to the original definition, like a liquidity crisis occurs when there is a lack of cash or liquid assets. That's what's happening. So yeah, take these two images with you mentally.
And we will go into a bit more detail with a visual on how to understand what was happening and why it happened that way. All right. So, let's look at it. Some major parties that we should consider are the amounts that were borrowed, the amount of liquidity that they have, and also another audit factor is the collateral value.
So, reminder what collateral value is. When you have an NFT, kind of like a house, you are able to actually have some value with that NFTs.
That's why it's used as collateral because if you don't pay back your debt, then whoever holds that, in this case BendDAO, they can decide to auction off this NFT you have. They can recover some, so there is a value associated with this collateralized NFT.
So, that's another factor that we should keep in mind. And then also later on, liquidators are another factor that we will consider. But let's look at the happy scenarios, right.
In happy times, the total amount of liquidity, (this green triangle) should always exceed the total amount being borrowed (this orange triangle), right. And that means that there's always enough money to cover the amount of debt that's being lent out.
And then also this blue circle here. A blue circle here represents the collateral value. So that's a safety mechanism for BendDAO. So that's happy, but in the unhappy times, like the liquidity crisis that we saw, the total amount of liquidity will dwindle.
And it did dwindle because we saw the price fall. People went into a panic mode. And then people started withdrawing their liquidity from this reserve.
So the total liquidity goes down, while the total amount being borrowed not only stays the same, but it would also grow more because as we have seen previously, the interest rate would accrue at a much higher rate than before because the utilization rate goes up, right?
We have the situation where there's more being borrowed than the total liquidity. That’s not a good thing. But also, the very fact that triggered this means that the collateral value also goes down, right?
Because the floor price goes down. So, the value associated with the collateral also dwindles a little bit. So, what do you have on hand? What was worse for a few days for BendDAO was that they were counting on the auction to work.
They were counting on the liquidators to start placing bids to help them recover the value, but they were stuck with bad debt because nobody was placing a bid. Right?
So, then they, in turn, started examining what was happening to start incentivizing people to start liquidating more or to play more liquidity, which we'll cover in part three. Basically, at this point, the liquidators didn't have enough incentive to liquidate these bad debts, so they were in danger of being stuck with floating bad debt.
Yeah, so that’s what was happening with BendDAO’s liquidity crisis and what really triggered it. So now, let's get to the part where we're coming back here.
As on-chain data analysts, we want to be able to also do this ourselves for either BendDAO now or any future protocols that are similar. We want to be able to track the available ETH, so today, we'll build this Query and graph together. So, let's start a new Query.
Go to zero. Close a few windows. Okay, so I'm going to start a new Query. So here, I'm going to select v2 because it's powerful. So, cool, awesome. Gonna do this alright. So what we're gonna do is track the inflow and the outflow of the money.
Whenever we want to track the inflow and outflow of money, we like ERC20 in this case, we can look at this table called ERC20 events transfer and just like a bit backup if you don't know what ERC20 is.
So in general, there are like two token standards that you should know your ERC20 and ERC721 ERC20 is for fungible tokens. So all the all the other coins that you think about they belong to the ERC20 group, and then ERC721 is for non fungible fungible tokens.
So all the NFTs so all these monkeys doodles that you see out in the market, and there's actually a standard of how you should implement these contracts. And if you want to know more, you can go to OpenZepplin, or you can just search OpenZeppelin and then ERC20.
And then you can just read more about, what are the functions that an ERC20 should call and what are the events that it should emit? But yeah, so for now, we'll we'll actually just do ERC20 event transfer, we'll just track this
Alright, cool. So it has like a few different chains. So I'm just going to select the Etherium chain, because BendDAO is on the Ethereum chain, alright, so we are going to we are interested in the inflow of the money.
So, I always just love this like, part gotta set up. Okay, so in order to get that, what do we need to do, we need to understand how the money actually flows. BendDAO actually has quite an awesome documentation.
So if you search for BendDAO docs, and then you can actually go into there, you can read more about it. But for now, I'm just going to use like a quick visual to help us understand, like what was going on in all these contracts, so we can track it.
Okay, so let's go into this board. I will close these two for now. All right, cool. So we want to know the inflow, which is the deposit funding an event right? So when that happens, we are let me see if I have a pen that I can draw.
So, as a depositor, I deposited my ETH into the WETH Gateway Contract, and then wrapped ETH will get sent to the BendWETH. Okay, so what do we need to do the same token of Ethereum chain. So in order to do any action, we need to wrap it into wrapped ETH or WETH.
Then for BendDAO, specifically, the way a BendDAO can keep accounting the interest that's accumulating, it converted into like a token. So, it converts the BendWETH into — sorry, it converted the WETH into BendWETH.
So, what's happening? And this is the part that we are tracking for our inflow. Okay, so now we just need to know the contract address for WETH particularly and BendWETH. How do we do that?
Let's first go to Etherscan and then we can just search for wrapped Ether, which is super searchable. So, you can just do that. I'm copying the address of this. So then going back to my Queries.
So, I'm going to filter where, and let's see, this contract address because we saw on this other part here, right? It's like WETH and BendWETH. So here the contract address equals to lower because we need to lowercase the contract address here.
Yeah, so this is okay. Another thing is sending to BendWETH, right? So two equals two lower, so we need to find that, and let's see if we can find interest. And I might not be able to find it, which is the part I will. Yeah, I will just resort to the documentation.
Let's see. So $BEND tokens. Do I have it here? Nope. So let me go to one of their contracts and just take something, so all their contract builders for this and I will just take a random transaction okay. And then I found the BendWETH that I have.
Okay, so I have found the $Bend interest bearing WETH address, so I will copy that part. And then I will go by this part. And so this is when…and also something to just help us speed up the Query is to filter by the event block time.
So, here I felt you're basically okay, but I can check for the BendWETH. So, whenever the app goes live, right then I can start tracking. So, I can drastically reduce the amount of the blocks that I'm looking at.
I believe somewhere…let me go to the contract address. So go into the contract for $BEND interest bearing WETH. Yeah, so I go to the internal transactions tab. And I can see that there's contract creation being done on the 19th of March.
So that's what I'm going to filter for or anything like. Any event transfer happened beforehand because bandwidth was not even life. So, I will do that. The event block time is greater than or equal to 2022 or 390. So this is when the worse was deployed.
All right, cool. Awesome. So next part, I will just grab what I will need. First, because I'm trying to build something that is accumulated through time, right? Like it's throughout the timespan.
So, we definitely need to grab those events block time. Column. And for now, I think I'm just gonna do the minute, so I don't care about a second. That's too granular for me right now. Oh, so I will truncate to the minute.
This effectively will take that timestamp and truncate it to every minute. And then I'm gonna call it as day for now. And then also, I want to care about the value. So, the value is what's being transferred, right?
And then we know this is faith-based. And we know the decimal is 18 decimals. But if you don't know, I believe you can just look it up. Yeah, you can just on Etherscan, you can even look it up.
Yeah, I actually lost the other one. Let's see, we can quickly go back to yeah…so you can see that the decimal is 18. And also on Dune, there's like a token table you can Query for, and it will tell you how many decimal this token belongs to.
There's quite a lot of ways you can find out the decimal associated with this particular token. So for now, we know it’s at 18 decimal, so we're just going to divide it by 1e18. And this is all because there's no such thing as a decimal in blockchain.
So, in order to represent decimal, you have to just make it like a really, really big number. So yeah, this is what I want. But because I was saying that every millisecond might be too granular for me, and I want it to be every minute.
I want to sum up the inflow for every minute. I'm going to apply a SUM function. And then I'm just going to call this column amount. Alright, so and then at the very end, I will do a group-by-group. I want us to note that just means that it is a grouping…whatever value here by the first column.
Okay, so let's run this quickly. Effectively, in this part, I am tracking the inflow of the amount of ETH. So here, why is that what they have every minute? That's available, basically. Okay, so now we've got the inflow, right. We care about the outflow, which is why we can get to the net flow part.
So, going back to visual. When we have an outflow is when someone decides to withdraw money. When a user decides to withdraw money, it would send its BendWETH back to the WETH gateway, right?
And then, in turn, the width will also trigger something where it's like sending from the BendWETH. This is the part that we're really caring about and our Query tracking. So we know it's still the WETH contract as the address, and we know instead of the last time up here, we care about the from…okay, so that's pretty easy.
We already have the Query mostly written. So, we can just do this. And then we're doing outflow, right? So here, this is search and then instead of a to, it's a from, so I'm sending from to something else.
So, here you can see the from is highlighted. It's because from is a keyword, so I am applying these, how do you call it these? Not a quotation but these backstroke this dot, so the upper left corner of my keyboard, I'm applying this to make sure that to escape the keyword basically.
And then because this is an outflow of money, so previously, it was positive, so we don't need to say anything, but here it is a negative flow. So, I'm putting a negative sign in front of it. And then this part, let's see. So, this part will track the minute-by-minute outflow event for my bandwidth token.
And cool, so this all works fine. We all have a negative amount. Happy stuff. Okay. So now, we're gonna do something called union all. So the union all basically would help sum it up. You have to ensure that the column has to match up.
So, we have the column day, and we have the column amount. It will basically sum up the column the values of these. So effectively, like each day, it will just add this amount in the inflow and minus subtract found in this outflow. Then, I will derive the net amount.
When I do this, it is the net flow. So it's like minute-by-minute. Whenever there's an event happening, a transfer event happening, whether it's in or out, that is the net for that particular minute.
Okay, so now we have the inflows and outflows. But what do we need to do in order to get to this part, right? Because we actually care about what's happening cumulatively from the time up to when the BendWETH comes online.
What is the cumulative balance of this particular token? In order to do that, I'm going to do a CTE clause. I will do with CTE. All right. So here, this part. And then here, I am going to select from, okay, CTE as T…just to make it a little shorter.
So T dot days, we care about each day, the times here is minute. I should have actually came down to the minute. And then I want to know, okay, minute-by-minute what was happening, the amount wise.
And also this is the part I want to do as a cumulative sum, right. I want to do a cumulative sum of the balance. So first, I can apply the sum function, t dot amount. Okay, so here we are using a Windows function.
So basically, this will help us, so Aug 18th, 06, Aug 18th, 1125. So essentially, we want to have a separate column where we want to see okay, 0.5 in the first line, but then the second line will be like 11.3 plus 0.5. So that's a cumulative sum rolling up to the balance.
So how we can achieve that? First, we want to order by a certain order. And in this instance, we want to order by the time so the t dot day for us. And then we can say rows between unbounded preceding and current row.
So effectively, this, the rows between unbounded for rows between unbounded preceding and current row is literally helping you aggregate until your current row what has happened. So, this is the cumulative sum that we need to do.
And we'll just call this ETH_bal. And yeah, so let's run this. And this is the part where it's like summing up all the individual Net Flow. And then we eventually get to the cumulative balance, right.
So we can see cumulatively that this is what's happening. And then we can even see okay up till September 1 that this is what's happening. And so once we have the data results, we can create a visualization.
So, clicking into new visualization, what do I want to do? I think previously, we did an area chart selection to do lots, so we can do an arrow chart or odd visualization. So here, you're defining the x and y.
The X is day perfect, the Y actually wanted the balance. Perfect. And yeah, so here I have my area chart. And obviously, I can go to make it a bit more. I can type the name to be the whatever. It's more readable as Available ETH, and I can even change the color and stuff. You get the idea.
And then once I'm happy with it, I should save the Query. And then I will be able to add it to the dashboard.
Yeah, so that's how we can get to the part of the borrow in the part where we can get to the available ETH chart. So next, in order to construct this chart, let's just quickly walk through how we can get the borrow interest rate.
And this part, how can we get to it by reading the documentation? It has extensive documentation on it…believe I just borrow interest rates were great. Let's see.
If you're in guys tells you exactly what's happening and on-chain how you're able to get the borrow rates by reading the documentation, you know what contracts were and what table you should look for.
And because Dune already decoded this table, you can just Query nicely for them. So now, because we already talked about the part where we are seeing the inflow and outflow of the ETH available in the reserve.
Let’s just see how we can also get the borrow rate throughout the timeline for them? Yes, so first, I will go into here. So as I mentioned, Bend is a decoded project. So here, I come to the decode project, and then I type Bend. Awesome.
So, this is the part I need to find. What is the exact table like contract where the method I need to Query for, so I know that I'm interacting with the lending pool because previously they were sold under documentation, it's a lending pool.
And then, just going back to this side, okay, what do I need? I need some sort of reserve data. Alright. So, I go back to my Query. Let's see if I can find anything that is related to reserve data, so let's just type for that. Okay. All right. Awesome.
So, I can see that there's a event I can Query from them. So they've done an awesome job for data analysts, we can get the reserved data updated. Let's just start another Query, so let's call this rate.
So, same thing, we're gonna grab the rate per minute as we previously had done, and then aggregate it up into a cube (cumulative). Then, make it so it's like throughout the day to put it together on on the same chart.
Okay, so first, let's go into this table and see what we can Query for. Then, I'm going to select stars from the Ethereum learning pool, even rows of data. Okay, awesome.
And, I mean, by this point, I know that there's only worth in this, but just to illustrate how you can get the name of the token if you only know the address. So we can also, there's this table called token Ethereum ERC20.
If you don't know this, you can just go back to the search data, set one, and then you can do token ERC20. Okay, and then you can, like select Ethereum.
And then, you basically get to this table. Let's just quickly take a look at like the columns in this table. So, this table is a lookup table where you have the address of the contract address and the decimal.
Previously, we talked about the decimal belonging to this token, and its symbol. This is like a nice dictionary lookup that that you can you can have. So we're gonna do this. And then we're gonna do that.
And then so the way we can join these two is by the contract address. So, we're doing the contract address of this table equal to this one, let's call it B. And then, let's just go back to BendDAO quickly and see the available columns here.
And then lending pool is the contract that I want. LendingPool is the contract and then instead of lending pool, we were looking for reserve data. Get data updated. Okay, cool, so awesome. And then here, the column that I'm looking at is reserve.
So, I will just do B, that reserve. So reserve is the column that records the token contract address. Okay, so what do I actually want?
So first, I obviously want the event block time and then we're gonna do the same thing where we're truncating it to the minute, so I'm gonna add to this, and then just gonna be same as days.
So next, we're truncating…let's find what we need. We need the variable borrow rate, in this case, just reading their documentation, we know that this is the field that we need to grab, so let's grab this field.
However, as we were talking about previously, we are grouping things together because instead of timestamps like seconds, we're grouping up to minutes. So, we are aggregating by some sort of function.
Here we're going to use the AVG function. So, to get an average per minute as the rate, I also want to make sure that I'm looking for (like I was previously saying)...we should Query for…I'm just going to copy/paste this from my separate place that we have given that we're running behind.
So yeah, we're truncating the day to be greater than March 22. Because I was looking at someone else's Query basically. This is the second day that BendDAO came alive and then the logic there is like we don't want this to be volatile.
We're starting to track the rate from the second day, but obviously like we can do this for whatever like March 19, or whatnot but here I am just filtering for a time that's reasonable.
And then we're gonna do a group one by one and then just because I know what I'm looking for…let's see. Here, I will grab that right.
Sorry, this should work. What's happening? Let's see syntax…semantics earn near T…lft…join on…sorry third try to…I'm forgetting these things...Query, running. Alright, looks like it's running.
Okay, well, it's running something else to denote something else to denote, right? So, these rates look like crazy high numbers. So again, we're gonna like, go back to the documentation side.
And somewhere in the documentation that actually tells us that the rate is denoted by it also has a decimal so it's like the 29th decimal.
So, what we need to do here is to divide it by the 29th. So 1e29th and then also because we want a percent, so we can times it by 100, so to get that percent. We are going to rename this as the borrow rate.
Alright, so now we should have a more reasonable borrow a rate that aligns with what we are expecting. Yes. Awesome. Awesome. So now we have the rate.
And then one last thing to get to the particular chart where we're having the borrow rate side by side with the balance is that we will join this two tables that we just put together.
So we're gonna do a left join, right they will call this R equals to the T dot day, and then, let's just make a nice order by one and then we are going to have the borrower rate right here, so we're gonna call it rate or rate awesome.
Alright, so once it… sorry…it’s probably too small for you guys. Apologies. So once we have this now, we have both the ETH balance and the borrow rate.
And there's some trouble there because we started. We decided to start tracking the rates a little bit later than when the WETH was the BendWETH and deployed, but effectively, we can see the borrow rate side-by-side. And then one last thing that we can do here is to add the borrow rate right here and make this a line chart.
And obviously, this is like less than one all the time. So, it's going to be super small. We're going to enable a right axis. And then we're going to do the borrow rate on the right axis.
And yeah, so now we have constructed this chart where we are also able to start tracking the available ETH side-by-side by the borrower, right. Yes. So, that is the Query that we're building together today.
And lastly, before I turn it over to questions and answers, let's just quickly wrap up what happened after the crisis. So obviously, by now, we know that the crisis was avoided.
So what factors that contributed to that we know that floor price was a big factor, right? So the floor price actually went up. Which we can also again, track it with Dune data, but you can see I've picked a few examples.
So, you can see it actually went up. Okay, awesome. The floor price went up. And then also, they've decided to implement a few proposals to help with the mechanism, the protocol market mechanism.
So first, they removed the limitation that the first bid has to be 95% of the floor price, right. This effectively helps people incentivize them to get bigger profits, so they will actually go liquidate.
And also we were mentioning, when someone places a bid and try to liquidate, they lock up their money for a period of time. So, this was actually 48 hours. They're gradually doing it for 24 hours and even less than that; they're gradually easing into four hours.
That was the proposal. So currently, it's down from 48 hours to 24 hours. So these are the two incentives for the liquidators and then also they bumped up the incentive for liquidity providers.
So, they have a base rate plus some variable rate for whenever you provide liquidity, so they bumped up the rate to 20%. That's another thing, and also to just make the whole like protocol healthier, they actually proposed and started lowering the liquidity threshold.
So remember, the health factor equation we saw earlier, they helped the liquidity threshold was 90% and now it's lower to 85%. They're going to gradually lower it to 70%, so effectively the NFTs will default earlier, so it will be less risky for the people who provide the liquidity.
Yeah, so that's a result from our side today about what happened with BendDAO's liquidity crisis. And now we will welcome the team to be on the stage, and they can help answer any questions.
Let's do this. Yeah, hello. First of all, my brain is exploding, and I think the chat has exploded as well. Because we got absolutely zero questions, which is a bit sad, but yeah, we have with us a Dune wizard who has done great work on BendDAO and one of the cofounders of BendDAO, so welcome you two guys. Very happy to be able to host you here and get your thoughts on the whole situation…
I started building around the first few days when the contract was implemented.
At most, I am fast reacting to the prices during testing to the project as well. So, let's get back to the Dune dashboard. At the end week, we should be looking for more activity to add more money to people behind it…
Nice, nice. Thanks for sharing your thoughts. Yeah, it was absolutely mental when I saw your dashboard. I'm like, wow this is really nice. A really nice angle to like really understand what is happening with what BendDAO does and what is happening with BendDAO. It was very nice to look at for your dashboard as well.
Maybe, can you share some thoughts around the liquidation thresholds and the changes that have been implemented now? Because before it didn't seem to work too well. The market was losing a lot of confidence, and how do you guys plan to make this better in the future like any any thoughts that you can share there?
Yeah, the importance of implementing AI and big 10 and the impact on educational media.
Yeah, if he's even with us, I haven't heard him yet. Crylipto, are you with us? It doesn't really seem…
Sorry. Sorry. Yeah. And so, let me use skills…dictation…stress…how to change…right…oh yeah.
Let me think about your sales before we learn a lot of the bonding curve from Aave and we do the panning videos or the NFT backed loan protocol. But based on Aave's bonding curve and the threshold before is liquidation, the threshold before is 90%, and to be honest, we’ve learn that from Aave and we do not study more.
But after the liquidity crisis, we got a lot of attention and feedback from the community and a lot of the community members posted the proposal BIP 9, and they recommended to us to change the threshold lower because the NFT asset is different from the ERC20 asset the liquidity is a totally different.
We remember that is a Monday, and we saw the proposal on the forum and have are you internal discussion immediately. We accepted the suggestion from the community and then we lowered the liquidation threshold, but the liquidity crisis hits so suddenly.
So, eventually we decided to lower down the liquidation threshold from 90 to 70%. But later, we heard more feedback from the community, it was lowered too fast. And that triggered all NFTs to be auctioned and liquidated.
We discussed again and proposed BIP 10. So, we lower down from 90% to 80%, but we spread it over months and lower down a little bit.
So, from your side, I’m curious. What do you think the biggest factor is that contributed to the crisis being averted this time? Because we were talking about the threshold, and we're talking about the floor price going up and also the auction period.
That’s removing the 95% auction limit. Yeah. Just curious on your thoughts on what is the biggest factor that contributed to crisis being averted?
Yeah, that's a good question…and from our perspective, we think we have to say we improved some factors. First, the same is usually…we realize that the ETH departed because of the concern. There were some bad effects on BendDAO, but no one knows exactly how much the bad debt is.
So, we may improve what the UI is bring firstly, and the display, how much they died, and how much auction on a BendDAO? I think that is fair to say. And everyone knows the DeFo is more transparent than the traditional Fi. But not everyone knows every factor.
I think the ESD part is a condition very much about how much bad debt was on BendDAO, so we improved that. That's the first thing. The second thing is the from the auction side.
Yeah, that is the lesson we learned from this liquidity crisis as well. Because usually, we may learn the auction process from Aave. Their auction is for ERC20, and we copy the auction process to BendDAO.
But when the liquidity crisis happened, getting auction participants isn't easy because the barrier is high. You're offered a price, and at least the higher the negligence of the diet…
So, it's very limited. The auction limited better offers, and we remove the barriers. Again, it will be easier as long as you offer a higher price than the debt itself, and the bid will be effective immediately.
And that is one thing. And we changed the auction time from 48 hours to 24 hours. That way, we improve the belief in this as well. So, after we did the race, we think we have to say we can get the…from the deposit and the liquidity from the community.
And one more thing is more interesting. Another source of crypto funding is this team in Singapore. They probably posted a proposal to invoice the BendDAO with an a current T one pence on the years as liquidity.
I think that is one more thing to help us do the due to call to the task from the committee and the liquidity provider. So, basically, yes, it's comprehensive process. And we learned a lot of lessons from the liquidity crisis. And yeah, that’s the basic situation.
Nice. Awesome. We have a question…I will try to display it. Have you changed your bad debt strategy after the crisis?
Yeah, that's a good question. Currently, there is a proposal on the discussion forum. You can take a look at it. And it's from the community members. It's in the proposal. A subDAO is proposed to process bad debt. Now, under the SubDAO, we will use the funds from... protocol income as the subDAO treasury, and together, we'll take care of the bad debt.
So, you're basically thinking about outsourcing the bad debt to subDAO
Ah, I think outsourcing is not accurate. Basically, the subDAO is used to belonging to the BendDAO as well. But it's true. We plan to infuse more liquidity providers and also investors to help us to process bad debt because currently, the protocol income is not enough to process or take the bad debt.
BenDAO is 100% owned by the community and all the protocol income will be used to build the tool, even holders.
So we change the bank bedtime strategy, including two sides. One is used to infuse more liquidity provider investor on our side. Another side is we will allocate the protocol income before we distribute all the protocol income to the $BEND holders.
But after the proposal, we don't know where we sit as we allocate 20% of the no. About 70% of the protocol income will be distributed to the $BEND and 30% of the protocol income will be tapped to the subDAO treasury for their bad debt process.
Okay, that seems like a very reasonable decision. I'm happy to hear that.
It's not easy, but luckily, we fixed it.
Yeah, there's one more question here. So, do you think bank runs is an inherent problem of a pool model compared to the p2p NFT lending model? So, I guess, like comparing NFTfi, which is like strictly peer-to-peer with this (your) model? Like, maybe you have some thoughts there?
Ah, yeah, that's is. That's a hard question. To be honest. Basically, I agree with your opinion…the bank runs as long as you run a bank, and you have no right to print money, right? The bank run will happen.
Yeah, we can teach you how to talk to the to the lenders. But I think it's hard to say we focus on improving the NFT liquidity. That is our target. And that is why we do the BendDAO the NFT market we see they need more liquidity to prolong this industry.
But anyway, BendDAO is just the one participant in the NFT industry. And the whole NFT industry, they face the liquidity problems, and BendDAO will suffer from it as well.
So, I think you can say the bank runs is the inherent problem of BendDAO. But the liquidity problem doesn’t belong to BendDAO. BendDAO aims to resolve the liquidity problem.
So, we need to work together to launch the new NFT industry and industry and we improve the liquidity. That is one I want to say.
Yeah, see, I guess the more these liquidation processes and the more experience you have…the more you can basically prevent serious stuff from happening.
So, it may be good that this happened now and not when there's way more assets under management because I think like the changes that you've now implemented make it way less likely for investors to lose confidence.
Because before, like you said yourself, you just copied the other model. And that doesn't really work for ERC721.
So, if I wasn't a depositor into this ETH pool, I would have been scared as well because that liquidation mechanism didn't seem too efficient.
But now, going forward, these adjusted parameters of only requiring 24 hours and raising the minimum bid to 80% of the floor price, that sounds way more reasonable.
So, I very much look forward to the future of BendDAO. I think these are really to good adjustments.
Yes, thank you. I agree. I agree with you. I think, if you cannot kill BendDAO, you will make BendDAO stronger. Yeah, well, yeah.
Yeah. One last question. Maybe. And then, we can end this one. So, do you think $BEND total emissions are sustainable long-term? When will those shut off? And what do you think the impact of borrow/lend interest in the protocol will be?
Yeah, I think this question is about the token incentive right to the lenders. And, yeah, usually, the token incentive to the lender and the borrower on BendDAO will last five years. And so, in practice, I think that is long enough.
And after the incetive is finished, how does it impact borrowing and lending interest? To be honest, I'm not sure, but I think you can say BendDAO will help a lot of the NFT industry and the NFT asset value discovery.
So yeah, we focus on what we are currently building. I don't know what will happen in five years.
So, I just looked at the website and actually the ETH deposit APR like the native mechanism, the interest rate just for depositing is higher in ETH terms. So, from the actual protocol revenue for the BendDAO, how do you say like subsidization like the token emissions that you're giving to these people?
So, I don't know, it seems like this will go through the classic cycle of like there will be total emissions and that attract some like, liquidity mercenaries, but over time, I think the usefulness of this product will prove itself and then if there's total emissions or not like it won't really matter.
So yeah, thanks so much for joining us. This was really insightful. Really, really cool to get to chat with you and get your insights on this on this whole saga and what you'll do going forward. Thank you again for the great presentation.
Thank you, 0error, for the great dashboards that we certainly utilized a lot in in creating this lesson. Really great pioneer work done on Dune here. And maybe I'll drop the link to the dashboard in the chat in a second and give this man all the stars like he deserves them.
And yeah, thanks so much everyone for coming. This is it from us. Bye bye. Yeah. Thank you.
The revolution will not be reported quarterly.
Celebrating Dune wizards. Dashboards, stories, alpha dropped in your inbox weekly.
This week, we discuss the whole FTX saga -- a timeline for the series of events pertaining to SBF, FTX, Alameda Research, CZ, Binance, and more. Using the FTX saga as our case study, we will go over how to track on-chain activities/flows, balances, and volumes in an open data blockchain environment.
This week, in honor of the ongoing `dex.trades` migration, we will cover the basics of AMM (automated market makers) and offer a starting point on what data analysis we can do with AMM's on-chain data.
"L2s (Arbitrum & Optimism) account for 30-40% of all transactions on Ethereum, but consume only 2% of the total gas..." That is one of the trends mentioned by Tomasz Tungas in his talk at DuneCon regarding The State of Web3 in 2022. This week we explain what Layer 2 is with on-chain data.
This week we will explain what is The Ethereum Merge with on-chain data.
This week we will investigate the liquidity crisis BendDAO had and its implication for the broader NFT market.
In the inaugural session, we investigate the implications of OFAC's decision to sanction addresses related to the tornado.cash protocol.
The revolution will not be reported quarterly.
Celebrating Dune wizards. Dashboards, stories, alpha dropped in your inbox weekly.
In this talk, Andrew walks us through his insights into the web3 data economy and its participants. He also shares some advice for Solidity devs that would enable analysts to more easily work with their data. Andrew's Twitter: https://twitter.com/andrewhong5297
Grigori from Lido walks us through Lido's operations with and on Dune. Lido builds liquid staking protocols for blockchains. For more on Lido, please visit https://lido.fi/.
In this workshop, Ben from Cow Protocol walks us through his Python Dune Client. The client is built on top of the newly launched Dune API and offers expansive features to work with the Dune API internally. The Dune client can be found here: https://github.com/cowprotocol/dune-client Ben's Twitter: https://twitter.com/bh2smith
The end of Dunecon was marked by an AMA with the two co-founders of Dune, Mats and Fredrik. The AMA was conducted by Mario Gabriele (Founder @ The Generalist). Fredrik and Mats mostly share stories about their journey and give glimpses into the future of Dune. Fredrik's Twitter: https://twitter.com/hagatec Mat's Twitter: https://twitter.com/mewwts Mario's Twitter: https://twitter.com/mariogabriele
Fred & Ivan from GitcoinDAO walk us through the gitcoin systems and show us how they utilize Dune to ensure equal access to data for every DAO member. To learn more about gitcoin, visit gitcoin.co Ivan's Twitter: https://twitter.com/ivanmolto
In this Panel, some of the most famous/notorious Dune Wizards share their web3 journeys, tips on how to get a job, and how to effectively make a name for yourself within the crypto data community. Participants: Boxer, Dune: https://twitter.com/0xBoxer Hildobby, Dragonfly: https://twitter.com/hildobby_ Kofi, 1confirmation: https://twitter.com/0xKofi Chuxin, Optimism: https://twitter.com/chuxin_h
Danning walks us through the evolution of the decentralised exchange marketplace space and the evolution of its participants over the lifespan of the industry. Danning's Twitter: https://twitter.com/sui414
Austin Adams and Xin Wan from Uniswap Labs walk us through the (un)common phenomena of just-in-time liquidity for Uniswap V3 and present their analysis of the issue at hand using Dune's datasets. This talk is largely based on a recent article released by Austin & Xin that can be found here: https://uniswap.org/blog/jit-liquidity. Austin's Twitter: https://twitter.com/AustinAdams10 Xin's Twitter: https://twitter.com/xin__wan
Richard Chen, GP @1confirmation299, walks us through some of his methodologies in approaching web3 data and shares some of his wisdom and hot takes on the current state of the markets. Richard's Twitter: https://twitter.com/rchen8
Dune's Co-Founder and CEO, Fredrik Haga takes us on a short trip down memory lane and explains the rich history both Dune and the Ethereum Ecosystem have in Berlin. Furthermore, Fredrik explains why the global shared backend that underpins all of web3 is a radical change in how businesses are run and how Dune fits into this paradigm change. Fredrik's Twitter: https://twitter.com/hagaetc
The revolution will not be reported quarterly.
Celebrating Dune wizards. Dashboards, stories, alpha dropped in your inbox weekly.
In this final (non-)weekly Wizard Danning and Hildobby interview Dune's very own Wizard Boxer. Boxer will tell the tale of the Dune Community, talk about what makes Dune's Community so special and shed some light on his view of the crypto market and data sphere.
Andrew does Data Science @ Mirror.xyz, gets people web3 data jobs with "web3 data degens" and is in general just a really active contributor to the web3 data space.
Doc manages the data side of Rabbithole.gg and has amazing insights as to how the onboarding of users in crypto is going.
Michael is considered by many to be the best Analyst working on Dune today and is doing amazing stuff day in and day out.
Tom has previously been a PM at Facebook and Instagram, worked for 0x Network and is now a general Partner @ Dragonfly. We'll try to dig Tom's brain about about the history of on-chain data querying and how Tom decides
Richard is one of the greatest Dune Wizards alive and General Partner @ 1confirmation. We talk to him about his views on the industry as is, and where we might be going.
Elias is one of Dune's most prolific users and has made a couple great dashboards that garnered Industry wide attention.
Journey into Crypto Data Science, what she works on today and we talk a whole bunch over what dex aggregators do and how you can measure their success.
How to build a quarterly report with crypto data, what goes into that and how data is leveraged across the industry to find a basis for your decisions.
NFT trends and developments, how to find a footing in the web3 industry and how kofi and 1confirmation think about thesis and frameworks for investing.
NFT marketplaces, advice on how to become a Dune Wizard and building a following using the power of Dune.
Celebrating Dune wizards. Dashboards, stories, alpha dropped in your inbox weekly.