Comment on page
Use Aave's aTokens and Compound's cTokens
Aave and Compound offer composable tokens which represent deposits on their respective platforms. We explore key benefits of using the same tokens for higher yields and lower borrowing rates.
Para.space is a true one-stop shop for all things NFT’s and capital efficiency in web3. In order to do so it will build out its NFT-focused borrowing/lending protocol to provide maximum liquidity to users and capital efficiency.
We seek to support Aave's aTokens and Compound's cTokens in order to provide additional yield and allow both Aave and Compound to earn more on their crypto investments. Further liquidity on Para.Space will likewise allow borrowers to pay less for loans and achieve greater capital efficiency.
- 1.As a ParaSpace user I am able to deposit and borrow against a wide range of tokens, both fungible and non-fungible, which allow me to maximize my returns on investment.
- 2.As an Aave and/or Compound user I am able to generate additional yield on my existing deposits in order to maximize my returns on investment.
- 3.As the ParaSpace protocol I would like to extend support to the widest range of tokens possible in order to solve the greatest number of users' problems.
Aave and Compound are blue-chip protocols with very large TVL and user bases. We will support their respective aToken and cToken contracts in order to solve problems and improve outcomes for the largest possible audience of users. Their tokens represent composable interest-bearing deposits on each Aave and Compound which will in turn earn greater yields on Para.Space.
Depositors will be incentivized to deposit aTokens and cTokens into ParaSpace as long as they receive positive interest rates (in addition to Aave and Compound yields) and they feel it is safe to do so.
Borrowers will be incentivized to borrow aTokens and cTokens as long as their post-borrow interest rate is less than the borrow on the underlying ERC20. Given that both aTokens and cTokens are directly fungible with their underlying ERC20 or ETH tokens we will be able to instantly transfer their preferred tokens from our protocol's front-end via Aave and Compound's contracts.
In order to ensure maximum capital efficiency we will likewise build a tool which calculates blended interest rates for ERC20. i.e. as user I enter the amount I would like to borrow of a given ERC20. The system then calculates based on Utilization ratio and interest rate curves whether I would pay lower rates in borrowing the ERC20 or the equivalent aToken/cToken. If I attempt to borrow the ERC20 directly when it’s more expensive to do so there is a pop-up which suggests I should instead borrow at lower net rates against cUSDC or aUSDC. We can likewise add a calculator tool such that the user can calculate savings (if any) proactively.
NB: Depositors and Borrowers are similar sets of users. Borrowers should always prefer the additional liquidity made available via Aave and Compound’s aToken and cTokens to lower overall protocol borrow rates.
Aave is currently the single-largest protocol by TVL ($6.1B excluding borrows and double-counts) across DeFi according to Defillama, while Compound is the ninth-largest ($2.6B) but the second-largest lending platform on Ethereum. Both Aave and Compound are among the earliest and certainly the most significant decentralized borrowing/lending platforms on Ethereum and in many regards helped define Decentralized Finance.
In fact Compound’s COMP token launch in May, 2020 served as catalyst for the so-called “DeFi summer” which catapulted the broader industry to orders of magnitude more TVL.
Or in sum: both Aave and Compound are among the most trusted and actively used protocols in all of Decentralized Finance and crypto.
Compound introduced ‘cTokens’ as ‘cERC20’ or cETH tokens which represent deposits on the Compound protocol. They did so such that the protocol's contracts no longer had to keep track of which users held deposits on its platform, simplifying their smart contracts, gas usage, security, and adding composability to deposits on Compound's protocol.
Aave released aTokens to accomplish the same and eventually overtook Compound to become the largest decentralized borrowing and lending protocol in all of crypto.
With a collective $6.1B in aTokens ($2.03B net of existing borrows) and $2.63B in cTokens ($1.62B net of borrows) it’s clear there is substantial capital deposited both on Aave and Compound. According to queries on Dune Analytics there have been an aggregate 118,635 depositors onto Aave and a further 342,739 users on Compound. This clearly overstates the number of still-active users, but it speaks to the scale of the addressable audience.
With this user base we can solve users' problems and add additional value to a larger audience whether or not they use Aave or Compound.
The answer to the more critical question is relatively straightforward—a user with aTokens and/or cTokens in their wallet could potentially earn further yields or likewise borrow at different rates on ParaSpace. Examples help clarify the same:
- User A has deposited 10,000 USDC into Aave and now holds 10,000 aUSDC, collecting 5% interest on their deposit. The same user sees they can earn a further 5% on ParaSpace if they deposit their 10,000 aUSDC into the protocol or up to 10.25% total yield on their USDC. This is made possible by User B who borrows aUSDC and pays interest:
- User B would like to borrow 10,000 USDC against their ERC-721 asset. They see, however, that the USDC borrow rate is 20% but the borrow rate on aUSDC is 5%. As long as the net-borrow rate on aUSDC is below 20%, the user then borrows 10,000 aUSDC and immediately redeems it for USDC on our platform.
We continue with the example above:
- User B will payin post-borrow rates for aUSDC on Para.Space and will likewise pay the additional 5% yield earned on aUSDC via Aave. We'll call this net-borrow rate. As long as is below 20% it makes sense for User B to borrow aUSDC and immediately withdraw the equivalent 10,000 USDC from Aave.
- With the above equation we can solve for the maximumof 14.29% such that it will make sense for User B to borrow aUSDC instead of USDC directly.
- User A will be incentivized to deposit their aUSDC onto ParaSpace as long as they generate positive deposit yields and feel their deposits are safe. Their total deposit yield will thus be the 5% they earn on Aave plus whatever positive interest rate they receive on ParaSpace.
- User C is a ParaSpace user or prospective ParaSpace user who has never used Aave or Compound. They will be incentivized to borrow against their ERC20 or ERC721 collateral if interest rates are lower. All else equal, the ability to borrow against aTokens and cTokens should indeed improve access to capital for this key set of borrowers. ParaSpace will support a mechanism by which the user will be told if it is more cost-effective to borrow the equivalent aToken or cToken to take advantage of the additional liquidity provided.
cTokens: A user who deposits USDC into Compound receives cUSDC in return. If a user deposits 100 USDC they might receive 100x that amount in cUSDC, or 1,000 cUSDC. When the user returns said cUSDC to the Compound protocol they receive their original USDC in addition to any interest earned given a changed exchange rate between USDC ↔ cUSDC. If the cumulative interest adds to 5% of principle they would receive 105 USDC in exchange for the same 1,000 cUSDC they originally received; the USDC ↔ cUSDC exchange rate goes from 100
to account for the same on Compound.
aTokens: Aave uses a very similar model and issues aTokens as an interest-bearing token to represent the deposits a user has made into the Aave protocol. There is a key difference, however: aTokens rebase within a user’s wallet to account for interest earned on Aave. If the same user in the above example deposits 100 USDC into Aave they would receive 100 aUSDC. If over the same time period they achieved 5% returns their wallet balance would be 105 aUSDC without any transfers necessary due to automatic rebasing within the aToken contract. The exchange rate doesn’t change and instead returns are generated at regular increments.
In order to support borrowing and lending of aTokens and cTokens we will need accurate pricing and the ability to exchange each for their underlying tokens:
- 1.Pricing: Find an unbiased and resilient price Oracle for each in order to calculate value. Track the resulting value of the user's deposits accurately.
- 2.Exchange: Exchange cTokens/aTokens to and from the underlying token and liquidate/exchange them for other tokens when necessary.
Here it bears mention that like Aave users receive a token to represent their deposits and borrows against ParaSpace--pTokens. And we will separate slightly different methods of support for the Aave and Compound derivative tokens:
- 1.Pricing: Aave will redeem aTokens 1:1 with the underlying ETH or ERC20 token. Thus we will use a Chainlink oracle for each to price the aToken. ParaSpace will provide the user with a pToken which tracks the growing balance of the depositor's aToken and liability for the borrower.
- 2.Exchange: aTokens are as liquid/fungible as the deposits they represent. ParaSpace may call Aave's contract to redeem the underlying ETH or ERC20 and liquidate them via normal channels.
- 1.Pricing: Compound itself uses Chainlink oracles to track the value of ETH and ERC20 tokens, and we can call the Compound contracts to determine the cToken exchange rate. As a policy, however, we will avoid using on-chain instantaneous pricing due to risk of flashloan attacks. We will thus develop a Time Weighted Average Price (TWAP) for this exchange rate in order to support cTokens. But we will otherwise require no special treatment of pTokens representing cToken deposits.
- 2.Exchange: We can at any time redeem cTokens via Compound for the underlying token and exchange/liquidate them via normal channels.
As we make clear above we stand to solve further user problems in our support for Aave's aTokens and Compound's cTokens on the ParaSpace protocol. Specifically--higher deposit yields for Compound and Aave users and lower borrow rates for all ParaSpace users.
In the first phase we will build provide front-end prompts when a user requests to borrow a token and the corresponding aToken or cToken offers a better net-borrow rate. In the future we could make this experience even more user-friendly for borrowers if we implement custom borrow/repay functionality to optimally select which asset to borrow on-chain.
In this way a user who seeks to borrow, for example, USDC would simply see the lowest borrow rate available across USDC, cUSDC, and aUSDC. This could be done off-chain of course, but the ParaSpace smart contract would loop over the corresponding assets to confirm as much in a truly decentralized fashion.
The ParaSpace contract would then automatically choose the asset which results in the lowest rate. If necessary it would then swap the aToken/cToken to the token which the user has requested with no further input necessary. When the user repays the loan the contract would automatically exchange the token to match what was originally borrowed.