uniswap – Finematics https://finematics.com decentralized finance education Thu, 25 Mar 2021 18:08:16 +0000 en-GB hourly 1 https://wordpress.org/?v=5.8.1 https://finematics.com/wp-content/uploads/2017/09/cropped-favicon-32x32.png uniswap – Finematics https://finematics.com 32 32 Uniswap V3 – New Era Of AMMs? https://finematics.com/uniswap-v3-explained/?utm_source=rss&utm_medium=rss&utm_campaign=uniswap-v3-explained&utm_source=rss&utm_medium=rss&utm_campaign=uniswap-v3-explained https://finematics.com/uniswap-v3-explained/#respond Tue, 23 Mar 2021 23:29:18 +0000 https://finematics.com/?p=1295

Intro

So what is the long-awaited Uniswap V3 all about? How is it different from V2? Will this be a game-changer when it comes to the Automated Market Makers space? And will it launch directly on Layer 2? You’ll find answers to these questions in this article. 

Uniswap 

Although Uniswap, as one of the core DeFi projects, doesn’t need much of an introduction, let’s quickly go through a few major points before we jump into V3. 

Uniswap, in essence, is a protocol for decentralized and permissionless exchange of tokens on the Ethereum blockchain. 

The initial version of Uniswap was launched in Nov 2018 and slowly started building users’ interest. 

In May 2020, at the beginning of DeFi Summer, Uniswap launched a second version of the protocol called Uniswap V2.

The main feature was the addition of ERC20/ERC20 liquidity pools on top of ERC20-ETH pools present in V1. 

In the second half of 2020, Uniswap V2 went through a period of parabolic growth and quickly became the most popular application on Ethereum. It also became pretty much a standard for Automated Market Makers (AMMs) making it one of the most forked projects in the whole DeFi space.

Less than a year since its launch, V2 has facilitated over $135B in trading volume – an astonishing number that is comparable with top centralized cryptocurrency exchanges. 

You can learn more about the full story behind Uniswap V1 and V2 in this article here.

Also, the concepts of liquidity pools and automated market makers are worth understanding. If you need a quick recap, here is an article.

V3

Just before releasing V2, the team behind Uniswap had already started working on a new version of the protocol, details of which were announced just now – at the end of March 2021. The team decided to launch Uniswap V3 on both the Ethereum mainnet and Optimism – an Ethereum Layer 2 scaling solution – targeting early May for the release.  

This was clearly one of the most anticipated announcements in DeFi’s history and it looks like V3 can completely revolutionise the AMM space.

So what are the main changes? 

Uniswap V3 focuses on maximising capital efficiency when compared to V2. This not only allows LPs to earn a higher return on their capital but also dramatically improves trade execution that can now be comparable or even surpass the quality of both centralized exchanges and stablecoin-focused AMMs. 

On top of this, because of better capital efficiency, LPs can create overall portfolios that significantly increase exposure to preferred assets and reduce their downside risk. They can also add single assets as liquidity to a price range that is above or below the current market price which basically creates a fee-earning limit order that executes along a smooth curve. 

This is all possible by introducing a new concept of concentrated liquidity – more on this in a second.

Besides this, V3 introduces multiple fee tiers and improves Uniswap Oracles.

Now, let’s go through some of the Uniswap V3 features one by one to understand them a bit better. 

Concentrated Liquidity 

Concentrated liquidity is the main concept behind V3. 

When LPs provide liquidity to a V2 pool, liquidity is distributed evenly along the price curve. Although this allows for handling all price ranges between 0 and ∞, it makes the capital quite inefficient. This is because most assets usually trade within certain price ranges. This is especially visible in pools with stable assets that trade within a very narrow range. As an example, Uniswap DAI/USDC pool only uses around 0.5% of capital for trading between $0.99 and $1.01 – a price range where the vast majority of trading volume goes through. This is also the volume that makes the majority of trading fees for the LPs. 

This means that in this particular example, 99.5% of the remaining capital is pretty much never used.

In V3, LPs can choose a custom price range when providing liquidity. This allows for concentrating capital within ranges where most of the trading activity occurs. 

To achieve this, V3 creates individualised price curves for each of the liquidity providers. 

Before V3, the only way to allow LPs to have individual curves was to create a separate pool per curve. These pools if not aggregated together resulted in high gas costs if a trade had to be routed across multiple pools. 

What is important is that users trade against combined liquidity that is available at a certain price point. This combined liquidity comes from all the price curves that overlap at this specific price point. 

LPs earn trading fees that are directly proportional to their liquidity contribution in a given range. 

Capital Efficiency 

Concentrating liquidity offers much better capital efficiency for liquidity providers. 

To understand it better, let’s go through a quick example. 

Alice and Bob both decide to provide liquidity in the ETH/DAI pool on Uniswap V3. They each have $10,000 and the current price of ETH is $1,750. 

Alice splits her entire capital between ETH and DAI and deploys it across the entire price range (similar to V2). She deposits 5,000 DAI and 2.85 ETH. 

Bob, instead of using his entire capital, decides to concentrate his liquidity and provides capital within the price range from 1,500 to 2,500. He deposits 600 DAI and 0.37 ETH – a total of $1200 and keeps the remaining $8800 for other purposes. 

What is interesting is that as long as the ETH/DAI price stays within the 1,500 to 2,500 range, they both earn the same amount of trading fees. This means that Bob is able to provide only 12% of Alice’s capital and still makes the same returns – making his capital 8.34 times more efficient than Alice’s capital. 

On top of that, Bob is putting less of his overall capital at risk. In case of a quite unlikely scenario of ETH going to $0, Bob’s and Alice’s entire liquidity would move into ETH. Although they would both lose their entire capital, Bob puts a much smaller amount at risk. 

LPs in more stable pools will most likely provide liquidity in particularly narrow ranges. If the $25M currently held in the Uniswap v2 DAI/USDC pool were instead concentrated between 0.99 – 1.01 price range in v3, it would provide the same depth as $5B in Uniswap v2 as long as prices stayed within that range. 

When V3 launches, the maximum capital efficiency will be at 4000x when compared to V2. This will be achievable when providing liquidity within a single 0.1% price range. On top of that, the V3 pool factory will be able to support ranges as granular as 0.02% – which translates to a maximum of 20,000x capital efficiency relative to V2. 

Active Liquidity 

