cryptocurrencies – Finematics https://finematics.com decentralized finance education Thu, 21 Jan 2021 19:17:01 +0000 en-GB hourly 1 https://wordpress.org/?v=5.8.1 https://finematics.com/wp-content/uploads/2017/09/cropped-favicon-32x32.png cryptocurrencies – Finematics https://finematics.com 32 32 Aave – The Road To $3 Billion https://finematics.com/aave-explained/?utm_source=rss&utm_medium=rss&utm_campaign=aave-explained&utm_source=rss&utm_medium=rss&utm_campaign=aave-explained https://finematics.com/aave-explained/#respond Wed, 20 Jan 2021 20:04:25 +0000 https://finematics.com/?p=1218

So what is Aave all about? How was it able to go from 0 to $3B in total value locked in less than a year? And what’s the use case for the AAVE token? You’ll find answers to these questions in this article. 

Let’s start from the beginning.  

ETHLend 

The initial version of Aave – which is currently one of the most popular lending protocols in decentralized finance – came into existence in 2017. Before the rebranding that happened later in September 2018, the project was known as ETHLend. 

ETHLend was started in Finland by Stani Kulechov. Stani, a law degree graduate, discovered Ethereum, realised the power of smart contracts and decided to build a peer-to-peer lending protocol. 

Finland was clearly not a usual location for a new tech company, with the majority of other crypto firms launching in venture-capital-rich places such as Silicon Valley, New York, London, Hong Kong or Singapore. 

This also shows one of the most interesting properties of decentralized finance. In contrast to traditional finance where a new fintech startup requires a lot of capital and staff just to comply with all the banking regulations, a new defi project can be launched by even a single person with not a lot of upfront capital needed.

The first version of ETHLend was deployed to the Ethereum mainnet in early 2017 and started attracting interest in the Ethereum community. 

ICO and Rebranding 

Stani saw the potential of decentralized lending and decided to raise money via an initial coin offering (ICO) at the end of 2017 to fund further development of ETHLend. As we mentioned earlier funding a project outside of typical venture capital locations can be quite challenging. However, the ICO model allows everyone in the world to participate.

ETHLend was able to raise $16.2M which was quite moderate considering the craziness of the 2017 ICO mania. 

The ICO allowed for hiring more developers who were able to focus on making improvements to the protocol throughout 2018. This was all despite the native ETHLend token – LEND – losing most of its value in the post-ICO era. 

The ETHLend team soon realised that the peer-to-peer lending model of the protocol was becoming more and more problematic.

In the peer-to-peer model, users interact with other users via smart contracts. This can be quite inefficient especially if there is no one on the other side who wants to interact with us. 

A lot of other projects, such as Uniswap and Compound, that came into existence at the end of 2018, started leveraging another model – peer-to-contract. 

The peer-to-contract model is based on a contract with pooled funds that can be instantly used by the users of the protocol. This eliminates the wait time necessary to find a counterparty and makes the whole process of interacting with a decentralized protocol smoother. 

This was also the time when the team behind ETHLend decided to change their model from peer-to-peer to peer-to-contract and rebrand from ETHLend to Aave. 

Aave

The name Aave comes from Finnish where it means “a ghost”. This is also why we can now see a friendly ghost in the Aave’s logo. 

When it comes to the protocol itself, Aave users can become depositors or borrowers. Depositors provide funds to borrowers in return for interest on their deposit. Borrowers are willing to pay interest on the amount they borrowed in exchange for having a lump sum of money available immediately.

Users can, for example, supply a stable coin such as DAI and start generating interest according to the DAI supply interest rate. This is determined by the ratio between supplied and borrowed DAI.

The supplied DAI can then be used by borrowers. Borrowers have to supply collateral, for example, ETH to be able to borrow other tokens. All the standard loans in Aave are overcollateralized which means that the value of supplied collateral is higher than the amount that can be borrowed. This protects the protocol from being undercollateralized and not being able to repay depositors. 

In this model, depositors basically provide liquidity to the protocol, this is also why Aave is very often described as a decentralised liquidity market protocol.  

On top of variable interest rates, Aave also offers stable borrow rates which is a distinctive feature not present in other popular lending defi protocols, such as Compound. 

