Definition
Liquidity provider (LP) tokens are a new crypto primitive that arose from DeFi and given to users who deposit funds into a liquidity pool. They represent your share or ownership of a specific liquidity pool. The LP tokens can be thought of as a receipt that can always be redeemed for the underlying tokens.
How do LP tokens work?
In DeFi, liquidity is one of the key infrastructures needed to enable a wide variety of decentralized financial services such as lending and market making. These liquidity pools can contain any number of assets ranging from a single asset to multiple assets. After depositing tokens in a liquidity pool, you will receive a LP token as a receipt. The LP tokens represent your share of the pool and accrues value from fees earned.
LP tokens are generally fungible assets, which means it is interchangeable with any other LP token from the same pool. This means part of the risk with providing liquidity is that you have to maintain your LP tokens in a secure method. If you lose them or get hacked, then you lose all of your deposited assets.
How are LP tokens valued?
The general formula to calculate the value of a LP token is the following:
LP Token Price = Total Value of Liquidity Pool / Total Circulating Supply of LP Tokens
These values can usually be found through the contract address of the liquidity pool. You can then search the contract address on a blockchain explorer to get the current value of the contract and the circulating supply of LP tokens minted.
How to get LP tokens?
Whenever you deposit funds into a DeFi protocol like Uniswap or Compound, you will receive a LP token in return. For example, Compound uses the concept of cTokens for anyone who lends assets on its platform (USDC depositors will receive cUSDC in return). These tokens will show up in your crypto wallet and can generally be transferred across wallets.
What can you do with LP tokens?
The composability of DeFi allows you to put the LP tokens to work to earn additional yield for you. This is in addition to earning the base yield from the underlying job of the liquidity pool itself.
Use as collateral. Since your LP tokens have value, they can be used as collateral within certain lending protocols to borrow another asset. And because the value of LP tokens in theory should increase over time (as it accrues fees/rewards), your collateralization ratio should improve over time.
Compound yield. LP tokens can also be deposited into yield aggregators (e.g. Yearn) who will take the LP token and maximize your yield through rewards compounding. The compounder essentially collects the rewards, uses them to purchase more of the underlying asset(s), and redeposits into the liquidity pool.
Risk of LP tokens
LP tokens have the same core risk as any other crypto asset, meaning you can lose them through mismanagement or theft. LP tokens are also exposed to the smart contract risk of the relevant liquidity pool; if the pool is drained, then your "receipt" becomes worthless since there is nothing to redeem. Lastly, certain pools have additional risks like impermanent loss (price divergence of multiple assets) and any built-in penalties.