AMM Basics
AMMs are one of the most popular ways to earn yield in DeFi. AMM stands for Automated Market Makers which are smart contracts users can deposit a pair of tokens into to add liquidity to a decentralized exchange. Traders then trade against this liquidity and in return they pay swap fees on each trade to those who have deposited liquidity.
There are two types of deposits you can make on AMMs, unconcentrated positions (also known as full-range positions) or concentrated positions. Both of these are referred to as Liquidity Providing positions or LP positions for short or simply LPs.
Unconcentrated/Full-Range LPs
This type of deposit spreads out your deposited tokens evenly across the entire price range. This means you're willing to swap the same value of tokens at 5 dollars as you are at 500 dollars. This means no matter where the price is, you'll earn fees. This type of position is usually taken when you don't know what the price of a token should be and want to reduce your risk. We'll discuss risk further on, but for now know that this type of position usually earns less but is less risky.
Concentrated LPs
To make this deposit, you must first choose a range of prices. For example, if you're liquidity providing (LPing) for ETH/USDC, you might say the price of ETH won't go below 2000 USDC but won't go above 5000 USDC so you deposit liquidity just for that range. If you're right, it means you didn't waste any token deposits on prices below 2000 and above 5000. Your tokens were more efficient and you'll earn more as a result. But on the downside, if you're wrong you'll face more risk and lose more than the unconcentrated position. Most liquidity is concentrated these days. The more narrow your price range, the more risk you face. The wider your range, the less risky it is.
Risk
The value of your deposit will decrease as the price moves, this is referred to as Impermanent Loss. If the price returns to the original price at the time you deposited, then your deposit will return to its original value as well. This is why it's referred to as Impermanent. However, just know that these are indeed real losses and should be treated as such.
An LP is a deposit into a pair of tokens. One is typically referred to as the risk token and the other as the numeraire. Typically, the stable coin or USD equivalent is the numeraire. For example in a ETH/USDC pair, ETH would be the risk token and USDC is the numeraire.
A concentrated LP changes value different depending on the price. If the price is below the range, then your LP changes in value at the same rate as the risk token. Within the range the LP changes more slowly than the risk token, and above the LP position no longer changes in value is stays flat. A full-range LP is always within its range so it changes more slowly than the risk token.
For example, if you LP for ETH/USDC from 2000 USDC to 3000 USDC, then when the price of ETH is below 2000 USDC, the value of your position will fall one dollar for each dollar ETH goes down. When above 3000 USDC, your position will no longer change in value. And between the two there is a smooth transition from one to the other.
Computing this for yourself can get hairy, so it's best to use an Impermanent Loss graph or calculator to determine this before depositing. Hyperplex makes sure to show you this graph before you deposit.
Reward
Of course the reason someone would deal with that risk is because the rewards can be high. Especially for well placed positions and even more so when protocols are offering incentives. AMMs typically specify a fee rate or a formula for the fee. Each swap will pay this fee rate on the total size of their swap and this payment is collected as earnings to the liquidity providers. The earnings are split fairly among all positions that are providing liquidity to the range of prices the swap went through. The more liquidity you provide, the more of those fees you get to collect.
This means that as long as you're in range, you'll earn fees. If the price is outside of your LP's range you don't earn anything (unless you're using Hyperplex Rehypothecation!).
More details
If you'd like to learn more and dive into the technical details, this online book is a great place to start: https://uniswapv3book.com/
Last updated