V3 also introduces the concept of active liquidity. If the price of assets trading in a specific liquidity pool moves outside of the LP’s price range, the LP’s liquidity is effectively removed from the pool and stops earning fees. When this happens, the LP’s liquidity shifts completely towards one of the assets and they end up holding only one of them. At this point, the LP can either wait until the market price moves back into their specified price range or they may decide to update their range to account for current prices. 

Although it is entirely possible that there will be no liquidity at a specific price range, in practice this would create an enormous opportunity for liquidity providers to indeed provide liquidity to that price range and start collecting all trading fees. From the game theory point of view, we should be able to see a reasonable distribution of capital with some LPs focusing on narrow price ranges, others focusing on less likely but more profitable ranges and yet another ones choosing to update their price range if the price moves out of their previous range. 

Range Limit Orders

Range Limit Orders is the next feature enabled by concentrated liquidity. 

This allows LPs to provide a single token as liquidity in a custom price range above or below the current market price. When the market price enters into the specified range, one asset is sold for another along a smooth curve – all while still earning swap fees in the process. 

This feature, when used together with a narrow range, allows for achieving a similar goal to a standard limit order that can be set at a specific price. 

For example, let’s assume that DAI/USDC trades below 1.001. An LP can decide to deposit their DAI to a narrow range between 1.001 and 1.002. Once DAI trades above 1.002 DAI/USDC the whole LP’s liquidity is converted into USDC. At this point, the LP has to withdraw their liquidity to avoid automatically converting back into DAI once DAI/USDC goes back to trading below 1.002. 

Multiple Positions

LPs can also decide to provide liquidity in multiple price ranges that may or may not overlap.

For example, an LP can provide liquidity to the following price ranges in the ETH/DAI pool:
-$2000 between $1,500-$2,500
-$1000 between $2,000 – $3,000 
-$500 between $3,500-$5,000

Being able to enter multiple LP positions within different price ranges allows for approximating pretty much any price curve or even an order book. This also enables creating more sophisticated market-making strategies. 

Non-Fungible Liquidity 

As each LP can basically create their own price curve, the liquidity positions are no longer fungible and cannot be represented by well-known ERC20 LP tokens. 

Instead, provided liquidity is tracked by non-fungible ERC721 tokens. Despite this, it looks like LP positions that fall within the same price range will be able to be represented by ERC20 tokens either via peripheral contracts or through other partner protocols. 

On top of this, trading fees are no longer automatically reinvested back into the liquidity pool on LPs’ behalf. Instead, peripheral contracts can be created to offer such functionality. 

Flexible Fees

The next new feature is the flexibility when it comes to trading fees. Instead of offering the standard 0.3% trading fee known from Uniswap V2, V3 initially offers 3 separate fee tiers – 0.05%, 0.3% and 1%. This allows LPs to choose the pools according to the risk they are willing to take. The team behind Uniswap expects the 0.05% fee to be predominantly used for pools with similar assets such as different stable coins, 0.3% for other standard pairs like ETH/DAI and 1% for more exotic pairs. 

Similarly to V2, V3 can also enable a protocol fee switch where part of the trading fee would be redirected from LPs to UNI token holders. Instead of having a fixed percentage like in V2, V3 offers between 10 and 25% of LP fees on a per-pool basis. This will be switched off at launch, although it can be switched on at any time as per Uniswap governance. 

Advanced Oracles

Last but not least is a significant improvement to the TWAP oracles introduced by Uniswap V2. V3 makes it possible to calculate any recent TWAP within the past ~9 days in a single on-chain call.

On top of this, the cost of keeping oracles up to date has been reduced by around 50% when compared to V2. 

These are pretty much all the main features behind Uniswap V3. 

What is interesting is that all of these features haven’t caused an increase in the gas cost. Rather the opposite, the most common feature – a simple swap will be around 30% cheaper than its V2 equivalent. 

Summary

It looks like Uniswap V3 can be a game-changer when it comes to AMMs. It basically combines the benefits of a standard AMM with the benefits of a stable-asset AMM – all of this while making capital way more efficient. This makes V3 a super flexible protocol able to accommodate a whole range of different assets.  

It will be interesting to see how V3 could affect other AMMs, especially the ones that V2 couldn’t earlier compete with, for example, stable coin AMMs like Curve. 

It is also crucial that V3 launches in parallel on Optimism. 

Optimism is an optimistic rollup-based Layer 2 scaling solution that enables fast and cheap transactions without sacrificing Layer 1’s security. At the moment, Optimism is partially rolled out and has started integrating with a few selected partners like Synthetix. 

Uniswap on Layer 2 should be able to attract even more users who might have been priced out by high gas fees on Layer 1.

Exchanges enabling withdrawals to Optimism would be another big step towards the quick adoption of V3 on Layer 2.

On top of the V3 launch, an imminent full launch of Optimism will clearly be another highly anticipated event to wait for.  

Besides this, the migration from V2 to V3 will be done on a fully voluntary basis. In case of V1 to V2 migration, it took just over 2 weeks for V2 to surpass V1’s liquidity. It would be also interesting to see if Uniswap’s governance decides to further encourage LPs by voting in some kind of incentives only present in V3 – maybe another liquidity mining program? 

With the super high capital efficiency of V3, even if the existing liquidity is split between V2, V3 and V3 on Optimism, it should still be way more than enough to facilitate trading with low slippage across all of these 3 protocols. 

One challenge of V3 is that providing liquidity may become a bit harder, especially for less sophisticated users. Choosing a wrong price range may magnify the chances of being affected by impermanent loss and it will be interesting to see a development of third party services that could help with choosing optimal strategies for allocating liquidity. 

So what do you think about Uniswap V3? Will this be a game-changer in the AMM space? Will Uniswap on Optimism bring even more users to DeFi?

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

Finematics is also now participating in Round 9 of Gitcoin Grants based on the quadratic funding mechanism where even the smallest contribution matters. If you’d like to show your extra support, check out this link here.

]]>
https://finematics.com/uniswap-v3-explained/feed/ 0
History Of DeFi – From Inception To 2021 And Beyond https://finematics.com/history-of-defi-explained/?utm_source=rss&utm_medium=rss&utm_campaign=history-of-defi-explained&utm_source=rss&utm_medium=rss&utm_campaign=history-of-defi-explained https://finematics.com/history-of-defi-explained/#respond Mon, 04 Jan 2021 19:32:53 +0000 https://finematics.com/?p=1198

So what’s the story behind Decentralized Finance? How has all of this started? What happened in DeFi in 2020? And where are we going in the future? You’ll find answers to these questions in this article.  

Let’s start from the beginning. 

