Algorand - Algofi Recursive Borrowing

    Let’s look at AlgoFi Recursive borrowing! This is where you supply the same asset you borrow

    Description of work

    • In this Algorand Bounties we looking at AlgoFi Recursive borrowing
      • 1- How many users are supplying and borrowing the same asset on AlgoFi?
      • 2- What is the average amount of each asset being supplied for recursive borrowers?
      • 3- How much rewards did they receive in 2022?
      • 4- What is the percent of these users of total suppliers & borrowers ?

    1 ---> supplying and borrowing on AlgoFi?

    In this section we want to show you:

    • Supplying and Borrowing for each day by each Market Lending Protocol
    • Show how many users are supplying and borrowing the same asset on AlgoFi
    • NOTE: We find the list of supplies in the [application_call_transaction] table using try_base64_decode_string (tx_message: txn: note :: string) = 'Market: mt' and find the list of borrowings in the [application_call_transaction] table using try_base64_decode_string (tx_message: txn: note :: string) = 'Market: b'
    Loading...
    Loading...

    In the chart above, it can be seen that:

    • most of the unique user in the lending protocol is related to supplying
    • At intervals ,[17th - 12th Dec 2021], [17th Dec 2021 - 2th Jan 2022], [22th Feb 2022 - 4th Mar 2022] and [11th - 13th May 2022] we see the highest number of unique user for Borrowing and Supplying
    Loading...

    In the chart above you can see that:

    • Users are more inclined to Borrowing or Supplying ALGO and then USDC
    • goETH has the lowest acceptance rate for Borrowing or Supplying among users
    Loading...

    In the charts above you can see that:

    • Users are more inclined to Supplying ALGO and then USDC
    • USDC Borrowing and USDC Supplying are almost the same, indicating that most users do USDC Borrowing.
    • Users are more inclined to Borrowing STBL and then USDC
    Loading...

    2 ---> How many users are supplying and borrowing the same asset on AlgoFi?

    In this section, we get the Borrowing and Supplying list, then join together based on app_id, Supplying.Sender and Borrowing.Asset_Reciver, and get the whole list of users are supplying and borrowing the same asset.

    Loading...

    We see that 2656 unique users are borrowing the same assets they have supplied

    3 ---> Average amount of each asset being supplied for recursive borrowers

    In this section we calculate the average supplied amount for each asset in the case of recursive borrowers

    Loading...

    According to the chart above, it can be seen that:

    • The highest average amount supplied in the recursive borrowers mode is for the USDC, followed by the STBL
    • This means that users are more likely to borrow the same asset when they supplied a amount of USDC or STBL
    • Interestingly, we have the highest amount supplied for ALGO, but no user has supplied ALGO for recursive borrowers

    Lending Protocol List:

    • Creator Account
      • Address:3EPGHSNBBN5M2LD6V7A63EHZQQLATVQHDBYJQIZ6BLCBTIXA5XR7ZOZEB4
    • Manager Contract
      • Address:2SGUKZCOBEVGN3HPKSXPS6DTCXZ7LSP6G3BQF6KVUIUREBBY2QTGSON7WQ
      • App ID:465818260
    • ALGO Market Contract
      • Market Address:TY5N6G67JWHSMWFFFZ252FXWKLRO5UZLBEJ4LGV7TPR5PVSKPLDWH3YRXU
      • Market App ID:465814065
      • Bank Asset ID:465818547
    • USDC Market Contract
      • Market Address:ABQHZLNGGPWWZVA5SOQO3HBEECVJSE3OHYLKACOTC7TC4BS52ZHREPF7QY
      • Market App ID:465814103
      • Bank Asset ID:465818553
      • Underlying Asset ID:31566704
    • goBTC Market Contract
      • Market Address:W5UCMHDSTGKWBOV6YVLDVPJGPE4L4ISTU6TGXC7WRF63Y7GOVFOBUNJB5Q
      • Market App ID:465814149
      • Bank Asset ID:465818554
      • Underlying Asset ID:386192725
    • goETH Market Contract
      • Market Address:KATD43XBJJIDXB3U5UCPIFUDU3CZ3YQNVWA5PDDMZVGKSR4E3QWPJX67CY
      • Market App ID:465814222
      • Bank Asset ID:465818555
      • Underlying Asset ID:386195940
    • STBL Market Contract
      • Market Address:OPY7XNB5LVMECF3PHJGQV2U33LZPM5FBUXA3JJPHANAG5B7GEYUPZJVYRE
      • Market App ID:465814278
      • Bank Asset ID:465818563
      • Underlying Asset ID:465865291

    4 ---> Amount of rewards did they receive in 2022 for all supplying

    In this section, all Amount of rewards for Lending Protocol daily from 2022 will be counted

    • To do this, in the application_call_transaction table for try_base64_decode_string (tx_message: txn: note :: string) = 'Market: rcu' we calculate the total transfer.tx_message: txn: aamt / pow (10,6) on a daily basis (withdrawing liquidity from AlgoFi)
    Loading...
    Loading...

    According to the chart above can be seen:

    • The biggest rewards in 2022 was for supplying the USDC
    • The highest rewards in 2022 is for May 12
    • Interestingly, there is no prize for ALGO, this may be because those who supplied ALGO did not withdraw it.

    5 ---> Amount of rewards did they receive in 2022 for recursive borrowers

    In this section, Amount of rewards for Lending Protocol daily from 2022 for recursive borrowers will be counted

    Loading...
    Loading...

    According to the chart above can be seen:

    • The biggest rewards for recursive borrowers in 2022 was for supplying the USDC
    • The highest rewards for recursive borrowers in 2022 is for May 20

    6 ---> Percent of recursive borrowers users of total suppliers & borrowers

    • In this section, we get the percentage of users for recursive borrowers relative to the total number of users who are borrowers and suppliers.
    Loading...
    Loading...