As decentralised finance (DeFi) is slowly becoming more widely adopted around the world, being able to understand the technology behind DeFi allows for better security protocols to prevent fraud and lower the risks involved. 

One of the key building blocks that allow the DeFi ecosystem to thrive is liquidity pools. 


Why are Liquidity Pools Needed?

Central exchanges (such as the New York Stock Exchange) employ the order book model to track the prices at which people are willing to purchase or sell a particular financial asset in the traditional financial market. The asset is sold once the buyers and sellers have reached an agreement on the price (by allowing the asking and bidding prices to converge).

In a free market, however, there is not always sufficient liquidity (demand or supply) for exchanges to take place. In a centralised exchange, the involvement of a market maker solves this problem. Essentially, these market makers provide liquidity in the market by always being willing to buy and sell the financial asset. This way, the other participants in the market will always be able to trade in the market. 

While the inclusion of a market maker helps improve the liquidity in a centralised exchange, including market makers in DeFi systems is impractical. 

Firstly, as market makers are constantly cancelling and creating new buy and sell orders as the prices of the asset change, many of the popular blockchains will be unable to support the presence of a market maker. For example, Ethereum has a throughput of around 15 transactions per second whereas Bitcoin’s network only handles approximately 7 transactions per second. Combined with the fact that these cryptocurrencies often have long block times, using the market maker order book method would lead to long wait times and an inefficient market. 

Secondly, gas fees have to be paid when cryptocurrency is transferred and exchanged. And, because market makers are constantly making buy and sell trades in order to make the small profit between the buy and sell spread, having to pay the costly gas fees for every transaction would lead to market makers incurring large losses instead. 

As a result, rather than relying on market makers in a DeFi system, liquidity pools are employed to ensure that the market has enough liquidity.


What are Liquidity Pools and How Do They Work? 

Simply put, liquidity pools allow users to exchange their cryptocurrency tokens for another cryptocurrency for a nominal fee. 

Liquidity providers make this possible by putting two tokens (of equal value) into the liquidity pool. Through a smart contract mechanism, the liquidity providers will be able to earn the transaction fees paid by the users of the market. As a liquidity pool will try to keep the two tokens in a 50:50 ratio, each token swap that a liquidity pool facilitates will result in a price adjustment according to the predetermined pricing algorithm. 

With a liquidity pool set up, decentralised exchanges will be able to facilitate token exchanges without the need for a centralised order book system or a market maker.


The Risk Associated with Liquidity Pools

Just like other financial systems, DeFi comes with its own set of issues and certain inherent risks come with liquidity pool transactions. 

As liquidity pools require the two tokens held to be kept at a 50:50 ratio, they are susceptible to rug pull scams. In this form of exit scam, the scammer will create a new token and generate hype around it. After a significant number of individuals have exchanged other tokens for this scam token, the scammer will withdraw everything from the liquidity pools and cause the price of the scam token to drop to zero. 

While the scam strategy sounds simple, rug pull scams can earn scammers large amounts of money. In 2021 alone, over $7.7 billion worth of cryptocurrency tokens were lost by rug pull victims. 


How You Can Protect Yourself

As DeFi and blockchain technology continue to mature and grow, there will also be an increasing amount of scams and risks involved with the technology. However, with proper research and risk profiling strategies put into place, you can enjoy the advantages of DeFi and blockchains without putting yourself at risk.