Although there is no one agreed-upon date when decentralized finance was born, there were a few important events that made DeFi possible. 

Bitcoin 

The first of them was the creation of Bitcoin in 2009 by Satoshi Nakamoto. 

Despite whether Bitcoin should be classified as DeFi or not, its inception was the key enabler for the whole cryptocurrency industry which decentralized finance is part of. 

Bitcoin also allows for sending payments around the world in a decentralized fashion and payments is one of the areas of finance – looks like DeFi to me. 

But most importantly, Bitcoin enabled the creation of Ethereum – a default blockchain for all top DeFi protocols. 

Ethereum

Although sending Bitcoin around the world is cool – finance doesn’t stop there. Every robust financial system needs a set of other important services such as lending, borrowing, trading, funding or derivatives. 

Bitcoin, with its simple and limited language called Script, was just not suitable for these kinds of applications. Script’s limitations were one of the most important factors that contributed to the creation of Ethereum by Vitalik Buterin. 

Ethereum launched in 2015 and quickly started attracting more and more developers who wanted to build all kinds of decentralized applications – ranging from games, such as CryptoKitties, to financial applications. 

Ethereum, with its Turing-complete programming language Solidity and the ERC20 standard for creating new tokens, quickly became a go-to smart contract platform to build on.

Maker

This leads us to one of the oldest DeFi projects on Ethereum – Maker.

Maker is a protocol that allows for creating a decentralized stable coin – DAI. The project was formed in 2014 by Rune Christensen who was inspired by another project BitShares – a blockchain created by Dan Larimer.

Development of Maker was funded by Venture Capital and was eventually launched at the end of 2017. The first iteration of the protocol – Single Collateral DAI – supported only ETH as collateral. This was later expanded to Multi Collateral DAI that was launched at the end of 2019. 

Maker remains one of the most important projects in DeFi and is clearly one of the early pioneers of the whole decentralized finance space. 

EtherDelta

Another project worth mentioning that was really popular in 2017 was EtherDelta. 

EtherDelta was one of the first decentralized exchanges built on Ethereum that allowed for a permissionless exchange of ERC20 tokens. 

The exchange was based on an order-book. As we know, building order-book exchanges on layer 1 is hard and usually results in poor user experience. Despite that, EtherDelta was one of the most popular exchanges for trading different ERC20 tokens, especially during the ICO era. 

Unfortunately, the exchange was hacked at the end of 2017. The hacker gained access to EtherDelta frontend and proxied the traffic to a phishing site – scamming the users for around $800k. 

On top of this, the founder of EtherDelta was charged by the SEC for running an unregulated security exchange in 2018. Which was pretty much a nail in the coffin.

ICOs

Also during 2017, one of the first big use cases for Ethereum – ICOs – became prevalent. 

New projects, instead of raising money using traditional methods, started offering their own tokens in exchange for ETH. Although the idea of decentralized fundraising was not bad in theory, it resulted in multiple overhyped projects raising way too much money without anything to show besides a few pages of a whitepaper. 

In the plethora of ICOs, there were also a lot of projects that we’d today classify as DeFi. 

Some of the most notable DeFi projects from the ICO era were:

  • Aave – lending and borrowing 
  • Synthetix (previously known as Havven) – a liquidity protocol for derivatives 
  • REN (previously Republic Protocol) – a protocol for providing access to inter-blockchain liquidity 
  • Kyber Network – an on-chain liquidity protocol 
  • 0x – an open protocol that enables the peer-to-peer exchange of assets
  • Bancor – another on-chain liquidity protocol

It’s interesting to see that despite the bad reputation of 2017 ICO mania, some of the projects that emerged back then are now considered the top protocols in DeFi. 

One of the main breakthroughs at that time was the idea of users interacting with smart contracts containing pooled funds from multiple users, rather than interacting directly with other users. 

This basically created a new “user-to-contract” model that was more suitable for decentralized applications as it didn’t require as many interactions with the underlying blockchain as the user-to-user model. 

After the ICO mania was over and the bear market kicked in, DeFi experienced a relatively quiet period – at least this is how it looked from the outside. In reality, behind the scenes, major DeFi protocols were being built. 

I usually call this period of time “Before COMP”.

We’re going to learn later why Compound’s COMP token liquidity mining was a major breakthrough in DeFi. 

Before we get to this, let’s first explore a few other important protocols and events that happened during that seemingly quiet period of time. 

Before COMP

On the 2nd Nov 2018, the initial version of Uniswap was published to the Ethereum mainnet. This was the culmination of over a year’s worth of work by its creator Hayden Adams. 

Uniswap is clearly one of the most important projects in the DeFi space. In contrast to EtherDelta, Uniswap was built on the concept of liquidity pools and automated market makers. Leveraging again the previously discussed user-to-contract model. 

The first version of Uniswap was entirely funded by a grant from the Ethereum Foundation. 

In July 2019, another important event happened. Synthetix launched the first liquidity incentive program – a mechanism that later became one of the key catalysts for the DeFi Summer of 2020. 

Also, multiple other DeFi projects launched their protocols on the Ethereum mainnet between 2018 and 2019. These included Compound, REN, Kyber and 0x.

Black Thursday

On 12th March 2020, the price of ETH sharply dropped by more than 30% in less than 24 hours as a result of fears over the global pandemic. 

This was one of the biggest stress tests for the still-nascent DeFi industry. The Ethereum gas fees raised dramatically to over 200 gwei (which was really high at that time) as a result of multiple users trying to increase their collateral in various loans or trying to trade between different assets. 

One of the most affected protocols by this event was Maker. The wave of liquidations caused by users’ ETH collateral losing value resulted in the Keeper bots – external players responsible for liquidations – being able to bid 0 DAI for the auctioned ETH collateral. This led to a shortfall of around $4M worth of ETH that was later accommodated by creating and auctioning additional Maker’s MKR tokens. 

In the end, even though events like Black Thursday can be quite severe, they usually result in the strengthening of the whole DeFi ecosystem making it more and more antifragile. 

This brings us to the major period of DeFi growth also called the “DeFi Summer”. 

DeFi Summer

The main catalyst for DeFi Summer was the liquidity mining program of COMP tokens launched by Compound in May 2020. 

DeFi users started being rewarded for lending and borrowing on Compound. The extra incentives, in the form of COMP tokens, resulted in supply and borrow APYs for different tokens going up dramatically. This also enabled the development of yield farming as users were incentivised to keep switching between borrowing and lending different tokens to achieve the best yield possible. 

