LP Tokens

At central exchanges such as Binance and Kraken, investors trade their fiat money in exchange for crypto, or they trade between different crypto trading pairs. However, these trades are only possible because there is sufficient liquidity on such exchanges. In decentralized finance (DeFi), there are no central exchanges and all trading is done through decentralized exchanges, better known as DEXs. These DEXs need liquidity before you use them to trade tokens. Once you provide liquidity to a specific liquidity pool (trading pair), you will receive LP tokens in return. But what are LP tokens and how do they work? Let's find out in this post!

Decentralized exchanges

Before we delve deeper into LP tokens, it is important to know the distinction between a central and a decentralized exchange. As the word implies, central exchanges are centrally controlled and usually also have sufficient volume and liquidity to enable trades on their platform. Note that you will always trade one digital asset for another. For example, you can buy Bitcoin (BTC) with fiat money, but you can also buy Bitcoin with Ethereum (ETH). This is all possible because there is sufficient volume on the central exchange.

In DeFi, things work differently. Traders depend on decentralized exchanges (DEXs), which in turn depend on investors. That's right, they depend on the liquidity that investors lock in the protocol. To enable traders to swap tokens and to keep token pairs in balance (for example, a 50:50 ratio), decentralized exchanges use automated market makers (AMMs).

Automated Market Maker (AMM)

An order book is used on central exchanges. You can place limit orders so that you can buy or sell assets at a certain fixed price. This price is determined by the buying or selling volume, also known as supply and demand. An AMM is, among other things, highly dependent on the liquidity of the protocol.

An AMM works in the same way as an order book in that there are trading pairs, the only difference being that you don't need a counterparty to execute the trade. Suppose you are willing to buy Bitcoin at a price of $35,000. This transaction can only be executed when someone is willing to sell Bitcoin at this price. Instead, an AMM works with smart contracts that enable all these transactions. We no longer speak of peer-to-peer transactions (P2P), but of peer-to-contract (P2C) transactions.

Liquidity

Each decentralized exchange is in turn dependent on the liquidity on the platform. The more liquidity and trading pairs available, the more attractive it is for an investor to complete his or her trade in this protocol. Liquidity is also a factor that is built up over the years. This is accompanied by possibilities and trust, among other things. Let's take a look at the liquidity of the most famous DEXs:

UniSwap

UniSwap was the first AMM and version V1 was launched in November 2018. If we consult the statistics at the top of the menu, we see that there is a total volume of more than 2 billion dollars.

PancakeSwap

PancakeSwap is the decentralized exchange built on the Binance Smart Chain (BSC). At the time of writing, PancakeSwap has total liquidity of no less than $4.69 billion. But not every DEX has that much liquidity. According to CoinMarketCap, there are now 70 decentralized exchanges and new ones are added regularly. And how does a DEX try to be successful? By guaranteeing sufficient liquidity.

Providing liquidity

A decentralized exchange is therefore dependent on liquidity. And this comes from investors because they in turn are going to provide their liquidity. The protocol promises very attractive interest rates for liquidity providers when they offer their digital tokens in the protocol. This makes it easier for others to trade and, in addition to this attractive interest, the liquidity providers usually also receive part of the transaction costs that are made on the platform.

Adding liquidity to a protocol is always based on a trading pair with a ratio of 50:50 in value. Suppose you want to add 0.5 ETH to a pool, with the stablecoin DAI as another asset. Suppose the price of Ethereum is currently at $2500, so 0.5 ETH is equivalent to $1250. This means that you still have to add $1250 to DAI. But how does the protocol know who added what? This contribution is paid out by means of LP tokens.

With the new update of UniSwap V3, it is no longer necessary for this split to be 50-50. It is possible to set a range to deviate from this ratio. With UniSwap V2, this ratio still applies.

What are LP Tokens