In Aave, depositors who provide funds to a smart contract receive aTokens. The value of aTokens is pegged to the value of the underlying token at a 1:1 ratio. What is interesting is that the balance of aTokens represents their deposited amount plus the accrued interest and it keeps increasing according to the current borrow interest rate of the protocol. Also, aTokens are just ERC20 tokens. This means you can basically send them to someone else and the balance of their aTokens will keep increasing in their wallet automatically, which is pretty cool. 

If you want to learn more about how exactly lending works in defi and why is it even needed in the first place, check out our other article that covers this topic in depth. 

Another important concept popularised by Aave is flash loans. 

Flash Loans

A flash loan is a feature that allows you to borrow any available amount of assets from a designated smart contract pool with no upfront collateral needed. The caveat is that a flash loan has to be borrowed and repaid within the same blockchain transaction. 

These constructs are useful building blocks in DeFi as they can be used for things like arbitrage, swapping collateral and self-liquidation.

Fortunately enough, we also wrote a separate article that explains the mechanics of flash loans and you can check it out here

DeFi Summer

After a couple of years of work, Aave launched on the Ethereum mainnet at the beginning of 2020 and started building users’ interest and its total value locked (TVL) in the protocol. 

This quickly escalated in May 2020 when a period of DeFi super-growth also called DeFi Summer started. 

Before DeFi Summer, the total value locked in Aave, which is one of the key metrics when it comes to a lending protocol, was at around $40M. 

With launches of new DeFi protocols and new yield farming opportunities, Aave’s TVL started rising dramatically. 

$60M in June, $400M in July. August was closed with a whopping $1.5B in TVL. This number remained at $1.5B in September despite the cool down across the whole DeFi space. Although October saw a drop back to around $1B, at the end of November we were once again at an all-time high with $1.6B locked. At the end of 2020, Aave’s TVL was touching $2B. In 2021, a major surge in DeFi tokens pushed Aave’s TVL to over $3B by mid-January.

This is basically a 50x increase in TVL in around 6 months – quite astonishing. 

Besides that, Aave hit another major milestone – $1B in flash loans volume. 

Additionally, there were a few other important events that took place during DeFi Summer. 

Aave raised $3M from venture capital firms: Three Arrow Capital and Framework Ventures who purchased Aave’s native token LEND. 

In July 2020 Aave was granted an electronic money license by the U.K. Financial Conduct Authority. This strategic move will make it possible for Aave to become a fiat gateway and easily onboard people to its own protocol. 

On top of this, also in July, Aave announced an upgrade to the tokenomics of the protocol conveniently named Aavenomics. 

Aavenomics

Aavenomics aimed at making Aave more decentralized by allowing token holders to participate in the governance of the protocol.

Some of the most important elements of the upgrade were the migration from the LEND token to a new token AAVE in a 100:1 ratio, new Ecosystem Incentives and the Safety Module.

The Safety Module allows for staking AAVE tokens and acts as insurance against a potential shortfall event. If an event like this occurs, up to 30% of the tokens staked in the safety module could be slashed and would provide a way to repay everyone affected. 

Although major shortfall events are unlikely, they can still happen. An example of such an event would be if a popular stable coin loses its peg to the US dollar. 

In exchange for staking their tokens users receive staking rewards in the form of additional AAVE tokens. Currently, the rewards are at around 6% annually and are generated from the protocol fees.  

The token migration was initiated in October 2020 and went smoothly with most of the LEND holders exchanging their tokens in the first couple of weeks. 

So far, we’ve seen 7 Aave Improvement Proposals (AIPs). Most of the proposals involve either adding a new asset as collateral or tweaking some of the risk parameters of the already existing tokens that can be used in the protocol.

V2

In the meantime, The Aave team was relentlessly working on delivering an upgraded version of the protocol. 

Aave V2 went live in December 2020 and brought a lot of new features and improvements such as:

Collateral Swap. Users can swap their collateral from one token to the other. For example, they can swap their collateral from ETH to DAI if they believe that ETH may lose value in the future. Collateral Swap is possible thanks to flash loans and it was explained in our article about flash loans. 

Batch Flash Loans. Users can now flash borrow multiple assets at the same time, all of it within the same Ethereum transaction. 

Debt Tokenization. In V2, borrowers receive tokens that represent their debt. This in turn enables another feature:

Native Credit Delegation. This allows for opening up access to liquidity without providing collateral. A very useful feature that can be used, for example, to provide a credit line to an institution, a cryptocurrency exchange or even other decentralized protocol under certain conditions. This feature in and of itself is probably worth writing another article. 

