
Arnau Ramió.– After several posts discussing innovations related to the Aave protocol (such as lending through shared liquidity pools like Compound, or the arrival of uncollateralized loans known as “Flash-Loans”), we will finally take the time to understand the Aave protocol.
In a way, this protocol represents the birth of lending platforms in the crypto world.
In 2017, with a project known as ETHLend, the current Aave team was working on the first decentralized protocol for P2P lending.
The protocol basically allowed borrowers to create a smart contract containing the loan terms, so that a depositor could then evaluate the offer and decide to accept the lending contract and lend them what they requested.
The borrower had to deposit collateral, and according to Stani Kulechov, founder of ETHLend and Aave, this was hard to get across; putting up more money as collateral than you were borrowing was confusing: why would you do that if you already have the money you are looking for?
The key lies in understanding the future value a person places on a given asset: borrowing lets you keep your position, which will allow you to benefit from the asset’s future appreciation.
Despite making solid progress and successfully running the LEND token ICO in 2017, in which they raised more than $600,000 in Ether in exchange for 1,000,000,000 tokens out of the 1.3 billion in existence, the frictions of P2P lending and the emergence of protocols like Compound led ETHLend to return in September 2018 under the name “Aave”, with a lot to contribute to the decentralized lending ecosystem.
Six months after its launch, Aave has more than $70 million locked, making it one of the fastest-growing protocols we have seen. Not that this is surprising, since the innovations it has introduced are incredible, and it is only fair that we dedicate a post to exploring them.
AAVE PROTOCOL
Aave was born as a decentralized lending protocol based on shared liquidity pools, which calculate borrowing interest rates through supply and demand. Just like what we saw with Compound.
However, the ambitious team wants to go a little further.
They define Aave as a financial markets protocol, with decentralized lending being the first of its markets. They currently already have two markets, although we will look at this later.
As we said, the core of Aave at the moment is its role in offering lending services. Similar to Compound, there are depositors who make their assets available to third parties in exchange for interest.
That interest is calculated based on supply and demand, that is, the pool’s utilization rate. If there are 10 million available and 9 million have been borrowed, the interest rate to be paid will most likely be high, due to the pool’s high utilization rate.
Borrowers must lock up collateral worth more than the amount they are borrowing. If they do not repay their loan, or their collateral loses more value than allowed for the loan to be considered risk-free, it will be liquidated to avoid losses to the protocol.
So far nothing has changed compared to Compound. But the Aave team knew it could not compete with one of the most relevant protocols in the ecosystem without offering new services and differentiated value propositions, and it did not fall short.
LENDING FINANCIAL MARKET
1. Aave Token (aTokens)
Once you deposit assets into the Aave protocol, you receive in return a representation of the amount contributed in the form of aTokens. Unlike Compound, these do not reflect the interest generated by your deposited asset through the token’s appreciation, but through an increase in the number of tokens you hold.
In other words, aTokens have a 1:1 peg with the deposits made; if I deposit 100 Dai into the Dai lending pool, I receive 100 aDai in return. The Dai increase every 15 seconds (every Ethereum block) due to the interest generated, so the number of aTokens you hold also goes up.
Although it may seem minor, the innovation here is considerable:
- First, because ease of use is much greater, since it is easy to know the amount the aDai represent thanks to the 1:1 peg.
- Second, because the increase in the number of tokens would mean receiving transactions every 15 seconds, something hardly viable due to gas costs.
This is not actually the case, since the token’s smart contract itself has a built-in function to check the interest generated and update the aToken balances. The change is practically free, as it is built into the smart contract itself rather than carried out as transactions on the blockchain.
Another curious thing is that it is impossible to transfer 100% of your aTokens in a single transaction, since interest keeps accruing during the confirmation time, so you will always have some amount of aTokens left (even if minimal). Here you have the option of making 2 transfers or redeeming the tokens on Aave.
2. Number of assets
Something distinctive and worth highlighting about Aave is that it offers 17 different assets for lending and borrowing.

This is possible because, before becoming available, each asset goes through a risk assessment process that determines whether it is suitable as collateral for borrowing and the percentage that can be borrowed for every 100 tokens posted as collateral. In other words, it is granted certain functionalities based on its risk assessment. Let’s take a look.