This event also initiated a wave of other protocols, distributing their tokens via liquidity mining and creating more and more yield farming opportunities. 

It also created Compound governance, where users with COMP tokens could vote on different proposed changes to the protocol. Compound’s governance model was later reused by multiple other DeFi projects. 

This brings us to another major DeFi protocol – Yearn Finance. 

Yearn, developed by Andre Cronje in early 2020, is a yield optimiser that focuses on maximising DeFi capabilities by automatically switching between different lending protocols.

To further decentralize Yearn, Andre decided to distribute a governance token – YFI – to the Yearn community in July 2020.

The token was fully distributed via liquidity mining – no VCs, no funder rewards, no dev rewards. This model attracted a lot of support from the DeFi community, with money flowing into the incentivised liquidity pools topping $600M in locked value. 

The token price itself started its parabolic run from around $6 when it was first listed on Uniswap, to over $30,000 per token less than 2 months later. 

Like with pretty much all groundbreaking projects in DeFi, Yearn’s success was quickly followed by multiple other teams launching similar projects with a few minor alterations. 

Another project that started gaining more and more traction, thanks to its unique elastic supply model, was Ampleforth.

This model was very quickly borrowed and reiterated on by another DeFi protocol – Yam. 

Yam, after only 10 days of development, was launched on the 11th of August 2020.

YAM tokens were distributed in the spirit of YFI and the protocol quickly started attracting a lot of liquidity.

The protocol aimed at building interest in strong DeFi communities by rewarding holders of COMP, LEND, LINK, MKR, SNX and YFI for staking their tokens on the Yam platform.

Just one day after the launch, with $0.5B of total value locked in the protocol, a critical bug in the rebase mechanism was found. The bug affected only a portion of liquidity providers in one of the pools – yCRV-YAM – but this was enough for people to lose interest in Yam despite their later attempts to relaunch the protocol.

Then comes SushiSwap. Launched at the end of August 2020 by an anonymous team, the protocol introduced a new concept of a vampire attack that aimed at syphoning liquidity out of Uniswap. 

By incentivising liquidity providers of Uniswap with Sushi tokens, SushiSwap was able to attract as much as $1B of liquidity. 

After some drama with the main SushiSwap developer ChefNomi selling his entire stake of SUSHI tokens, the protocol was eventually able to migrate a lot of Uniswap’s liquidity onto their new platform. 

During the DeFi Summer, there were a lot of other projects of varying quality being launched. Most of them were just iterations of existing open-source projects trying to benefit from the over-exuberance in a completely new industry. 

Following Yam and Sushi, there was a bunch of other projects named after different kinds of foods being launched. We had Pasta, Spaghetti, Kimchi, HotDog and others – collectively named as food defi or food finance. Pretty much all of them failed after a day or two of interest. 

One of the last major events of DeFi Summer was the launch of the Uniswap token – UNI. All the previous users and liquidity providers of Uniswap were rewarded with a retrospective airdrop worth well over $1k. On top of that, Uniswap started its liquidity mining program across 4 different liquidity pools and attracted more than $2B in liquidity. Most of which was taken back from SushiSwap.

During DeFi Summer all of the key DeFi metrics improved dramatically. 

Uniswap’s monthly volume went from $169M in April 2020 to over $15B in September 2020. A massive increase of almost 100x.

Total value locked in DeFi went from $800M in April to $10B in September. An over 10x increase. 

The amount of Bitcoin moved to Ethereum went from 20,000 in April to almost 60,000 in September. A 3x increase. 

DeFi Winter

DeFi’s parabolic ascent was, of course, not sustainable long term. The market sentiment quickly changed at the beginning of September 2020. Major DeFi tokens started sharply losing their value. The yields from liquidity mining that are derived from the value of the distributed tokens also became lower and lower. The DeFi Winter has come.

The negative sentiment lasted throughout September and October despite the DeFi ecosystem still being very active with developers continuing to build new DeFi protocols. 

The DeFi market finally found its bottom in early November with some of the top DeFi protocols trading 70-90% lower than their all-time highs just a couple of months earlier.

After a quick rebound of more than 50% the DeFi market started trending up again. 

Interestingly, during the DeFi Winter, the Uniswap volume still remained much higher than it was in early 2020. Also, the total value locked in DeFi kept trending upwards topping $15B at the end of the year. 

This was all despite multiple hacks that haunted the DeFi industry throughout 2020 – bZx, Harvest, Akropolis, Pickle, Cover to name just a few.

At the end of 2020 with Bitcoin breaking its previous 2017 all-time high, it looks like DeFi is preparing for another parabolic run. 

Future

Looking further into 2021 and beyond, the future of DeFi is bright. 

DeFi developers keep building new innovative projects. 

Much needed scaling is also coming in the form of Ethereum 2.0, layer 2 solutions and even other blockchains. This will allow for a new set of users to start participating in DeFi. It will also help with discovering new use cases that were previously just not possible due to high network fees. 

Bringing new, more traditional assets into DeFi by either tokenizing them or creating their synthetic versions will also open up completely new opportunities. 

Competition between DeFi on Layer 2, DeFi on Ethereum 2.0, DeFi on Bitcoin and DeFi on other chains will also play a big role. Interoperability protocols and cross-chain liquidity may become really important.

Other areas, such as credit delegation and undercollateralized or non-collateralized loans, are also being explored. 

This will all become clear in 2021 and beyond. 

So what is your favourite part in the history of decentralized finance? Where do you think this space is going in 2021? 

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

]]>
https://finematics.com/history-of-defi-explained/feed/ 0
Is Yield Farming Dead? https://finematics.com/is-yield-farming-dead/?utm_source=rss&utm_medium=rss&utm_campaign=is-yield-farming-dead&utm_source=rss&utm_medium=rss&utm_campaign=is-yield-farming-dead https://finematics.com/is-yield-farming-dead/#respond Mon, 19 Oct 2020 19:39:27 +0000 https://finematics.com/?p=1042

So is Yield Farming dead? Are there any good farming opportunities left? And when are 1000% APYs coming back? We’ll answer all of these questions in this article. 

Yield Farming & Liquidity Mining

Before we jump into the main topic, let’s quickly recap what yield farming actually is. 

Yield Farming, in essence, is a way of trying to maximise a rate of return on capital by leveraging different DeFi protocols. Yield farmers try to chase the highest yield by switching between multiple different strategies. If the strategy doesn’t work anymore or if there is a better strategy available the yield farmers move their funds around. 