Besides all of that, V2 contracts are highly optimised which results in lower gas fees. In some cases, a user can save up to 50% of the gas cost when comparing to V1.

Future 

Aave is clearly one of the most important protocols in the decentralised finance space and there is a big chance it will remain one of the main building blocks in defi for the foreseeable future. 

One of the strong aspects of Aave is its community, also known as Aavengers, with a lot of members supporting the protocol pretty much from the time of their ICO. 

Due to Ethereum’s popularity, interacting with Aave and other defi protocols can be quite expensive, especially when working with small amounts of money. 

To solve this issue, Aave, similarly to other major defi protocols, is also exploring the possibility of launching on layer 2. This should make decentralized lending and borrowing even more accessible to everyone. 

So what do you think about Aave? How big will it become in the future? 

If you enjoyed reading this article you can also check out Finematics on Youtube and Twitter.

]]>
https://finematics.com/aave-explained/feed/ 0
How does Ampleforth work? AMPL Explained https://finematics.com/ampleforth-explained/?utm_source=rss&utm_medium=rss&utm_campaign=ampleforth-explained&utm_source=rss&utm_medium=rss&utm_campaign=ampleforth-explained https://finematics.com/ampleforth-explained/#respond Mon, 27 Jul 2020 13:41:15 +0000 https://finematics.com/?p=801

Intro

What is Ampleforth? How does it work under the hood and why do the number of my AMPL tokens keep changing every day? You’ll find answers to these questions in this article.

What is Ampleforth?

Okay, so what is Ampleforth all about?

Ampleforth, in essence, is a new cryptocurrency with a quite unique feature – its supply is elastic and can change every day while the ownership of the AMPL tokens is never diluted. Let’s explain what this actually means.

When it comes to money, having an elastic supply allows for printing new money or removing money from the circulation depending on the demand. Fiat currencies such as the US Dollar are good examples of money with an elastic supply as the FED can decide to print more money if there is more demand for it (they can actually also decide to print it without an increase in demand, but that’s another story).

Bitcoin is quite the opposite, its supply is fixed and the only way to accommodate the increase in demand is for the price to go up. Constant price changes can be quite problematic, especially when it comes to denominating things like services, contracts or debt.

So even though elastic money supply can be quite useful to achieve price stability it comes with a certain problem – dilution.

When the FED increases the supply of dollars by printing new money that money is put into the circulation, diluting everyone else’s proportion of the total supply of dollars basically making them poorer. Ampleforth is non-dilutive. This is achieved by applying supply adjustments proportionally across everyone’s balances.

Imagine the following situation: let’s say the FED prints an extra 5% of the total supply of US dollars to meet an increase in demand. This extra 5% would be proportionally distributed across all the accounts holding USD, so if you had $1000 in your bank account, after the supply change you would end up with $1050. That scenario would make the US Dollar non-dilutive as your proportion of the overall supply of dollars would remain the same after the adjustment.

So to summarise this part. Bitcoin is inelastic and non-dilutive. Fiat money such as USD is elastic but dilutive. Ampleforth is both elastic and non-dilutive, so even though the number of your AMPL tokens can change automatically, you’ll always own the same proportion of the overall supply.

By having this unique feature, Ampleforth tries to solve the following problems:

Inelasticity Problem. Fixed-supply cryptocurrencies are vulnerable to sudden shocks in demand that make denominating things harder.

Diversification Problem. Today’s cryptocurrencies are tightly correlated. AMPL’s unique incentives, in theory, allow it to decouple from Bitcoin’s price pattern.

Let’s see how this unique feature of Ampleforth can be achieved.

How does it work?

There are 3 states that the Ampleforth protocol can be in, these are expansion, contraction or equilibrium. Before we explain how they work let’s introduce one more concept – price oracles.

Price oracles are used to provide external prices to smart contracts. There are two main functions of price oracles in Ampleforth. The first one is to provide a current exchange rate of AMPL/USD. The second one is to provide a Consumer Price Index value. The CPI is used to establish a “target price” which is a price of 1 AMPL that the Ampleforth protocol tries to aim for. The target price is currently at $1.009 and it represents the 2019 purchasing power of the US dollar as represented by CPI. The target price plays a very important part of the protocol as it is used in conjunction with the current price to determine if there should be a change in the total supply of AMPL.