Each asset is rated, and depending on that rating it has certain parameters when serving as collateral and certain penalties if it is liquidated, creating, as always, an incentive system to reduce risk on the platform.
One example is USDT, which, although it can be deposited to earn interest or borrowed, cannot be used as collateral, since Aave considers its centralization to be too high and therefore too risky to use as collateral for loans.
3. Liquidations
These risk parameters are also used to determine a loan’s health. As in Compound, once the “Health Factor” falls below 1, the loan can be liquidated by liquidators, who receive a reward for doing so. Depending on the asset’s risk, the liquidation penalty can increase, ranging from 5% to 15%.
An interesting feature of the Aave protocol is that it integrates a liquidation service into the platform itself, to bring more balance to the protocol.
Thanks to this integration, anyone can liquidate loans and receive “free money” for it. Of course, these opportunities are not usually available because bots liquidate any profitable loan the moment it appears. There are people who do this professionally.
However, in cases like Black Thursday, when huge numbers of loans were liquidated due to Ether’s drop of more than 60%, there were so many loans to liquidate that the liquidators could not handle them all, so anyone could take advantage and make a profit. This is great, as it increases the protocol’s balance and security.

Flash-Loans (we will look at them shortly) cannot be used within the protocol itself, to avoid risks and possible attacks. So even though they are often used for operations of this kind, they cannot be used to liquidate loans within Aave. For this, flash-loans from other protocols such as dydx could be used.
In addition, since Aave is an open protocol, applications can be built that integrate its functionalities. One example is a service that allows users to access Aave liquidations without going through its platform: iliquidate.finance
3. Interest rates and InterestSwaps
Because the interest rate is constantly updated with every block generated on Ethereum (it works based on supply and demand), the price of borrowed money can vary over time. The more liquidity there is in the protocol, the less abrupt these changes will be, but in exceptional cases the interest rate can indeed skyrocket.
For some, this risk is high, and they are willing to accept a higher but fixed interest rate over time. This means that when borrowing you have the option of paying a variable rate or a stable rate which, although it changes, once chosen will remain at the price at which you took out the loan.
This also creates a certain vulnerability in the protocol; imagine the variable rate is 2% and the fixed rate is 5%, while the yield earned by depositors is 1%. The fixed rate will only hold as long as 95% of the available funds are not borrowed, or if the interest earned by depositors is higher than the fixed rate paid by borrowers. Because if this happened, there would be a bug in the system allowing people to continuously deposit and borrow, taking advantage of the interest earned being higher than the cost of borrowing.
Interest Swaps consist of swapping loans from fixed to variable or vice versa. This is usually an option to protect your loans in case of sharp increases over time in the platform’s variable rate.
4. Flash-Loans or uncollateralized loans
Flash-loans are the great innovation Aave introduced at launch. As incredible as it may seem, flash-loans are loans without collateral. How? You heard it right: you can borrow, for example, 7,500 Ether without offering any collateral.
A flash-loan is a loan you can request from the Aave protocol without having to post anything as collateral, as long as the loan is repaid in full plus a 0.09% fee within that same transaction (during the block). On the other hand, if the loan is not repaid within that same transaction, it is cancelled and never actually issued.
This financial product was not possible in the traditional system, but thanks to Blockchain and the ability to revert transactions before confirmation, we can now use this type of loan. A way to democratize liquidity has been created, since everyone can access credit without needing collateral.
This service is mainly used by developers who integrate this liquidity into their applications to offer services with it, usually aimed at making money through arbitrage or saving money by self-liquidating loans.
One example is DefiSaver: they give you the option to close your vault on Maker to recover your collateral by repaying the amount owed through a flash-loan. Let’s take an example:
Imagine you have deposited 100 Ether in a Maker vault, and in return you have borrowed 10,000 Dai (50% of the value of the Ether). This loan has no deadline, and you are using it to pay taxes without selling your Ether. After 3 months the price of Ether starts to fall sharply, and you find you do not have enough Dai to repay the loan plus interest, and that your vault could be liquidated, incurring a 13% penalty. With DefiSaver you can use a flash-loan of 10,000 Dai plus the interest owed on Maker, recover your 100 Ether, take 50 Ether to UniSwap, swap them for 10,000 Dai plus the interest paid on Maker, and return that amount to Aave, thus closing the flash-loan. (To learn more about MakerDAO, click here.)
Thanks to an uncollateralized loan you have saved 12.75% of the 100 Ether deposited in Maker, since DefiSaver adds a 0.14% fee to Aave’s 0.09%. Amazing.
Another use case is ColateralSwap, which allows you, through a flash-loan, to change the collateral used in Maker. Let’s take the previous example.
You have a 10,000 Dai loan on Maker obtained by collateralizing 100 Ether in a vault. Imagine you foresee a drop in Ether and a rise in BAT; with ColateralSwap you can use a flash-loan to change the collateral you are using (Dai for BAT) in a single transaction, without needing to hold the Dai.