Liquidity mining plays a big role in yield farming to such an extent that sometimes these two concepts are used interchangeably. Liquidity mining is a process of distributing extra tokens to the users of a protocol, for example, Compound distributing COMP tokens to lenders and borrowers on their platform or Uniswap distributing UNI tokens to their liquidity providers. 

If you haven’t read it yet, I’d recommend reading my other article on Yield Farming to understand these concepts even better.

Where is the yield coming from? 

To answer our main questions, we have to first understand where the farming yield is coming from.

There are a few options where the yield can be generated in defi.

The first one is lending. You can lend your coins on platforms such as Compound or Aave and receive usually a single-digit APY on your assets. You can also use Yearn Finance to automate switching between lending protocols with the highest APY. 

The next one is providing liquidity to liquidity pools. You can supply your coins to platforms such as Uniswap, Balancer or Curve and start generating extra money by collecting fees on trades going through the pool. This usually also yields a single-digit APY on your assets. You also need to make sure you understand what impermanent loss is. 

Now, it’s time for the most lucrative way of generating a yield on your assets in decentralized finance – the previously mentioned liquidity mining. 

Liquidity mining is the biggest enabler of high yields in yield farming. This is because the extra tokens that are received can be instantly sold for profit, boosting the APYs. 

Let’s take Uniswap’s UNI token liquidity mining program as an example that currently yields 23% in their ETH-DAI liquidity pool. Yield farmers can supply their ETH and DAI to a liquidity pool and start receiving UNI tokens that can be later sold for, let’s say, ETH or a stable coin, greatly improving their APY generated from the liquidity pool fees. 

Liquidity mining was previously able to bring crazy high APYs. Even as high as 2500% in Sushi or Yam farming. 

So why was that even possible before? 

The answer is fairly simple – there was a high demand for the tokens that were being distributed.  

To illustrate this, let’s have a look at a quick example. 

Project A, a fork of another well-known project, creates a new token – token A and distributes it via liquidity mining. After the initial hype, people quickly realise that Project A doesn’t bring much value to the decentralized finance space and start selling their tokens A rapidly. 

If this happens the yield on Project A’s liquidity mining program collapses as the farmers can only sell their tokens for a very little amount of money. 

Project B, on the other hand, is a well-known project that just started its liquidity mining program by distributing token B. Token B is in demand as investors believe in a long term value proposition of Project B and they think that token B will appreciate in value over time.

In this case, high demand from investors is met with high supply caused by yield farmers selling their token B. 

Market Sentiment

On top of the viability of a project, a general market sentiment also plays a huge role. In a down-trending market, the demand for all the tokens decreases. This, of course, means less demand for the tokens that are being distributed by liquidity mining, hence lower APYs. 

So if liquidity mining requires a constant flow of new capital, you may ask a question – is this some kind of a ponzi scheme? 

Not really, liquidity mining just reacts to the natural supply and demand of the tokens, similarly to the token prices. 

Bear Market -> higher supply than demand -> lower prices -> lower yields 

Bull Market -> higher demand than supply -> higher prices -> higher yields 

On top of that, good projects may be reluctant to even start their liquidity mining programs when the market sentiment is negative, so there are fewer opportunities available. This is kind of similar to companies not doing their IPOs during a recession. 

Is Yield Farming Dead

Okay, so let’s answer our main question here – is yield farming dead? 

Probably, you already know the answer to this question by now. 

No, yield farming is not dead, it just goes through the same cycles as the whole crypto market. 

The fact that yield farming is not dead, doesn’t guarantee the craziness of farming food tokens with 1000% APY coming back. In fact, we can see new projects iterating on the concept of liquidity mining and trying to improve different aspects of it.

Most projects that want to distribute their tokens have to find an optimal way of doing so without flooding the market with tokens and causing a constant selling pressure. This is important even in an up-trending market.

One way of reducing the selling pressure is to introduce additional vesting of the newly distributed tokens. 

Opportunities Left 

So are there any opportunities left in a down-trending market? 

Yes, there are still some good projects going through their liquidity mining program. The yield, although not as high as it used to be, can still be much higher than the yield generated by just lending your tokens. 

Uniswap’s UNI token liquidity mining program, with over $2B of total value locked, is probably the safest option at the moment. 

It offers between 12-24% APY, depending on the liquidity pool. 

SushiSwap still offers between 25% and as high as 400% APY, depending on the pool. 

Index Coop is another interesting example with 60% on ETH-DPI Uniswap LP tokens. DPI is a DeFi Pulse Index that represents 11 top defi tokens, so if you’re bullish on both ETH and DeFi this could be a good option for you. 

There is also a lot of other fairly popular, but more risky options such as Pickle, Core or Ampl. In these projects, the highest APY is usually generated by participating in a pool that requires holding their corresponding token, also known as Pool 2. The main risk here is impermanent loss, especially in a down-trending market. 

For example, although you can get 168% APY on the PICKLE/ETH pair, you are additionally exposed to the price of PICKLE. If the price of PICKLE starts going down, you’ll lose some your ETH because you are supplying liquidity to the 50/50 PICKLE/ETH Uniswap pool.

There are also some other interesting options available on layer 2 platforms, such as Honeyswap on xDai. In the future, I’d expect to see more and more liquidity mining programs being launched on layer 2 platforms, with the aim of attracting more users from the base Ethereum layer (layer 1). 

Of course, before participating in any of these yield farming options make sure you do your own due diligence, including assessing smart contract and admin key risks and making sure to understand the impact of impermanent loss on your supplied liquidity. 

So what do you think about the current state of yield farming and its future potential? And what are your favourite liquidity mining programs?

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

]]>
https://finematics.com/is-yield-farming-dead/feed/ 0
A Short Story of Uniswap and UNI Token. DeFi Explained https://finematics.com/uniswap-uni-token-explained/?utm_source=rss&utm_medium=rss&utm_campaign=uniswap-uni-token-explained&utm_source=rss&utm_medium=rss&utm_campaign=uniswap-uni-token-explained https://finematics.com/uniswap-uni-token-explained/#respond Mon, 21 Sep 2020 11:50:22 +0000 https://finematics.com/?p=958

So what’s the story behind Uniswap – one of the most important protocols in DeFi? And why was the UNI token probably one of the best-distributed tokens ever? You’ll find answers to these questions in this article.

Uniswap

