June 8, 2023
Learn

Learn: What are Liquidity Pools?

Not only a foundational technology behind DeFi, liquidity pools are an essential part of many different segments of DeFi, such as; automated market makers (AMM), yield farming, credit/lending protocols, synthetic assets, on-chain insurance and much more. The idea itself seems like it could be very complicated, but it’s actually very simple.

A liquidity pool is basically a pool of everyones funds thrown together. But how does this pool of funds facilitate the highly complex functions that occur routinely in DeFi? Let’s dive into how liquidity pools can benefit the world of decentralized finance.

Decentralized Finance (DeFi) has exploded onto the scene in the past year, and has created a flurry of on-chain activity. Centralized exchanges used to absolutely dominate the market when it came to volumes, however decentralized exchanges have begun to rival centralized exchanges in trading volume. As of April 11th 2021, there is over $50bn locked up in DeFi applications across the industry, and there are no signs of slowing down. With impending regulations, and more and more users beginning to take their cryptocurrency ownership into their own hands, the decentralized finance industry is only expected to continue to expand at a rapid pace.

How exactly do Liquidity Pools make this possible?

The liquidity pools collection of funds are used to facilitate trading, lending, and many other functions in a decentralized manner. Many of DeFi’s most important applications use liquidity pools to function, such as Pancakeswap. On Pancakeswap, liquidity providers can earn rewards from trading fees by adding an equal amount of two tokens into a pool to create or enrich a money market. These money markets then allow users to trade between different tokens on the Pancakeswap trading interface

Because everyone has the ability to provide liquidity to a market, liquidity pools and AMM’s have made the process of earning rewards from your assets much more accessible.

One of the pioneers in the industry to implement liquidity pools was Uniswap. The concept then gained a tremendous amount of attention across the industry, and helped sprout a ton of different Uniswap forks. On Binance Smart Chain, the most popular exchange running liquidity pools is Pancakeswap.

How are liquidity pools better than order books?

Centralized exchanges function well for the most part. They are able to efficiently match orders, and facilitate trades routinely, albeit for a fee. To understand how liquidity pools are different, and better than the traditional order book model, it is important to understand how they both function.

The order book is a collection of all the currently open orders (buys, sells) for a given market, that are then matched together to facilitate a trade. The engine that runs this process is the heart of the centralized exchange.

The model decentralized exchanges use however is much more complex. Instead of a central entity holding any funds, decentralized exchanges have been able to create a process that can facilitate trades, without a central entity. This is done by users adding their assets in the form of liquidity pairs (example: CAKE/BNB LP) to the decentralized exchange’s liquidity pools. The liquidity pools then allow users to trade from A to B, no matter how many steps it takes in between to complete the trade. The one downside to using decentralized exchanges is paying for gas, or transaction fees, that you might not normally incur on a centralized exchange.

How do liquidity pools work?

On centralized exchanges, when you make a trade, there HAS to be a counter-party to facilitate the trade. Meaning….. it’s peer-to-peer, so if you want to sell something, someone has to be willing to buy it for your offer. Decentralized Finance and decentralized exchanges specifically have changed the game, by allowing for trading to occur without a counter-party required. This on-chain trading is powered by the liquidity pool innovation, allowing users to trade assets with pools of liquidity, instead of a counter-party.

Decentralized exchanges, instead of using a peer-to-peer method, use a peer-to-liquidity pool method of facilitating trades. Buyers don’t need sellers at that moment, to buy. Sellers don’t need buyers at that moment to buy. Instead there is an algorithm that maintains stability between assets in each market, to allow trades to occur.

For example: There is a CAKE/BNB LP pool, and a FUEL/BNB pool, and a user wants to trade their CAKE for FUEL. The decentralized exchange will take their cake, trade it for BNB in its CAKE/BNB market, and then take that BNB and trade it for FUEL from the FUEL/BNB market. Once this occurs, the individual markets then use an algorithm to balance out the price for the token.

Because there is no central entitry that is providing the assets to facilitate the trades, the liquidity has to come from somewhere. That’s where liquidity providers come along. When new projects launch, distributing tokens can be a very difficult problem. This problem has been solved by the liquidity mining approach. There has been a trend in the industry of projects launching using liquidity mining, which is minting new tokens and algorithmically distributing them proportionately to the share of each users stake in a project’s liquidity pool.

What are the weird tokens I get after depositing to a liquidity pool?

When providing tokens to liquidity pools, investors are often given tokens that represent their share in the liquidity pool. Some dApps or projects will then allow investors to deposit or stake these pool tokens into other farms or pools that can offer you even more rewards.

Decentralized Finance moves at a blazingly fast pace, and new innovations occur at a seemingly daily pace, and there are new and exciting technologies being developed and launched right now. These advancements will use liquidity pools, to do exciting new things, like tranching, mutual funds and many other exciting new advancements that allow investors to fine tune their desired risk / reward ratios.

What are the risks?

You may have heard of a concept called impermanent loss. Impermanent loss is a loss in dollar value compared to what you would have had if you had not joined a liquidity pool. Typically, the higher the risk of impermanent loss, the higher the reward APR/APY will be for providing liquidity.

The other risk is the normal smart contract risks involved with any project. Projects can have audits on their smart contracts, however there are never any guarantees that audits will catch all risks. While not extremely common, there are exploits that have been able to take funds from smart contracts, so it is important to understand the risks involved when using decentralized finance.

Some of the most common attack vectors for exploits on smart contracts are; when contract owners have the ability to make changes governing the rules, being able to migrate funds, and being able to mint more tokens than was supposed to be minted. It is important in the decentralized finance world to stay diligent, and watch out for any “rug pulls” or exit scams.

X