This is a transaction using CollateralSwap to change Maker collateral from Ether to USDC. Let’s analyze it:
- Dai Flash-Loan to release the collateral
- You recover the Ether and swap it for USDC on UniSwap
- You open another Maker vault with USDC
- You get the Dai back in the form of a loan
- You return the borrowed Dai to Aave
Finally, I will mention furucombo, a decentralized application still in Beta that lets you chain consecutive transactions, achieving the first arbitrage via a flash-loan by a user without having to develop or code anything.

For a more extensive and detailed explanation of flash-loans, here is an article by Miguel Caballero that covers these loans on their own: “Flash loans, DeFi 2.0 and killer-apps”.
5. Interest generated
A curious thing about Aave is that it regularly offers better returns than other lending protocols with shared liquidity pools. This is due to the protocol’s extra integrations: first, some loans are taken at a fixed rate, giving depositors a higher return; in addition, there is the 0.09% flash-loan fee, of which 70% goes to depositors, and of the remaining 30%, 80% is burned to promote an increase in the LEND token’s value and 20% goes to developers who integrate flash-loans. As for fees on regular loans, 80% is used to burn LEND tokens and the remaining 20% goes to depositors, something that could change with decentralized governance through the native token.
An example of the effect of flash-loans can be seen in the interest earned by Ether depositors. An asset that theoretically should offer (compared to the same asset on Compound) an annual return of 0.01% is yielding 0.16%. And of that 0.16%, roughly 0.1% was generated in a matter of days when many Maker CDPs were closed using flash-loans, generating interest for all depositors.

2ND MARKET – UNISWAP LIQUIDITY TOKEN
As we mentioned at the beginning of the post, Aave is not limited to being a lending protocol but is rather a financial markets protocol, where the option to deposit and borrow is only one of the available markets.
We recently saw the introduction of the second market, which consists of using UniSwap liquidity tokens as collateral. As a recap, UniSwap is a protocol for swapping ERC20 tokens through a pool of 2 tokens deposited by users, who earn interest through the fees on each Swap. (See UniSwap here).
Until now, those who added liquidity to UniSwap pools received interest and a token representing those assets, called liquidity tokens, so they could later withdraw them or transfer them to a third party without removing the liquidity. With this Aave integration you can now use liquidity tokens as collateral and take out a loan.
This market is riskier than the lending market because of the type of token used as collateral, in addition to the fact that UniSwap carries an intrinsic risk due to rebalancing between the two tokens deposited in the pool.
That is why it is a new market, independent of the other. Users can deposit their assets in the UniSwap tokens market or in the lending market. This means we will see arbitrage opportunities within the same protocol, something never seen before.