Uniswap is clearly one of the most important and the most discussed projects in the defi space. At its core, Uniswap is a protocol for decentralized exchange of tokens on the Ethereum blockchain. The Uniswap protocol is deployed as a set of smart contracts and it’s completely decentralized, permissionless and censorship-resistant. 

Uniswap is built on the concept of liquidity pools and automated market makers or, to be precise, a constant product market maker. If you’d like to learn more about the mechanics of the protocol, check out my article on liquidity pools which uses Uniswap as an example. You can read it here

Back to the main story.

Uniswap V1

The initial version of Uniswap was published to the Ethereum mainnet on 2nd Nov 2018. This was the culmination of over a year’s worth of work by its creator Hayden Adams. 

What is super interesting, is the fact that Hayden, who used to work as a mechanical engineer, started Uniswap without any prior programming knowledge. He learnt how to write smart contracts while working on the initial version of the Uniswap protocol. 

The initial idea for implementing an automated market maker came from Hayden’s friend, Karl, who was impressed by one of Vitalik Buterin’s blog posts describing a theory behind a constant product market maker. 

At the time of building the first version of the Uniswap protocol, EtherDelta was pretty much the only decentralized exchange with some traction.  EtherDelta, although quite popular at that time, was based on the order book model that doesn’t fit very well into the Layer 1 blockchain protocol like Ethereum. Besides that, EtherDelta had a really unintuitive UX that resulted in very poor user experience and lack of liquidity. 

While working on optimising smart contracts and preparing for a potential mainnet launch, Hayden applied for an Ethereum Foundation grant that was later accepted in July 2018. The money from the grant allowed for auditing Uniswap’s smart contracts by a company called Runtime Verification. The initial audit by Runtime Verification resulted in adding extra safety checks and re-working some of the math operations to minimise the rounding error. 

On top of that, a full formal verification was also underway. Before fully launching the protocol, Hayden decided to rebuild the user interface for even better user experience.

The first version of the protocol was launched on the last day of the Devcon 4 conference with $30,000 worth of the initial liquidity across 3 different tokens. 

The protocol quickly gained a lot of traction which resulted in an initial seed investment that allowed Uniswap’s team to work on the second version of the protocol.

Uniswap V2

In May 2020, Uniswap launched a second version of the protocol called Uniswap V2.

The main feature was the addition of the ERC20/ERC20 liquidity pools. Before V2, each liquidity pool had to consist of ETH as one of the currencies, so, for example, to trade from USDC to DAI, the user would have to trade their USDC for ETH and ETH for DAI which usually resulted in higher gas fees and more slippage. 

Offering ERC20/ERC20 pools was also better for liquidity providers who didn’t want to supply ETH and expose themselves to impermanent loss. V2 had also a few other features including on-chain price feeds and flash swaps. 

An interesting fact is that all of the V2 smart contracts were written in Solidity. This can be compared to V1 which was entirely written in Vyper. Uniswap V1 was actually one of the first projects entirely written in Vyper. 

Due to its decentralized and permissionless nature, the first version of the protocol was still actively used alongside V2 for some time, regardless of the Uniswap team encouraging liquidity providers to migrate their liquidity to V2. This also shows the true power of unstoppable code. 

In August 2020 the Uniswap team raised $11M in series A from a few notable VCs including Andreessen Horowitz, USV, Paradigm and Version One. The funds were used to grow the team and build Uniswap V3 which will dramatically increase the flexibility and capital efficiency of the protocol.

SushiSwap Competition

In May 2020, with an increased interest in DeFi, the trading volume on Uniswap started picking up. It was not unusual anymore to see over $1M in daily volume and around $10-20M in provided liquidity. 

In August, with all the yield farming craze going on, we were looking at around $150M in daily volume and around $300M in provided liquidity – a truly exponential growth. The Uniswap volume started getting closer and closer to the volume of top centralized exchanges, overtaking some of the most popular ones such as Kraken. 

SushiSwap also came into play at the end of August. SushiSwap was aiming at directly competing with Uniswap by forking the project, adding a reward for Uniswap’s liquidity providers and eventually stealing Uniswap’s liquidity into the SushiSwap platform. You can learn more about this process, also called a vampire attack, in my other article here

The SushiSwap yield farming resulted in Uniswap’s liquidity going from around $300M to almost $2B in a matter of days. On top of that, the daily trading volume was ranging between $500M and $1B, at some point overtaking Coinbase’s daily volume. This was an incredible achievement, especially considering that Uniswap had only around 10 employees compared to over 1000 employees at Coinbase. 

Before the liquidity migration from Uniswap to SushiSwap started, there was still around $800M worth of Uniswap’s liquidity staked on the SushiSwap platform. This was also the time when Hayden hinted at a potential Uniswap token. 

Although the SushiSwap migration resulted in Uniswap’s total liquidity dropping from almost $2B to as low as $0.5B, the remaining liquidity was still higher than a couple of weeks earlier before the SushiSwap project even started. The trading volume also remained strong at around $300-500M per day.

UNI Token

On 16th September, Uniswap announced a launch of their new token – UNI. The most surprising part of the launch was how some of the tokens were retrospectively allocated. Everyone who had used Uniswap, even once before 1st September, was eligible to claim their 400 UNI tokens that were worth around $1200 on the day of the announcement. 

A couple of days later, the UNI tokens were actively traded across both centralized and decentralized exchanges with the token price going as high as $8 making the initial 400 UNI reward worth around $3200. The UNI tokens were distributed to around 50,000 Ethereum addresses making them one of the most widely distributed tokens in the space. 

On top of that, the liquidity providers of the protocol were also retrospectively rewarded with extra UNI tokens.  

A total of 1 billion UNI tokens was allocated in the following way. 

After 4 years, there will be a perpetual inflation rate of 2% per year to ensure continued participation and contribution to Uniswap at the expense of passive UNI holders. 

On top of that, Uniswap announced 4 incentivised liquidity pools that will be rewarding liquidity providers with extra UNI tokens. This resulted in attracting millions of dollars of new liquidity. At the time of writing this article, there is over $2B worth of liquidity locked in the protocol. UNI holders can also vote to add more incentivised pools after an initial 30-day governance grace period is over. 

By launching a token, the Uniswap team wanted to further decentralize the protocol making it a publicly-owned and self-sustainable financial infrastructure while still continuing to protect its indestructible and autonomous qualities and working on Uniswap V3. 

The token holders will be able to participate in Uniswap’s governance by voting on different proposals or delegating their votes to a third party. 

And, as with pretty much all of the governance tokens, there is a lot of speculation on the potential future revenue share from the protocol with the UNI holders. 