Now, let’s get back to the Ampleforth states.

Expansion. In this state, the supply of AMPL tokens is proportionally increased across all the wallets holding AMPL tokens. Let’s go through a quick example.

Imagine Alice buys 1 AMPL for $1. As demand for AMPL suddenly increases, 1 AMPL is now worth $2 which is above our target price of $1.009. In this case, the Ampleforth protocol will seek a price-supply equilibrium by increasing the supply of AMPL, so Alice ends up with 2 AMPL each worth $1.

Contraction. As expected, this is the exact opposite of the expansion state. When the system is in the contraction state the supply of AMPL tokens is proportionally decreased across all the wallets holding AMPL tokens.

So if Alice buys 1 AMPL for $1 and due to a decrease in demand, the price of AMPL drops to $0.5, the system will reduce the supply of AMPL. Alice ends up with 0.5 AMPL worth $0.5 as the price of 1 AMPL reverts back to $1.

One important thing to add here is that the algorithm can only affect the supply of AMPL. It cannot, of course, dictate the price directly. It’s up to external players to notice the supply change and this should, in theory, drive the price in the correct direction.

The last state which is equilibrium is the only state where the algorithm doesn’t seek to increase or decrease the supply of AMPL. This is basically a state where there is no need to do anything as the current price is within range of the target price.

Expansion and contraction are achieved automatically by a rebase function in the protocol. Every day at approximately 2 AM UTC time the rebase function can be called. The function makes use of price oracles to get the target price and the current price of AMPL or to be precise a 24h volume-weighted average price. If the current price of AMPL is within 5% of the target price the algorithm classifies the state as equilibrium and doesn’t change the supply of AMPL. If the current price is above the target price + 5%*target price the supply expands and if the current price is below the target price – 5%*target price the supply contracts.

As an example, if the current price of AMPL is $1.10 and the price target is $1.009 the system is in the expansion state as $1.009+$1.009*5%=1.05945, and $1.10 is higher than the max price that can still qualify as equilibrium.

The percentage that is used in the rebase function is also called the equilibrium threshold and it’s one of the 2 main parameters in the Ampleforth protocol. The second parameter represents a smoothing factor also called a dampening factor.

The dampening factor is used to avoid sharp supply changes. Currently, the protocol spreads the supply change over a period of 10 days. This means that if, for example, the rebase function results in a 50% expansion that 50% would be spread over 10 days, so it would result in a 5% supply increase on the day when the rebase function is called.

The rebase function is executed no more than once every 24 hours. This operation is also stateless, meaning that the protocol has no memory of the previous day’s supply change, so it has to recompute the potential supply change every day based on the latest information.

Technology behind Ampleforth

The Ampleforth protocol is implemented as a set of smart contracts deployed to the Ethereum blockchain. The AMPL token implements the ERC-20 interface and can be easily exchanged on decentralized exchanges such as Uniswap.

According to the documentation, the protocol is chain-agnostic and AMPL tokens can exist simultaneously on multiple platforms, so there is also a chance of seeing AMPL tokens on other blockchains in the future.

Use cases

Ampleforth, in the short term, aims at diversifying cryptocurrency portfolios by being less correlated to the price of Bitcoin compared to other cryptocurrencies. In the medium term, it aims at being used as collateral in DeFi protocols. The long term goal for Ampleforth is to create an alternative to central-bank money that is adaptable to shocks.

Summary

To incentivise more on-chain liquidity, Ampleforth created an incentive program called Geyser where the liquidity providers of the Uniswap AMPL/ETH pool can stake their LP tokens on Geyser and be rewarded with extra AMPL tokens. If you’re not sure what it all means you can check out my article on liquidity pools and a link to the Ampleforth Geyser website.

When it comes to the AMPL tokens the main thing to remember is to always look at the number of tokens in addition to the price to see the full picture of your portfolio.

Ampleforth is clearly one of the most interesting projects in the cryptocurrency space right now, but we have to remember that it is still pretty much a monetary experiment that may or may not work.

So what do you think about Ampleforth? Do you think it has a chance to be used as the money of the future?

If you enjoyed this article you can check out my other articles on decentralized finance and subscribe to Finematics on Youtube.

]]>
https://finematics.com/ampleforth-explained/feed/ 0