Aave and Compound Interest Rates Offchain Data Sourcing
Executive Summary
This document aims to find and compare the deposit and borrowing rates of the two biggest lending protocols in DeFi along with other important factors such as number of supported assets, utilization rate, total value locked(TVL) and difference between borrowing and lending rate for the same asset in a protocol.
These two protocols are Aave and Compound.
Live data for comparison between the protocols has been fetched from native APIs for Aave and Compound.
Protocol Analysis
AAVE
Introduction
Aave is a decentralized finance protocol that allows people to lend and borrow crypto.
Lenders earn interest by depositing digital assets into specially created liquidity pools. Borrowers can then use their crypto as collateral to take out a secured loan using this liquidity.
Task
The task is to extract lending and borrowing data from Aave using Aave’s Native API and present the findings in an exploratory manner.
Data Retrieval
Data is retrieved using native API of Aave protocol with python programming language and Jupyter Notebook. Full code is available at this link.
Code
Output
Glossary
name - Name of the asset
symbol - Symbol of the asset
totalLiquidity - Quantity of asset deposited in Aave
availableLiquidity - Quantity of asset currently present with Aave
totalDebt - Quantity of asset currently loaned out to borrowers
utilizationRate - Ratio of available assets to total liquidity of the asset
depositRate - Annual Percentage Yield(APY) of depositors for providing liquidity of an asset
borrowRate - Annual Percentage Yield(APY) of protocol from users borrowing asset
lastUpdateTimestamp- Timestamp of the last updated entries
Observations
Low risk assets generally have the highest utilization ratio as they provide a secure collateral for borrowing the asset and also have one of the highest deposit and borrow rates.
Medium risk assets have the lowest utilization ratio and also the lowest deposit and borrow rates.
High risk assets have a higher utilization ratio as compared to medium risk assets and lower when compared from low risk assets and also the same is true for their deposit and borrow rates.
Fei USD (FEI) is the low risk asset(stablecoin) with highest deposit and borrow rates of 15.27% APY and 23.71% APY respectively.
Curve DAO Token is the asset with highest deposit and borrow rates of 13.43% APY and 37.44% APY respectively.
Compound
Introduction
The Compound Protocol is an Ethereum smart contract for supplying or borrowing assets. Through the cToken contracts, accounts on the blockchain supply capital (Ether or ERC-20 tokens) to receive cTokens or borrow assets from the protocol (holding other assets as collateral). The Compound cToken contracts track these balances and algorithmically set interest rates for borrowers.
Task
The task is to extract lending and borrowing data from Compound using Compound’s Native API and present the findings in an exploratory manner.
Data Retrieval
Data is retrieved using native API of Compound protocol with python programming language and Jupyter Notebook. Full code is available at this link.
Code
Output
Glossary
name - Name of the asset
symbol - Symbol of the asset
totalSupply - Quantity of asset deposited in Compound
availableLiquidity - Quantity of asset currently present with Compound(number of tokens available in the asset pool)
totalBorrows - Quantity of asset currently loaned out to borrowers
depositRate - Annual Percentage Yield(APY) of depositors for providing liquidity of an asset
borrowRate - Annual Percentage Yield(APY) of protocol from users borrowing asset
COMP_depositRate - Annual Percentage Yield(APY) of COMP tokens awarded to depositors for providing liquidity of an asset
COMP_borrowRate - Annual Percentage Yield(APY) of COMP tokens awarded to users borrowing asset
lastUpdateTimestamp- Timestamp of the last updated entries
Observations
DAI is the low risk asset(stablecoin) with highest deposit and borrow rates of 2.44% APY and 4.10% APY respectively along with awarded Compound tokens deposit and borrow rates of 1.03% APY and 1.46% APY
SushiToken (SUSHI) is the asset with highest deposit and borrow rates of 6.50% APY and 17.19% APY respectively.
Comparison between both protocols
Based on data points shown above we deduced below findings upon comparing both lending protocols, Aave and Compound.
Aave(31) supports 50% more assets for lending and borrowing as compared to Compound(20).
Difference between deposit rates and borrow rates is greater on Compound.
TVL of Aave($19 bn) is also greater than the compound($11 bn).
Both the protocols have relatively similar user interfaces. But Aave is comparatively easier to use with its on-click borrow and supply buttons.
Aave attracts a more customer base with other networks like Polygon and Avalanche with fractional gas fees as compared to Compound which only supports Ethereum network.
Contributors
Last updated