So what do you think about Uniswap’s UNI token and the way that it was distributed?

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

]]>
https://finematics.com/uniswap-uni-token-explained/feed/ 0
What is Impermanent Loss? DEFI Explained https://finematics.com/impermanent-loss-explained/?utm_source=rss&utm_medium=rss&utm_campaign=impermanent-loss-explained&utm_source=rss&utm_medium=rss&utm_campaign=impermanent-loss-explained https://finematics.com/impermanent-loss-explained/#respond Fri, 21 Aug 2020 16:39:33 +0000 https://finematics.com/?p=896

Impermanent Loss

Have you ever provided liquidity to a liquidity pool just to realise that some of your coins have gone missing? In this article, we’ll learn what “impermanent loss” is and how it can affect liquidity providers’ profits.

In essence, impermanent loss is a temporary loss of funds occurring when providing liquidity. It’s very often explained as a difference between holding an asset versus providing liquidity in that asset. Impermanent loss is usually observed in standard liquidity pools where the liquidity provider (LP) has to provide both assets in a correct ratio, and one of the assets is volatile in relation to the other, for example, in a Uniswap DAI/ETH 50/50 liquidity pool.

If ETH goes up in value, the pool has to rely on arbitrageurs continually ensuring that the pool price reflects the real-world price to maintain the same value of both tokens in the pool. This basically leads to a situation where profit from the token that appreciated in value is taken away from the liquidity provider. At this point, if the LP decides to withdraw their liquidity, the impermanent loss becomes permanent.

Example

The easiest way to fully understand impermanent loss is to go through a quick example.

Let’s assume an LP provides liquidity to a DAI/ETH Uniswap 50/50 pool. To supply liquidity to a 50/50 pool, the LP has to provide an equal value of both tokens to the pool.

So far, so good, the value of both tokens is the same.

The price of ETH goes up on an external venue such as Coinbase. Now Coinbase’s ETH price is $550. This is where other market participants, called arbitrageurs, come into play. An arbitrageur notices the price difference between Coinbase and Uniswap and sees that as an opportunity for arbitrage that is basically an opportunity to make a profit.

Uniswap uses a constant product market maker to maintain a correct ratio of tokens in the pool. So as more ETH is being bought from the pool, the higher the price of ETH becomes. The arbitrageur buys cheaper ETH on Uniswap until there is no more price discrepancy between the exchanges. Let’s see how much ETH the arbitrageur has to buy to make this happen.

By plugging our external (Coinbase) price into a few formulas that can be derived from the constant product market maker formula, we can see that the point where the Uniswap ETH price will be at $550 is when there are 10,488.09 DAI and 19.07 ETH in the pool. So the arbitrageur is basically able to buy 0.93 ETH in order to achieve equilibrium between Uniswap’s and Coinbase’s ETH price, costing 488.09 DAI and achieving the average price of 524.83 DAI per ETH. Bought ETH can be instantly sold for DAI or any other USD based stable coin on an external venue for $550. The arbitrageur just earned ~25USD minus the fees.

Let’s see how this affected our liquidity provider.

As we can see the LP would’ve had $23.41 more if they just held their assets without providing liquidity. That $23.41 is basically the LPs impermanent loss.

Impermanent loss is called impermanent because at this point the LP lost $23.41 only on paper. If the LP doesn’t withdraw their liquidity and the price of ETH goes back to $500, the impermanent loss is cancelled back to 0. On the other hand, if the LP decided to withdraw their liquidity, they would realise their loss of $23.41, permanently.

LPs profit

Ok, now that we understand what impermanent loss is, let’s see how it can take away LPs profit as the value of one asset increases in relation to the other.

We can see that, for example, if the price of the asset in the pool goes up by 500% the LPs would experience a 25% impermanent loss. Here is the link to the article with the chart and other useful calculations.

So if impermanent loss can take away so much profit, what is the incentive for liquidity providers to provide liquidity in the first place? To understand that, let’s see how LPs can make money on their capital.

In the perfect world with no impermanent loss, the LPs would just be collecting money from trading fees. For example when it comes to Uniswap, each trade that goes through a liquidity pool pays a 0.3% fee that is proportionally distributed to the LPs of that pool. 

This basically means that the LP can still make money even when experiencing impermanent loss under the condition that impermanent loss < collected fees.

On top of that, a lot of liquidity pools provide additional incentives for LPs by offering liquidity mining programs. Liquidity mining, in essence, is a way of rewarding LPs with extra tokens for providing liquidity to certain pools or using a protocol. The value of the additional tokens in some cases can completely negate the value lost by impermanent loss, making providing liquidity highly lucrative. If you want to learn more about yield farming and liquidity mining you can check out this article.

Other Pools

So, how about providing liquidity to other pools outside of Uniswap? Would that also result in impermanent loss? Let’s see a few examples. 

Curve pools, for instance, only contain assets that should hold similar if not the same value. 

These could be different stable coins like USDC and DAI or different flavours of the same token such as sBTC, renBTC and wBTC. The risk of impermanent loss in such pools is greatly minimised as there is no asset in the pool whose value is volatile in relation to the other. This is also why Curve’s liquidity pools, or to be more generic, all the liquidity pools that hold stable assets usually attract way more capital than the pool with non-stable assets. 

Another example is Balancer that offers pools with arbitrary weights outside of the standard 50/50 weighted model. This means that, for example, if an LP wants to maintain a high exposure to a certain asset they can participate in a pool where one token has much higher weight than the other one such as 80/20 or even 98/2 pool. This can also reduce the impact of impermanent loss depending on the weights in the pool. The higher the weight of a token in the pool, the lesser the difference between holding the token and providing liquidity in the token becomes.

Another way of fighting with impermanent loss was recently introduced by Bancor. Bancor V2 pools can adjust their weights automatically based on the external prices coming from price oracles. This can completely mitigate impermanent loss even in the pools with volatile assets. You can learn more about Bancor V2 in this article

So have you ever been affected by impermanent loss? And what is your favourite strategy to deal with it? Comment down below.

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

]]>
https://finematics.com/impermanent-loss-explained/feed/ 0
How Do Liquidity Pools Work? DeFi Explained https://finematics.com/liquidity-pools-explained/?utm_source=rss&utm_medium=rss&utm_campaign=liquidity-pools-explained&utm_source=rss&utm_medium=rss&utm_campaign=liquidity-pools-explained https://finematics.com/liquidity-pools-explained/#respond Mon, 20 Jul 2020 11:41:54 +0000 https://finematics.com/?p=771

