How to Become a Liquidity Provider (LP)
To provide liquidity into a pool on a decentralized exchange, you need to have a non-custodial wallet (meaning you have a passphrase to it) with two cryptos in it—the ones that you want to supply. Apart from that, you also have to hold the native digital coin of the blockchain that the platform is built upon in order to cover gas fees (for example, ETH when adding liquidity on Uniswap, BNB on PancakeSwap, or NEAR on Ref.finance).
Although the liquidity provision process may (slightly) differ from DEX to DEX, the general rules are to make sure that:
- 1.there is a small amount of native tokens in your wallet before connecting it to a DEX of your choice;
- 2.you have equal worths of cryptos you want to provide—that’s the requirement of the AMM algorithm.
For example, there’s the PEM/USDC pair. Since USDC is a stablecoin, its worth is supposed to always be close to US$1. As for PEM, its price at the time of writing stands at US$0.085. This means that if you wanted to become a liquidity provider of this pool, you’d need to have 11.76 PEM and 1 USDC in your wallet, or 23.52 PEM and 2 USDC, and so on. The key is to always keep the 50/50 ratio in U.S. dollar terms.
Ref.finance is NEAR Protocol’s largest DEX in terms of daily trading volume. It allows you to provide liquidity into pools, as well as engage in making swaps, yield farming, and staking. To find out more about the Ref.finance’s capabilities, check out this awesome step-by-step guide by Learn NEAR Club.
The process of wrapping is needed in two cases:
- 1.When a token is ‘imported’ from another chain
- 2.When tokens sit on the same chain, but are of different standards
Case #1 example: Uniswap wanted to list Bitcoin, the most famous and widely used cryptocurrency in the world. But Bitcoin had its own chain, so in order for Ethereum (and by proxy, Uniswap) users to be able to use it, it needed to be ‘mirrored’ onto the Ethereum network. That was done through the issuance of wBTC (which stands for Wrapped BTC) on the Ethereum network.
Case #2 example: Uniswap wanted to list Ether, Ethereum network’s native digital token. Since Uniswap was powered by Ethereum, that shouldn’t have been a problem, right? The thing is, token standards that most digital assets use (such as ERC-20) were created much later than the original ETH had been invented. So in order for them to be compatible, there was a need for an ERC-20 version of ETH, which came around as wETH (or Wrapped ETH).
We will not go into the technicalities, but when the wrapping/unwrapping happens, tokens are burned on one chain and released on the other; that’s how the 1:1 peg is maintained. The feature of moving tokens across chains is enabled by services called ‘bridges.’
To make a swap (which is, essentially, buying one crypto with another/selling one crypto for another), you need to visit the corresponding section of a decentralized exchange you want to do that through. Usually, the process is pretty straightforward: you just need to make sure the amount of the asset that you have is sufficient to buy the desired amount of the asset that you need (don’t forget to account for all fees that come with it). Some DEXs also allow you to customize the slippage tolerance, which can happen because of two reasons: a) the market volatility is high, and b) the liquidity is low. For example, you want to swap 1 PEM for USDC, and when you initiate the deal, the DEX estimates that you will receive 0.085 USDC in return. Once the swap has gone through, you end up with 0.08 USDC only, meaning the slippage you experienced was ~6%.
Liquidity providers, or LPs for short, are those without whom decentralized exchanges simply wouldn’t exist. According to the principles of the AMM mechanism, all pools (or trading pairs) need to be pre-funded, and those initial deposits (just like any other that follow) are made by liquidity providers.
LPs ensure that all members of a DEX can buy or sell a given asset at any time. For that, they are accrued LP tokens (also known as ‘shares’) that reflect their share in the total amount locked. The larger it is, the bigger the LP reward they receive on each swap.
Example: there is a pool with 117.6 PEM and 10 USDC in it. You’ve decided to supply 11.76 PEM and 1 USDC, meaning your share would be 10%. Imagine that in one day, 5 PEM has been sold via the pool. Since the liquidity provider fee is paid in the token sold, you’d be entitled to 10% of that amount. On Ref.finance, the pool fee ranges between 0.05% and 0.3%, of which 80% goes to LPs. Assuming the pool fee is 0.3%, the amount you’d make from this single swap would be (5 PEM * 0.3% * 80%) * 10% = 0.012 PEM * 10% = 0.0012 PEM.
There are two major enemies for any Liquidity Provider—impermanent loss and liquidation.
To put it simply, impermanent loss is a situation when the dollar value of your withdrawal is lower than the dollar value you could get by doing absolutely nothing or doing something other than LP’ing.
Consider this: after you supplied 11.76 PEM and 1 USDC into the pool, the price of 1 PEM has risen to 0.2 USDC. How would that change your stake? Uniswap provides a formula to calculate that (for simplicity, let’s assume that token1 is a token that has changed in price, while token2 is the one we compare it against):
token1_liquidity_pool = sqrt(constant_product / token1_price)
token2_liquidity_pool = sqrt(constant_product * token1_price)
First, we need to multiply existing liquidities of both tokens, in our case:
117.6 * 10 = 1,176
Next, we need to find new liquidities according to the formula above by taking square roots:
PEM = sqrt (1,176 / 0.2)
USDC = sqrt (1,176 * 0.2)
The price change would give us the following new values for the pool: 76.68 PEM and 15.34 USDC. To verify, simply multiply the new values, and you’ll get the same product as before (in this particular example, the resulting value would be a bit lower because of the rounding that was carried out for better illustration).
Given that your share is 10%, the amount you’d be able to take out is 7.67 PEM and 1.53 USDC. At 0.2 USDC per PEM, you’d receive 7.67 * 0.2 + 1.53 = 3.06 USDC in total.
What would’ve you had if you’d held onto your initial PEM and USDC or put them to use somewhere else? At 0.2 USDC per PEM, that would’ve been 11.76 * 0.2 + 1 = 3.35 USDC. Your impermanent loss would be equal to 0.29 USDC; while this seems like a bearable amount to lose, keep in mind that this concrete number is an absolute one, meaning the larger the initial deposit and the fluctuation, the larger the loss. It’s called ‘impermanent’ because if you wait the turbulence out and things get back to normal, the loss will disappear as well.
- a 1.25x price change results in a 0.6% loss relative to HODL
- a 1.50x price change results in a 2.0% loss relative to HODL
- a 1.75x price change results in a 3.8% loss relative to HODL
- a 2x price change results in a 5.7% loss relative to HODL
- a 3x price change results in a 13.4% loss relative to HODL
- a 4x price change results in a 20.0% loss relative to HODL
- a 5x price change results in a 25.5% loss relative to HODL
To mitigate the risk of impermanent loss, one may stick to the pairs that are less ‘exotic’ and less prone to high volatility, or stablecoin pairs, or diversify by canceling out impermanent loss in one pool via profiting in another.
The second enemy, liquidation, is far worse than impermanent loss as with it, one loses all of their money. In the context of liquidity provision, it happens when the price of either asset falls to 0. With the release of its v3, Uniswap, however, offered a workaround by allowing LPs to deploy their capital across a specific price range—which acts as a kind of liquidity stop-loss—while keeping the rest to invest however they see fit.
LP incentivization mechanisms are those that make it even more lucrative for liquidity providers to supply their funds into the pools. One such mechanism is yield farming (more on that below); some other could include airdrops, referral systems, or competitions. The DEXs get really creative with this one, so it could be literally anything.
As we’ve already mentioned, the LP rewards come from fees that are paid by those who make swaps within the pools. As for the incentivization initiatives, the financing can come from the project’s treasury—usually, DEXs reserve a certain volume for themselves that they later distribute towards activities exactly like this.
On DEXes, yield farming is an extra type of reward that liquidity providers earn by staking their LP tokens. Yes, that’s right—on top of the LP fees, they also build an additional inflow of capital on their share itself! Terms and conditions vary from platform to platform, so if you want to find out what programs there currently are, make sure to navigate the DEX app that you’re using and follow all its latest news and announcements.