LP tokens or liquidity provider tokens are tokens that are issued to liquidity providers, who make their digital assets available to the AMM protocol on a decentralized exchange (DEX). By using smart contracts, you will receive these LP tokens in your wallet immediately after the transaction. These serve as a kind of proof of ownership that you have contributed to add liquidity.

As soon as you add liquidity to a pool, you get LP tokens in return. For example, if your stake is 1% of the entire pool, you will receive 1 LP token, if there are 100 LP tokens in total. Your investment is translated into a percentage of liquidity in the pool. Keep in mind that you can always lose money and your investment is not necessarily stored in the LP tokens. Your percentage of liquidity of the pool is stored in the tokens.

Example: You decide to add liquidity on PancakeSwap and you do this by depositing CAKE and BNB into a liquidity pool. For this you will receive CAKE-BNB LP tokens. Thus, the number of LP tokens you receive for this represents your share of liquidity pool of the trading pair CAKE-BNB. Then when someone trades on PancakeSwap, he or she pays a percentage fee for this trade. Part of this is added as liquidity, and you receive the remaining share as a reward.

These LP tokens represent your share of the pool. You can not trade with these LP tokens. The value of LP tokens is also less relevant. After all, you always exchange it for your underlying liquidity. However, what is possible is to use these LP tokens to achieve even more returns by depositing them in a vaults or farm.

The value of LP tokens

Although the value of your LP token is less interesting, it is useful to know how to determine this value. You can do this via various online tools, but it can also be done via manual calculation. To determine the value of your LP token, take the total value of pool and divide it by the number of LP tokens in circulation. You can check also this via EtherScan if you're providing liquidity on the Ethereum blockchain. If they take place on the Binance Smart Chain, you can visit https://bscscan.com/.

Sell ​​LP Tokens

Selling your LP tokens is done in the same way as buying them. After participating in a liquidity pool, you have received these LP tokens and are stored in your MetaMask or TrustWallet. You can sell them at any time. Go to the decentralized exchange where you provided liquidity and go to the relevant pool.

When you've added liquidity, the pools you've contributed to will automatically load. Here you can choose to sell your LP tokens again. When you do this, you sell your position in the liquidity pool and receive your tokens.

You can sell your LP tokens by re-entering the platform and into liquidity. The pools you participate in automatically load here. In the example of BNB-CAKE, you can immediately recover the liquidity. Confirm that you want to withdraw 100% of your liquidity from this pool and your request will be sent. Within minutes you will receive proof that you are officially no longer a liquidity provider. From now on you will no longer have LP tokens, but separate BNB tokens and CAKE tokens.

Yield Farming

Yield Farming is a very attractive reason for many to make the switch to decentralized finance. Beyond the decentralization aspect, we cannot deny that astronomical interest rates affect us. On the contrary. After adding liquidity, we received these LP tokens, and we can sometimes use them to get extra returns. Characteristic of DeFi is the use of APY, which stands for Annual Percentage Yield, whereby compound interest is used. In contrast to the traditional interest rate, this is very attractive and is often used in combination with liquidity providing. In the protocol you can often stake these LP tokens to get extra rewards.

Risks

Adding liquidity is not entirely without risks. Of course, the risks with stablecoins are much less than with other digital assets. The greater the risk, the greater the interest. Despite the less attractive percentages, adding liquidity based on two stablecoins can be a good investment, provided you are currently not getting returns on your currency anywhere else.

Impermanent losses

The biggest risk with DeFi is the chance of an impermanent loss. This is a term that you have most likely already come across and that everyone is warning you about. Impermanent loss refers to the chance of a temporary drop in the value of your currency due to the volatility in a trading pair. You should never underestimate the volatility of crypto.

Conclusion

LP tokens play an important role in DeFi. They act as a proof of ownership for liquidity providers who have deposited their tokens in to a liquidity pool. If it wasn't for these liquidity providers, DEXs wouldn't be able to function and investors were only able to trade their crypto on regular centralized exchanges.