How to provide liquidity?
Liquidity providers (LPs) are users that fund a liquidity pool with a pair of tokens in exchange for a cut of trading fees and reward tokens.
Liquidity providers (LPs) are users that fund a liquidity pool with a pair of tokens in exchange for a cut of trading fees and reward tokens.
By Alan
Liquidity providers (LPs) are users that fund a liquidity pool with a pair of tokens in exchange for a cut of trading fees and reward tokens.
In order for users to swap two tokens on a decentralized exchang (DEX) like Uniswap, other users must have contributed those tokens to a liquidity pool.
In this guide, we’ll cover:
What follows is not investment advice.
Let’s review a few key concepts that power decentralized exchanges:
By locking up a pair of assets in a liquidity pool, liquidity providers (LPs) earn trading fees and reward tokens from the DEX.
We will provide liquidity on Uniswap using Polygon. Polygon is an Ethereum L2 scaling solution that offers faster and cheaper transactions. To try this example yourself, you first need to have:
1. Visit Uniswap and connect your wallet
Visit Uniswap and click “Connect Wallet” on the top-right corner to connect your wallet.
2. Click on the “Pool” tab and select “+ New Position”
3. Select your asset pair, fee tier, and price range
Select the pair of tokens that you would like to provide to the pool. Uniswap will provide insight into what fee tier to choose. Higher fees correspond to higher price volatility:
In Uniswap V3, LPs set a price range in which they will provide liquidity to the pool. When swap prices fall outside the range, the LP will not be providing liquidity.
Providing liquidity for a smaller range than the full price range is a more efficient use of capital. In previous versions of Uniswap, users provided liquidity for entire price range. This meant that liquidity was spread out across the entire price range rather than concentrated on the most likely price range and much of the liquidity was not used.
Learn more about concentrated liquidity here.
4. Set deposit amounts, approve each asset, then preview and submit your transaction
In the example above, once you put in an amount of ETH, the amount of Dai will populate. If the price range is balanced around the market price then there will be equal value of each asset, this will change if you skew the price range.
If you have not used either asset on Uniswap before, you will need to approve the assets, which will incur a transaction fee. Then you can preview the transaction details and add liquidity.
Your wallet will pop up to confirm the transaction and gas fee. You will recieve an NFT representing your LP position.
5. View your liquidity pools in the pool tab
Once the transaction is confirmed, you will be able to view your position in the pool tab. The pool tab will show “In range” or “out of range”. “In range” means that the assets are within your chosen price range and earning fees. “Out of range” means that the assets are outside your price range and your LP share is concentrated in one of the two assets and not earning fees.
When the prices of deposited assets change compared to when they were added to the pool, you experience impermanent loss. This means that you would have been better off simply holding the tokens rather then providing liquidity with them.
The ratio of assets in the pool will constantly rebalance as prices change. Play around with an impermanent loss calculator to see how price changes will impact your amount of each token.
Why would one provide liquidity with these risks?
Impermanent loss can be offset from trading fees, which depend on trading volume. Impermanent loss is by nature, not permanent, so it can change over time as the prices of the assets change.
If prices of both assets don’t change or move exactly in unison, you will not experience impermanent loss, but outside of stablecoin pairs, this rarely happens.
Providing liquidity is often incentivized, offering additional yield to liquidity providers. To achieve adequate liquidity, protocols will offer incentives (reward tokens) to those that provide liquidity for their tokens. This is an example of yield farming, read our guide to learn more
Up next: How to yield farm?