Intro

What are Liquidity Pools? How do they work? And why do we even need them in decentralized finance? Also, what are the differences between liquidity pools across different protocols such as Uniswap, Balancer or Curve? We’ll be going through all of this in this article.

Before we start, if you’re new to DeFi you may want to read my introduction to decentralized finance article first. Also, you may want to subscribe to Finematics on Youtube.

Liquidity Pools

Liquidity pools, in essence, are pools of tokens that are locked in a smart contract. They are used to facilitate trading by providing liquidity and are extensively used by some of the decentralized exchanges a.k.a DEXes.

One of the first projects that introduced liquidity pools was Bancor, but they became widely popularised by Uniswap.

Before we explain how liquidity pools work under the hood and what automated market making is, let’s try to understand why we even need them in the first place.

Why Do We Need Liquidity Pools?

If you’re familiar with any standard crypto exchanges like Coinbase or Binance you may have seen that their trading is based on the order book model. This is also the way traditional stock exchanges such as NYSE or Nasdaq work.

In this order book model buyers and sellers come together and place their orders. Buyers a.k.a. “bidders” try to buy a certain asset for the lowest price possible whereas sellers try to sell the same asset for as high as possible.

For trades to happen, both buyers and sellers have to converge on the price. This can happen by either a buyer bidding higher or a seller lowering their price.

But what if there is no one willing to place their orders at a fair price level? What if there are not enough coins that you want to buy? This is where market makers come to play.

In essence, market makers are entities that facilitate trading by always willing to buy or sell a particular asset. By doing that they provide liquidity, so the users can always trade and they don’t have to wait for another counterparty to show up.

Okay, so why can’t we just reproduce something like this in decentralized finance?

The answer is – we can! It would just be really slow, expensive and pretty much always result in poor user experience.

The main reason for this is the fact that the order book model relies heavily on having a market maker or multiple market makers willing to always “make the market” in a certain asset. Without market makers, an exchange becomes instantly illiquid and it’s pretty much unusable for normal users. On top of that, market makers usually track the current price of an asset by constantly changing their prices which results in a huge number of orders and order cancellations that are being sent to an exchange.

Ethereum with a current throughput of around 12-15 transactions per second and a block time between 10-19 seconds is not really a viable option for an order book exchange. On top of that, every interaction with a smart contract cost a gas fee, so market makers would go bankrupt by just updating their orders.

How about the 2nd layer scaling then? Some of the 2nd layer scaling projects like Loopring look promising, but even they are still dependant on market makers and they can face liquidity issues. On top of that, if a user wants to make only a single trade they would have to move their funds in and out of the 2nd layer which adds 2 extra steps to their process.

This is exactly why there was a need to invent something new that can work well in the decentralized world and this is where liquidity pools come to play.

How Do Liquidity Pools Work?

Ok, so now that we understand why we need liquidity pools in decentralized finance, let’s see how they actually work.

In its basic form, a single liquidity pool holds 2 tokens and each pool creates a new market for that particular pair of tokens. DAI/ETH can be a good example of a popular liquidity pool on Uniswap.

When a new pool is created, the first liquidity provider is the one that sets the initial price of the assets in the pool. The liquidity provider is incentivised to supply an equal value of both tokens to the pool. If the initial price of the tokens in the pool diverges from the current global market price, it creates an instant arbitrage opportunity that can result in lost capital for the liquidity provider. This concept of supplying tokens in a correct ratio remains the same for all the other liquidity providers that are willing to add more funds to the pool later.

When liquidity is supplied to a pool, the liquidity provider (LP) receives special tokens called LP tokens in proportion to how much liquidity they supplied to the pool. When a trade is facilitated by the pool a 0.3% fee is proportionally distributed amongst all the LP token holders. If the liquidity provider wants to get their underlying liquidity back, plus any accrued fees, they must burn their LP tokens.

Each token swap that a liquidity pool facilitates results in a price adjustment according to a deterministic pricing algorithm. This mechanism is also called an automated market maker (AMM) and liquidity pools across different protocols may use a slightly different algorithm.

Basic liquidity pools such as those used by Uniswap use a constant product market maker algorithm that makes sure that the product of the quantities of the 2 supplied tokens always remains the same. On top of that, because of the algorithm, a pool can always provide liquidity, no matter how large a trade is. The main reason for this is that the algorithm asymptotically increases the price of the token as the desired quantity increases. The math behind the constant product market maker is pretty interesting, but to make sure this article is not too long, I’ll save it for another time.

The main takeaway here is that the ratio of the tokens in the pool dictates the price, so if someone, let’s say, buys ETH from a DAI/ETH pool they reduce the supply of ETH and add the supply of DAI which results in an increase in the price of ETH and a decrease in the price of DAI. How much the price moves depends on the size of the trade, in proportion to the size of the pool. The bigger the pool is in comparison to a trade, the lesser the price impact a.k.a slippage occurs, so large pools can accommodate bigger trades without moving the price too much.

Because larger liquidity pools create less slippage and result in a better trading experience, some protocols like Balancer started incentivising liquidity providers with extra tokens for supplying liquidity to certain pools. This process is called liquidity mining and we talked about it in our Yield Farming article.

The concepts behind liquidity pools and automated market making are quite simple yet extremely powerful as we don’t have to have a centralized order book anymore and we don’t have to rely on external market makers to constantly keep providing liquidity to an exchange.

Different Types of Liquidity Pools

The liquidity pools that we just described are used by Uniswap and they are the most basic forms of liquidity pools. Other projects iterated on this concept and came up with a few interesting ideas.

Curve, for example, realised that the automated market making mechanism behind Uniswap doesn’t work very well for assets that should have a very similar price, such as stable coins or different flavours of the same coin, like wETH and sETH. Curve pools, by implementing a slightly different algorithm, are able to offer lower fees and lower slippage when exchanging these tokens.

The other idea for different liquidity pools came from Balancer that realised that we don’t have to limit ourselves to having only 2 assets in a pool and in fact Balancer allows for as many as 8 tokens in a single liquidity pool.

Risks

And of course, like with everything in DeFi we have to remember about potential risks. Besides our standard DeFi risks like smart contract bugs, admin keys and systemic risks, we have to add 2 new ones – impermanent loss and liquidity pool hacks – more on these in the next articles.

Summary

So what do you think about liquidity pools? And as always, don’t forget to subscribe to Finematics on Youtube for more DeFi content.

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