Defi : God Of Risks

    A review of price of the CRV in Nov.22 and The reasons of it, and Aave protocol.

    About Curve finance

    Curve finance is one the biggest protocols on defi. Curve is an important part of defi because it has been built to provide better prices with lower slippage and lower fee for trading. Curve is also uses AMM to provide prices, but this AMM doesn’t use constant formula (some dexs like uniswap use this formula), Curve uses another formula.

    Quote from Zipmex

    > Curve Finance is a decentralized exchange for trading cryptocurrency that focuses on efficient stablecoin trading. Curve’s focus on stablecoins allows investors to avoid more volatile crypto assets. > > It is an automated market maker (AMM) that maintains low fees and slippage through the use of liquidity pools.

    db_img
    db_img

    FTX bankruptcy : impression on Curve finance

    Everything seemed to be fine, until CZ tweet this out in 6 Nov.

    FTX bankruptcy timeline (by abcnews)

    > Nov. 6 – In response to the article, Changpeng Zhao, the CEO of rival crypto exchange Binance, often referred to as "CZ," said he would sell all of the company's holdings in FTT, which amount to $580 million worth of the token.

    If you look at the right chart (by defilama) you can see that users -maybe FTX and alameda- started to pull out their money from Curve pools.

    > Nov. 8 – FTX reached a deal to sell itself to Binance, the crypto exchange whose executive had helped trigger the selloff.

    > "This is a user-centric development that benefits the entire industry," Bankman-Fried said. "CZ has done, and will continue to do, an incredible job of building out the global crypto ecosystem, and creating a freer economic world."

    Right chart shows us that users pulled out a ton of money - about 600M$, 10% of Curve TVL in Nov.5!!- from Curve pools in only one day - Nov.8 - .

    > Nov. 9 - Binance posted a tweet : As a result of corporate due diligence, as well as the latest news reports regarding mishandled customer funds and alleged US agency investigations, we have decided that we will not pursue the potential acquisition of http://FTX.com.

    > Nov. 11 – FTX filed for Chapter 11 bankruptcy protections as it assesses the value of its remaining assets, a company announcement said.

    And, Yep! people began to pull out their money from Curve pools, about 200M$ in Nov.9, more than 300M$ in Nov.10 and 500M$ in Nov.11 .

    db_img
    db_img

    Who makes profit from price drop of CRV?

    In twitter, i read that some on-chain analyzers said that some users are borrowing CRV from Aave. then i said with my self, “ if CRV price drops, users that borrowed CRV before, can repay it with less money!”. For example, in normal situation MR.X should buy 1 million$ CRV to repay his/her loan. but when CRV drops 25%, he/she can do it with 0.75M$!. So, lets see some on-chain activity of CRV borrowers on Aave protocol.

    As you can see…

    It’s really clear to see an increase of repayed CRV to Aave in Nov.22 . In Nov.20 users repayed 11M CRV to Aave, in Nov.21 users repayed 1.25M CRV to Aave, but in Nov.22 users repayed 80M CRV to Aave which is really big amount!

    Also count of transactions (count of repay) increased in Nov.22 . In Nov.21, repayed transactions on CRV in Aave was 16, but it increased to 246 transactions in Nov.22!


    Repayed CRV to Aave in Nov.22

    This chart shows repayed CRV to Aave and CRV hourly price in Nov.22

    By looking at the chart, we can see CRV price felt from 0.53$ to 0.41$ and meanwhile, repayed CRV to Aave has been increased from 210K to 6.85M.

    It’s interesting to see users repayed their loans even when CRV price went higher than the day before. I can’t say “im sure they bought token in for example 0.63$ and then they Immediately repayed their loans”. They could bought it in lower price (in Dexs or Cexs) and repay their loan later.

    Loading...
    Loading...

    Why CRV price started to drop?

    We reached to the main question. Why CRV price started to drop? Do hackers hacked the protocol or some parts of it? do whales started to sell their tokens?

    I read some threads and quote tweets on twitter, mostly from @kamikaz_ETH and i found out that a/some whales did this to CRV price by borrowing and some more thing which i’m going to explain to you!

    In next charts you can see borrowed amount of CRV by each address(in Nov.22) and total borrowed amount of CRV from Aave in Nov.22 .

    As you can see, users borrowed 176M CRV from Aave in Nov.22 which is a very big amount. 0x57… borrowed 75M CRV. 0xef… borrowed 13.3M CRV from Aave and 0xee… borrowed 13M CRV


    What did borrowers do with their borrowed CRVs?

    In this chart you can see destination address that CRV borrowers sent CRVs to them in hourly time frame of Nov.22 . Liquidations are not included.

    In the below chart, you can see CRV hourly price in Nov.22 . Notice that values in all charts -except CRV price- chart follow a same rule : values between for example 3 and 4 am attributed to 3 am.

    Most activity started from 5 am; when 0x57… borrowed 20M CRV and tranferred 10M CRV to OKex wallet. 0x25… borrowed 3M CRV and transferred them to binance wallet. In 7am, 0x57… transferred another 10M CRV to Okex (probably to sell) then 0xb7 borrowed 10m CRV at 8 am (and transferred it to OKex) and 0x57 borrowed CRV again, but with higher volume -30M CRV- and he/she transferred it to OKex again (to sell?). In next hours, users mostly borrowed CRV and deposited to binance wallet or repayed their CRV debt to Aave.

    The main point is : 0x57… borrowed 75M CRV (third chart) from Aave, transferred 60M of it to OKex . Why? to sell it! it’s clear that 0x57 and probably its friends shorted CRV, then 0x57 borrowed a huge amount of CRV and then he/she sold it on Okex to decrease the price. 0x57 decreased the price in 4 steps. When CRV price decreased as much as possible, they closed their short positions and started to long CRV and then they bought it to help price increase. Price camed up and upper and they was in profit.

    But what about debts on Aave?

    Hmmm… When CRV price went up, their positions was in liquidation danger but they didn’t close it and let it to be liquidate. Why? because when 60M CRV started to be liquidate, CRV price goes up! So it was another step to help CRV price goes up.

    Loading...
    Loading...
    Loading...
    Loading...
    db_img
    db_img

    Read the tread here :

    Liquidation price of Curve founder’s position.

    By Defilama :

    Loading...
    Loading...
    db_img

    This thread helped me a lot to know more whats’s going on with CRV. Read more!

    db_img

    Did they want to hurt CRV?

    When i was writing this article, i said “Did they want to hurt Curve finance?”

    At first, i felt like it’s true, but when i saw liquidation model and how Aave liquidate 84M CRV, i got curios to know more about possible loss and debts of Aave. If you don’t get it or you don’t know how is it possible to lose money in lending protocols, stay with me!

    Tip : liquidation process on Aave is when health rate of loan goes below 1, then protocol let people to liquid the collateral. Protocol let people to buy collateral with discount to incentivize them to participate in collateral liquidating.


    How Aave liquidate 84M CRV?

    In a liquidation, up to 50% of a borrower's debt is repaid and that value + liquidation fee is taken from the collateral available, so after a liquidation that amount liquidated from your debt is repaid.

    Already, i quoted from Aave :

    > Bob deposits 10 ETH and borrows 5 ETH worth of DAI. If Bob’s Health Factor drops below 1 his loan will be eligible for liquidation. A liquidator can repay up to 50% of a single borrowed amount = 2.5 ETH ==worth== of DAI. > > \

    Do you know the meaning of the part that i marked ? It means if DAI price is 1$(at time of the liquidation), you can liquid up to 2.5 ETH with 2500 DAI, but! if DAI price suddenly increase from 1$ to 1.25$, you can liquid up to 2.5 ETH with 2000 DAI! In this case, even though 2,500 DAI are borrowed, only 2,000 DAI are returned to the pool, which causes the pool balance to decrease and if all users try to withdraw their tokens from the pool (in this case, DAI), they will face with error and some of them can’t withdraw same amount that they deposited before. look at the following chart (figures are not exact):point_right:

    In this example, the price increase reduces the repaid amount to the pool, and in the end, an amount less than the collateral is paid to the pool, which makes the pool indebted to the users (2M CRV in this example).


    liquidaition process of 0x57…

    Blue bars are liquidated CRV per minute and red line is count of liquidation per minute.

    In the following charts you can see liquidation process of 0x57… positions. This chart shows you liquidated CRV and count of liquidation in every minute.

    The main position started to get liquidate on 17:22 and it’s ended on 18:09. So it takes about 47 minutes to liquidate this position. Also it’s important to note that duo to high slippage, liquidators liquidate low amounts, if you look at below numbers, you can see that liquidators liquidate average 233K CRV in every transaction, they liquidate minimum 1.9 CRV:) and they also liquidate maximum 5M CRV.

    db_img
    db_img
    Loading...
    db_img
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    The loss amount

    In total, 0x57 borrowed 92M CRV from Aave protocol, but after his/her collateral got liquid completely, only 89.5M CRV returned to CRV pool. It simply means that Aave lost 2.5M CRV that people deposited in CRV pool. If we consider 0.65$ as CRV price, Aave lost 1.625$ from its pool.

    This amount is same as the amount that Decrypt said in this report

    > That smaller insolvency amounts to $1.6 million in bad debt on Aave’s end, according to blockchain data analyzed by Blockanaliticaan amount that could have been far larger had Eisenberg’s exploit succeeded.

    In Nov.22 the day that 0x57 attacked Aave, Aave decided to freeze some assets including CRV. This decision executed with 100% of the votes on Nov.27

    > Summary > > A proposal to make parameter changes on Aave V2 ETH. Given that the market situation of these assets is currently volatile, out of an abundance of caution, we recommend temporarily freezing the following markets: > > YFI CRV ZRX MANA 1INCH BAT sUSD ENJ GUSD AMPL RAI USDP LUSD xSUSHI DPI renFIL MKR

    Source : Aave Dao


    How aave will retrieve loss?

    Fortunately, Aave want to retrieve this loss. Aave has a solution for these situations, they call it “safety module”.

    looks like they want to retrieve 1.6M loss of the attack with this method.

    According to Decrypt

    > Aave's Safety Module, for example, would use a portion of staked CRV to fill the gap (this possibility is why stakers earn money in the first place—they’re being paid a premium to risk their funds getting used as a backstop). The protocol could also turn to its DAO treasury to make the platform whole.

    db_img
    db_img
    db_img

    Conclusion

    db_img

    Photo source :

    In this article, i showed you how 0x57… tried to make money from hurting Aave. He/She was somehow successful in Hurting Aave but i’m not sure that did he/she make money or not because most of his/her activity was off-chain(in Okex), but we know he/she borrowed 75m CRV just in Nov.22 (92M CRV in total). His/Her positions got liquid but only 89.5M CRV -from 92M borrowed CRV- repayed to CRV pool, which means Aave lost 2.5M CRV -1.625M$-. Aave freezed some tokens that could hurt protocol -including CRV- and they want to retrieve the loss with Safety module. We also saw that Curve lost 2.3B of its TVL in FTX bankruptcy. No one hacked Curve finance or Aave, it was just a game wasn’t it?

    About right side meme : Crypto is a dangerous world, where everyone can hurt you in only few days. lot’s of protocol got hacked, scammed and… in past months and lots of users lost a ton of money (one example is terra). So it’s necessary to step with knowledge and please don’t waste your money in protocols for just 2% APY. This accident happened to one of the bluechips -Aave- which is very famous. i think Aave can handle it easily, but it’s not so easy for low TVL and unpopular projects.

    Stay Safe!

    Written by :arrow_down: :arrow_down: :arrow_down: :arrow_down: :arrow_down:

    Pink

    db_img

    About Aave

    Aave is an decentralize protocol that users can use to borrow token or deposit in Aave pool. Aave uses smart contracts which means that there is no third party in borrowing/depositing. You only trust to contracts. Almost everyone in Ethereum ecosystem know Aave. Previously, Aave was “ETHLEND“, but founders rebranded the protocol and named it “Aave“. they also changed token name from “LEND“ to “Aave“ .

    Quote from Bitstamp

    > Aave was founded by Stani Kulechov who, during his time studying law at the University of Helsinki, became interested in Ethereum and the ways that it could disrupt traditional finance. In 2017, he released the decentralized application (dapp) ETHLend, raising $16.2 million in an initial coin offering (ICO) for its LEND token. ETHLend allowed users to post loan requests and offers, acting more as a community tool than the automated service that exists today.

    Everything started from…

    Crypto market is not in the good situation. lot’s of protocols got hacked, Luna almost hit 0$ and recently, FTX announced it’s bankruptcy and lot’s of users -probably temporally- lost their money in FTX exchange and can’t withdraw, bitcoin saw 16K and sol hit 13$.

    Everything started from this point -Nov.22-, where CRV suddenly dropped from 0.54 to 0.406 -==25%== drop- in only 6 hours.

    This price falling made some questions like :

    Why CRV price started to drop?

    Do hackers hacked the protocol?

    Who makes profit from this price drop?

    Are whales dumping CRV and leaving the protocol?

    Are people are pulling out their money from Curve pools?

    is this price falling related to FTX bankruptcy?


    What’s going on dude?

    I was searching on twitter, to find more details about this price drop. Suddenly i saw a tweet (screenshot in right side) and i found out that one of the founders of Curve finance supplied CRV as collateral on the Aave protocol. Then i said, “Is there a person/some persons that may want to liquid Curve founder’s position“?

    But what will happens if Curve founder’s position got liquidate?

    Let’s see more detail about the position. As you see in the middle chart (from defilama), Curve founder deposited 48.2M CRV on Aave and used it as collateral to take loan. This position start to get liquid when CRV hit 0.259$ and then Aave sell 48.2M CRV which can really damage token price and if CRV hit lower prices than 0.259, i think lot’s of users will start to pull out their money/sell their CRVs and who knows! maybe Curve face with some dangerous problems

    At first, let’s answer the last question

    This article is about CRV and Aave. All accidents happened on Ethereum blockchain, so all details have been queried from Ethereum tables. I mostly used ethereum.aave.ez_repayments to query repayments, ethereum.aave.ez_borrows to query borrows, andethereum.aave.ez_liquidations to query liquidations. I filtered all queries based on CRV token (‘0xd533a949740bb3306d119cc777fa900ba034cd52’) to only query details about CRV. Also, all queries represent details on Nov.22, expect the last two charts (“borrowed CRV by 0x57” and “liquidated CRV from 0x57”). For price of CRV i used ethereum.core.fact_hourly_prices and for CRV transfers, I used ethereum.core.fact_token_transfers .

    Method