ORACLES
Another of Aave’s challenges is ensuring that prices reflect real-time market conditions. This involves taking into account and knowing the prices on the main decentralized and centralized platforms. This data is mainly off-chain, so it needs to use oracles to bring the data onto the Blockchain.
Bringing the data on-chain is not enough, as it needs to be incorporated using a framework that minimizes risk and promotes decentralization. This is probably the protocol’s most critical information, so the data must be obtained securely and in a decentralized way.
To meet these conditions, Aave has used Chainlink to provide this data to its smart contracts. Chainlink is a decentralized oracle network that gives smart contracts secure and reliable access to data providers, APIs and many other external data sources.
The most efficient approach is probably to obtain the data directly on-chain. The new version of UniSwap, for example, offers the option of using the swap protocol to provide real-time, on-chain price data.
Despite the clear improvement this service brings to the DeFi ecosystem in general, for now the risk involved is too high, and we may see version 2 prices adopted as an on-chain oracle later on. Just recently, we have seen protocols attacked and lose millions of dollars for using Kyber as a price oracle. The attackers manipulated the price offered by Kyber by putting stress on the liquidity pool, and right at that moment they attacked the protocol. It is also true that the new version of UniSwap offers improvements to prevent this type of manipulation.
LEND TOKEN
One of the elements of the Aave protocol that fascinates me most is undoubtedly its native LEND token. It has functionalities and tokenomics that could serve as an example for the entire DeFi ecosystem. As we have mentioned on several occasions, a protocol’s governance is its most crucial part, because if a protocol has 1 billion locked and a governance attack costs 500 million, we have a big problem.
That is why the token must have a tokenomics model that incentivizes holders to hold it in order to benefit from future appreciation. This prevents them from wanting to dump it, causing continuous price drops. In those cases we see governance become centralized and the cost of an attack decrease, when it should grow in parallel with the protocol’s growth.
LEND was launched in 2017 through an ICO, in which approximately 78% of the available tokens were sold (1 billion of the 1.3 billion available). With the creation of Aave, this token has gained new functionalities. First, using the token on the platform gives you certain benefits such as reduced fees, in addition to being usable as collateral, and platform fees are used to burn LEND tokens.
Now the LEND token will become the protocol’s governance token, so management and decisions about the protocol will no longer be made by the team but by LEND token holders. As we have seen, governance is the key piece of protocols, and Aave has managed to give the token enough functionality for it to become the heart of the system and capture part of the platform’s value.
The LEND token can be deposited in a smart contract to serve as security for the platform’s funds. It will act as a second line of defense in case collateral is not enough to cover the debts generated within the protocol.
In return, if new tokens are minted, as happened with Maker to recover the funds lost during Black Thursday, these will go to those who deposited the collateral as a reward for providing security to the protocol, and they will receive part of the protocol’s fees, which will no longer go solely to burning tokens.
These fees will come from all the markets available on Aave, from lending to UniSwap collateral, and a future market for loans collateralized with SetTokens.
In a way, Aave is creating a security layer with functionality very similar to insurance protocols like NexusMutual. By providing security to the system you receive incentives, creating a win-win relationship for the protocol.
The last security layer will be the so-called “backstop”, which allows users to deposit stable assets or ether to serve as a guarantee for the protocol, without it having to be LEND.

CONCLUSION
Less than 6 months have passed since Aave’s DeFi protocol was launched, and in that short time it has become one of the leading projects, both for its innovative contributions (e.g. flash-loans) and for the continuous, steady improvements it keeps adding.
One of the key points is the transparency they offer on the protocol’s data and functionalities. Although not being transparent would be absurd, since everything is public and auditable (the magic of open source), they work to make this transparency even more visible. Here, for example, you can see all the protocol’s real-time data, along with statistics for each asset.
In a short time Aave has become the main threat to Compound. This tweet surprised me quite a bit at the time:

At the time of the tweet, Aave still had a native token (LEND) with tokenomics that left a lot of room for improvement, and it had not yet announced the new UniSwap financial market. Even then, some were already convinced:

Something definitely worth keeping in mind is the “less captured by VC’s” part. Compound was financed mainly through private rounds, which means its token is much less distributed, the complete opposite of Aave’s token. In general, tokens captured by VCs tend to take a long time to appear and appreciate due to their lack of liquidity. LEND poses a major threat in this respect, as its wide distribution makes interactions with the token much better.
I certainly wish Aave the best, not only because of the team behind it, always attentive and eager to improve in order to bring DeFi to a traditional financial system that needs it, but also because of all the innovations they are bringing to the ecosystem.
For more information about Aave and how it works, we will cover this and much more in our Blockchain Master’s and the DeFi Bootcamp.
References
- https://aave.com/
- https://aavewatch.now.sh/
- https://github.com/aave/aave-protocol/blob/master/docs/Aave_Protocol_Whitepaper_v1_0.pdf
- https://collateralswap.com/
- https://defisaver.com/
- https://furucombo.app/
- https://iliquidate.finance/
- https://defirate.com/aave/
- https://www.youtube.com/watch?v=eqQJZbEcy78&t=1992s
- https://makerdao.com/en/
- https://compound.finance/
- https://uniswap.org/
- https://kyber.network/
Article published by Arnau Ramió; you can visit the link to discover more interesting articles
















































