Aave - 8. How does BTC funding affect rates?

    In this dashboard, we check 10 tokens that borrow the most in Stable Rate and Variable Rate modes, then we show the total amount of Wbtc supplied daily in all versions of Aave over time. And finally, we compare this supplied with the daily amount of borrow USDC

    db_img
    • image Source : Here

    Overview


    In this dashboard, I will answer this question from Metrics Dao :

    • Create a dashboard that shows:

      \

      1. Supply and lending rates for at least five tokens in Aave V2, and
      2. Total amount of Wrapped BTC supplied over time.

      \

      • Provide analysis on the volatility of rates.
      • Measure the correlation between USDC borrow rates and total wBTC supplied.

    Introduction


    One of a number of emerging DeFi cryptocurrencies, Aave is a decentralized lending system that allows users to lend, borrow and earn interest on crypto assets, all without middlemen. 

    Running on the Ethereum blockchain, Aave instead is a system of smart contracts that enables these assets to be managed by a distributed network of computers running its software. 

    This means Aave users do not need to trust a particular institution or person to manage their funds. They need only trust that its code will execute as written.

    At its core, the Aave software enables the creation of lending pools that enable users to lend or borrow 17 different cryptocurrencies including ETHBAT and MANA

    Like other decentralized lending systems on Ethereum, Aave borrowers must post collateral before they can borrow. Further, they can only borrow up to the value of the collateral they post. 

    Borrowers receive funds in the form of a special token known as an aToken, which is pegged to the value of another asset. This token is then encoded so lenders receive interest on deposits

    A borrower may post collateral in DAI, for example, and borrow in ETH. This allows a borrower to gain exposure to different cryptocurrencies without owning them outright. 

    Aave can also introduce additional features, such as instant loans, and other forms of issuing debt and credit that take advantage of the unique design properties of blockchains. \n  

    Who created Aave?

    Aave is a for-profit company founded in 2017 by Stani Kulechov and based in Switzerland. Kulechov was trained in law in Helsinki and started Aave while still a student. 

    The firm, originally named ETHLend, raised $16.2 million in an initial coin offering (ICO) in 2017, during which time it sold 1 billion units of its AAVE cryptocurrency - originally named LEND. 

    The LEND cryptocurrency migrated to AAVE at a rate of 100 LEND tokens to 1 AAVE, dropping the total supply of its cryptocurrency to 18 million AAVE.   

    ETHLend was different from Aave in that, instead of pooling funds, it tried to match lenders and borrowers in a peer-to-peer fashion. In 2018 ETHLend was renamed Aave, which means “ghost” in Finnish. ETHLend became a subsidiary of Aave. 

    Other products and services announced at the time included a trading desk to handle large trades, a game studio focused on blockchain games and a system to handle payments.  \n  

    How does Aave work?


    Aave is perhaps best described as a system of lending pools. 

    Participants deposit funds they wish to lend, which are then collected into a liquidity pool. Borrowers may then draw from those pools when they take out a loan. These tokens can be traded or transferred as a lender wishes. 

    To facilitate this activity, Aave issues two types of tokens: aTokens, issued to lenders so they can collect interest on deposits, and AAVE tokens, which are the native token of Aave. 

    The AAVE cryptocurrency offers holders several advantages. For instance, AAVE borrowers don’t get charged a fee if they take out loans denominated in the token. Also, borrowers who use AAVE as collateral get a discount on fees. 

    AAVE owners can further look at loans before they are released to the general public if they pay a fee in AAVE. Borrowers who post AAVE as collateral can also borrow slightly more. 

    The data firm Nomics has a more extensive list of AAVE's features. 

    Flash Loans

    Aave allows certain loans, called “flash loans,” to be instantly issued and settled. These loans require no upfront collateral and happen almost instantly. 

    Flash loans take advantage of a feature of all blockchains, which is that transactions are only finalized when a new bundle of transactions, known as a block, is accepted by the network.

    Adding each new block takes time. On Bitcoin, that interval is roughly 10 minutes. On Ethereum, it’s 13 seconds. An Aave flash loan therefore takes place in that 13-second period. 

    The flash loan works like this: A borrower can request funds from Aave, but they must pay back those funds, and a 0.09% fee, within the same block. If the borrower doesn’t do this, the entire transaction is cancelled, so that no funds were ever borrowed. 

    As a result, Aave doesn’t take a risk and neither does the borrower. 

    A borrower may wish to use a flash loan to take advantage of trading opportunities or maximize profits from other systems built on Ethereum. It’s possible to swap different cryptocurrencies in an automatic way using flash loans to generate trading profits.  

    Note: Flash loans have been combined to execute attacks on lending systems built on Ethereum, sometimes successfully stealing hundreds of thousands of dollars worth of deposits. One of a number of emerging DeFi cryptocurrencies, Aave is a decentralized lending system that allows users to lend, borrow and earn interest on crypto assets, all without middlemen. 

    Running on the Ethereum blockchain, Aave instead is a system of smart contracts that enables these assets to be managed by a distributed network of computers running its software. 

    This means Aave users do not need to trust a particular institution or person to manage their funds. They need only trust that its code will execute as written.

    At its core, the Aave software enables the creation of lending pools that enable users to lend or borrow 17 different cryptocurrencies including ETHBAT and MANA

    Like other decentralized lending systems on Ethereum, Aave borrowers must post collateral before they can borrow. Further, they can only borrow up to the value of the collateral they post. 

    Borrowers receive funds in the form of a special token known as an aToken, which is pegged to the value of another asset. This token is then encoded so lenders receive interest on deposits

    A borrower may post collateral in DAI, for example, and borrow in ETH. This allows a borrower to gain exposure to different cryptocurrencies without owning them outright. 

    Aave can also introduce additional features, such as instant loans, and other forms of issuing debt and credit that take advantage of the unique design properties of blockchains

    Who created Aave?

    Aave is a for-profit company founded in 2017 by Stani Kulechov and based in Switzerland. Kulechov was trained in law in Helsinki and started Aave while still a student. 

    The firm, originally named ETHLend, raised $16.2 million in an initial coin offering (ICO) in 2017, during which time it sold 1 billion units of its AAVE cryptocurrency - originally named LEND. 

    The LEND cryptocurrency migrated to AAVE at a rate of 100 LEND tokens to 1 AAVE, dropping the total supply of its cryptocurrency to 18 million AAVE.   

    ETHLend was different from Aave in that, instead of pooling funds, it tried to match lenders and borrowers in a peer-to-peer fashion. In 2018 ETHLend was renamed Aave, which means “ghost” in Finnish. ETHLend became a subsidiary of Aave. 

    Other products and services announced at the time included a trading desk to handle large trades, a game studio focused on blockchain games and a system to handle payments.  \n  

    How does Aave work?


    Aave is perhaps best described as a system of lending pools. 

    Participants deposit funds they wish to lend, which are then collected into a liquidity pool. Borrowers may then draw from those pools when they take out a loan. These tokens can be traded or transferred as a lender wishes. 

    To facilitate this activity, Aave issues two types of tokens: aTokens, issued to lenders so they can collect interest on deposits, and AAVE tokens, which are the native token of Aave. 

    The AAVE cryptocurrency offers holders several advantages. For instance, AAVE borrowers don’t get charged a fee if they take out loans denominated in the token. Also, borrowers who use AAVE as collateral get a discount on fees. 

    AAVE owners can further look at loans before they are released to the general public if they pay a fee in AAVE. Borrowers who post AAVE as collateral can also borrow slightly more. 

    The data firm Nomics has a more extensive list of AAVE's features. 

    Flash Loans

    Aave allows certain loans, called “flash loans,” to be instantly issued and settled. These loans require no upfront collateral and happen almost instantly. 

    Flash loans take advantage of a feature of all blockchains, which is that transactions are only finalized when a new bundle of transactions, known as a block, is accepted by the network.

    Adding each new block takes time. On Bitcoin, that interval is roughly 10 minutes. On Ethereum, it’s 13 seconds. An Aave flash loan therefore takes place in that 13-second period. 

    The flash loan works like this: A borrower can request funds from Aave, but they must pay back those funds, and a 0.09% fee, within the same block. If the borrower doesn’t do this, the entire transaction is cancelled, so that no funds were ever borrowed. 

    As a result, Aave doesn’t take a risk and neither does the borrower. 

    A borrower may wish to use a flash loan to take advantage of trading opportunities or maximize profits from other systems built on Ethereum. It’s possible to swap different cryptocurrencies in an automatic way using flash loans to generate trading profits.  

    Note: Flash loans have been combined to execute attacks on lending systems built on Ethereum, sometimes successfully stealing hundreds of thousands of dollars worth of deposits. 

    Method


    To solve this question

    , I first separated the borrowings in aave into two categories, Stable Rate and Variable Rate, and selected 10 tokens from each of them that had the most borrowings. For this, I used the flipside_prod_db.aave.borrows table and placed each one in a CTE. I wrote 1 separate query for each category. Then I put the daily suppleid value of each of these 10 tokens on the chart. I also showed the suppleid value of the WBTC token in different avve versions over time. For this I used the flipside_prod_db.aave.deposits table and limited the symbol to WBTC. And finally, to compare USDC token borrows and WBTC token suppleid, I prepared some charts to be understandable. For this, I used the flipside_prod_db.aave.borrows and flipside_prod_db.aave.deposits tables and limited the symbol to USDC and WBTC.

    Chart & Analysis

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    • The chart above shows the 10 tokens that were reviewed in general
    • The highest supply in ==2021== was on December 13 with a volume of 4.34 billion dollars
    • The highest supply in ==2022== was on May 12 with a volume of 1.29 billion dollars
    • The highest Borrow in ==2021== was on April 26 with a volume of 1.3 billion dollars
    • The highest Borrow in ==2022== was on May 12 with a volume of 470 million dollars
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    • The graphs in this section show the 10 tokens that had the most supply in avve v2.
    • The tokens of this category are placed in the Variable Rate category
    • Observations show that a larger volume of these 10 tokens has been supplied in 2021 than in 2022. Two jumps can be seen on June 18, 2021 and December 13, 2021. On these two days, Weth tokens in June and DAI tokens in December have been supplied more than other tokens.
    • Tokens that are not stablecoins such as (yfi, crv, weth, wbtc) have been more compressed in the chart in 2021, and on June 18, 2021, the largest volume of supply can be seen over time, of which nearly 3.84 billion dollars is related to weth.
    • Among these tokens, the weth token has a larger volume than other tokens that are not stablecoins.
    • But tokens that are stablecoins such as (FEI , TUSD ,sUSD, DAI, USDC, USDT) have the largest volumes at the end of 2021, for example, from December 8, 2021 to December 30, the DAI token has been supplied for more than 2B dollars in several consecutive days, the largest amount in It is December 13, 2021, which is $4B related to DAI.
    • On February 21, 2022, the largest volume of supply was in 2022, which is a large volume related to the DAI token, except that In 2022, the largest volume of supply in these tokens was in March, at the same time as the fall of Terra.
    • It seems that among these stablecoins, the USDC token is more popular and can be seen on most days. And DAI stablecoin had the largest volume only in December 2021
    • Among all supplied tokens, tokens like DAI, USDC, USDT include nearly 49.23% of the total supplied volume
    • Among the tokens that are not stablecoins, such as weth, wbtc, they include 48.77% of the total supplied volume.
    • The statistics are very close to the Stable Rate category
    • There are no Frax, aWETH, Link tokens in this category and instead there are FEI, TUSD and yfi tokens.
    • The graphs in this section show the 10 tokens that had the most borrowings in avve v2.
    • The tokens of this category are placed in the Variable Rate category
    • Observations show that in 2021, a larger volume of these 10 tokens has been borrowed than in 2022

    On April 26, 2021 and July 16, 2021, two jumps can be seen, and on these two days, the USDC token has been borrowed more than other tokens. Like the Stable Rate category

    • Tokens that are not stablecoins, such as (yfi, crv, weth, wbtc) have more compression in the chart in 2022, and on March 15, 2022, the highest volume of borrow over time can be seen, of which nearly 320 million dollars are related to weth is Among these tokens, the weth token has a larger volume than other tokens that are not stablecoins.
    • The amount of borrowing in these tokens is lower than Stablecoins (FEI , TUSD ,sUSD, DAI, USDC, USDT) and in most cases it is below 330 million dollars.
    • But tokens that are stablecoins such as (FEI , TUSD ,sUSD, DAI, USDC, USDT) have the largest volume in 2021, for example, on July 16, 2021, more than 1.2 billion dollars of tokens were borrowed, of which 1.07 billion dollars were related to It is USDC.
    • In 2022, the highest volumes of borrowing in these tokens were in March at the same time as Terra fell.
    • It seems that among these stablecoins, the USDC token is more popular and can be seen on most days.
    • Among all borrowed tokens, tokens like DAI, USDC, USDT include nearly 78.6% of the total borrowed volume
    • Among the tokens that are not stablecoins, such as weth, wbtc, they include 16.28% of the total borrowed volume.
    • The statistics are very close to the Stable Rate category
    • There are no Frax, aWETH, Link tokens in this category and instead there are FEI, TUSD and yfi tokens.
    • The graphs in this section show the 10 tokens that had the most supply in avve v2.
    • The tokens of this category are placed in the Stable Rate category
    • Observations show that a larger volume of these 10 tokens has been supplied in 2021 than in 2022. Two jumps can be seen on June 18, 2021 and December 13, 2021. On these two days, Weth tokens in June and DAI tokens in December have been supplied more than other tokens.
    • Tokens that are not stablecoins such as (aweth, crv, weth, wbtc, link) have been more compressed in the chart in 2021, and on June 18, 2021, the largest volume of supply can be seen over time, of which nearly 3.84 billion dollars is related to weth.
    • Among these tokens, the weth token has a larger volume than other tokens that are not stablecoins. But tokens that are stablecoins such as (sUSD, DAI, USDC, USDT,Frax) have the largest volumes at the end of 2021, for example, from December 8, 2021 to December 30, the DAI token has been supplied for more than 2B dollars in several consecutive days, the largest amount in It is December 13, 2021, which is $4B related to DAI.
    • In 2022, the largest volume of supply in these tokens was in March, at the same time as the fall of Terra.
    • It seems that among these stablecoins, the USDC token is more popular and can be seen on most days. And DAI stablecoin had the largest volume only in December 2021
    • Among all supplied tokens, tokens like DAI, USDC, USDT include nearly 48.5% of the total supplied volume
    • Among the tokens that are not stablecoins, such as weth, wbtc, they include 48.07% of the total supplied volume.

    \

    • ==The graphs in this section show the 10 tokens that had the most borrowings in avve v2.==
    • ==The tokens of this category are placed in the Stable Rate category==
    • Observations show that in 2021, a larger volume of these 10 tokens has been borrowed than in 2022
    • On April 26, 2021 and July 16, 2021, two jumps can be seen, and on these two days, the USDC token has been borrowed more than other tokens.
    • Tokens that are not stablecoins, such as (aweth, frax, crv, weth, wbtc, link) have more compression in the chart in 2022, and on March 15, 2022, the highest volume of borrow over time can be seen, of which nearly 320 million dollars are related to weth is Among these tokens, the weth token has a larger volume than other tokens that are not stablecoins.
    • The amount of borrowing in these tokens is lower than Stablecoins (sUSD, DAI, USDC, USDT) and in most cases it is below 330 million dollars.
    • But tokens that are stablecoins such as (sUSD, DAI, USDC, USDT) have the largest volume in 2021, for example, on July 16, 2021, more than 1.2 billion dollars of tokens were borrowed, of which 1.07 billion dollars were related to It is USDC.
    • In 2022, the highest volumes of borrowing in these tokens were in March at the same time as Terra fell.
    • It seems that among these stablecoins, the USDC token is more popular and can be seen on most days.
    • Among all borrowed tokens, tokens like DAI, USDC, USDT include nearly 79.7% of the total borrowed volume
    • Among the tokens that are not stablecoins, such as weth, wbtc, they include 16.53% of the total borrowed volume.

    \

    • The chart above shows the 10 tokens that were reviewed in general
    • The highest supply in ==2021== was on December 13 with a volume of 4.34 billion dollars
    • The highest supply in ==2022== was on May 12 with a volume of 1.28 billion dollars
    • The highest Borrow in ==2021== was on April 26 with a volume of 1.3 billion dollars
    • The highest Borrow in ==2022== was on May 12 with a volume of 456 million dollars
    Loading...
    Loading...
    • The charts above show the daily supply volume of WBTC token based on Aave version
    • It seems that the supply in Aave v1 had a trend from November 17, 2020 to April 10, 2021, and on December 30, 2020, it reached the maximum supply of WBTC token in Aave v1, then from April 10, 2021, the supply in Aave v1 decreased and was replaced by Aave v2.
    • On November 2, 2021, the highest supply of WBTC token was in Aave v2
    • There was also supply in Aave amm on some days, but it was a small amount
    • The highest supply wBTC in Aave v1 reached its highest volume of $168.81 million on December 30 ,2020
    • The highest supply wBTC in Aave v2 reached its highest volume of $824.37 million on November 2 ,2021
    • The highest supply wBTC in Aave AMM reached its highest volume of $4.14 million on may 2 ,2021
    • Out of the total wBTC token supply, 91.9% was in Aave v2
    • Out of the total wBTC token supply, 7.91% was in Aave v1
    • Out of the total wBTC token supply, 0.143% was in Aave AMM
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    • The graph opposite shows the daily volume of USDC borrows versus the daily volume of WBTC Supply over time.

    • Transactions are limited to Variable Rate transactions

    • It seems that in the recent downfalls since March 24, 2022, Variable rate transactions in Aave It has completely stopped

    • It seems that from March 28, 2021, to March 24, 2022, the USDC borrow chart was related to WBTC Supply, and the USDC borrow chart also moved with the jumps of WBTC Supply.

    • On October 20 and November 2, 2021, WBTC Supply reached more than $600 million And on July 18, 2021, USDC borrowing exceeded the ceiling of WBTC Supply and reached 1 billion dollars

    • In the comparison of USDC borrow and WBTC price, no special relationship can be seen

    • Comparing WBTC Supply and WBTC price, it can be said that on the days when WBTC price was high or rising, WBTC Supply also jumps that can be seen.

    • The graph opposite shows the daily volume of USDC borrow versus the daily volume of WBTC Supply over time.

    • Transactions are limited to Stable Rate transactions

    • It seems that in the recent downfalls and the fall of Terra since March 24, 2022, stable rate transactions in Aave have become much more than before.

    • On October 20 and November 2, 2021, WBTC Supply has reached more than $600 million

    • In the comparison of USDC borrow and WBTC price, no special relationship can be seen

    • Comparing WBTC Supply and WBTC price, it can be said that on the days when WBTC price was high or rising, WBTC Supply also had jumps that can be seen.

    Conclusion


    1. It seems that the 5 tokens that had the most borrowings in Avve v2 are: USDC > USDT > DAI > WETH > WBTC

      \

    2. And the USDC token has had the most borrowings over time

      \

    3. Regarding supply, the 5 tokens that had the most supply in Avve v2 are: WETH > DAI > USDC > USDT > WBTC

      \

    4. And WETH token has had the most supply over time

      \

    5. The total amount of wBTC token supply in all versions of Aave is approximately equal to 15.32 billion dollars, of which 14.09 billion dollars have been supplied in Aave v2.

      \

    6. From March 24, 2022, USDC borrow in Aave is no longer Variable Rate, and from that date only Stable Rate is observed.

      \

    7. It seems that from March 28, 2021, to March 24, 2022, the USDC borrow chart was related to WBTC Supply, and the USDC borrow chart also moved with the jumps of WBTC Supply.

    Loading...
    Loading...
    Loading...

    Appendix


    The solution of this question and the queries are completely used from the filipside database The construction of the dashboard was also used from the site app.flipsidecrypto.com/velocity, which belongs to flipside

    Contact data


    -> the writer : sajjadsmoke -> discord : sajjadsmoke#5567


    Thanks for reading !