myelin
Robinhood Chain
Docs: Provide liquidity

Provide liquidity

Liquidity providers are the other side of every swap: they put two tokens into the pool and earn the fees. A Myelin pool is an ordinary Uniswap v4 pool, so a position is an ordinary Uniswap v4 position, with one difference: the fee follows the pool’s risk.

What you get

  • Your share of the fees. Every swap pays a fee. 10% of it goes to the Treasury and the rest to the people who provided liquidity, in proportion to how much liquidity each has at the price where the swap happened.
  • A position you own. It is an NFT from Uniswap’s PositionManager, in your wallet. Add, remove, move or hold it like any other. There is no lock-up, no staking and no Myelin contract holding your funds.
  • A fee that moves with the risk. When the pool has just been moving, the fee is higher, which is when providers are most likely to trade against a stale price. When it is calm, the fee is low and the pool stays attractive to traders. The cap is 0.41% and the floor 0.05%.

This is not a promise of profit

Providing liquidity can lose money, with or without a dynamic fee: if the price moves a lot, your position ends up holding more of the token that went down (impermanent loss), and fees may not make up for it. Whether Myelin’s fee leaves providers better off than a fixed fee is exactly what we measured, and it has not been shown. Read the backtest results and the risks.

Choosing a range

A position only earns fees while the pool’s price is inside its range. The App offers three ranges, and shows each as a price:

RangeWhat it doesGood for
Narrow (±6%)Puts your liquidity in a band of 600 ticks either side of the current price (about 6%). Every unit of liquidity earns more per swap because it is concentrated, but the position stops earning, and ends up holding one token, if the price leaves the band.Pairs that trade close to each other, if you are willing to watch the position.
Wide (½× to 2×)From half the current price to twice it. Less concentrated than the narrow band, so it earns less per unit of liquidity, but the price has to move a long way before the position stops earning.Volatile pairs, with less watching.
Full rangeSpreads your liquidity over every possible price. It never goes out of range, and earns less per unit of liquidity.Set and forget, or volatile pairs.

Add liquidity

  1. Open the App and connect your walletSee the quick start if you have not yet.
  2. Pick a range and an amountType how much of either token you want to add, or press Max (for ETH it keeps a little for gas). The App works out the other from the pool’s current price and the range, and shows both amounts before you sign.
  3. Approve and addThe first time you add a token, you approve it for Permit2 and then Permit2 for the PositionManager. Then one transaction mints your position. One more percent of each amount is allowed for the price to move before it lands; whatever is not needed stays in your wallet. A pool that has ETH in it needs no approval for the ETH: it is sent with the transaction, and the part that is not used is sent back in the same transaction.

Earning and collecting

Fees accrue to your position as swaps happen. In Uniswap v4 they are collected whenever you change the position, so Remove in the App returns your tokens and the fees you have earned in one transaction, and Collect fees takes only the fees and leaves the position where it is. The list under the Liquidity card shows what each position is worth now and the fees it has earned.

As an illustration only: if swaps worth 1,000,000 pass through your range in a day at an average fee of 0.1%, the pool collects 1,000, of which 900 go to providers and 100 to the Treasury; your part is your portion of the liquidity in range.

Remove a position

In the App, under Your positions in this pool, choose how much to take out (25%, 50%, 75% or 100%) and press Remove. Taking out everything burns the position; a part leaves a smaller one. The tokens and fees go to your wallet, and ETH comes back as ETH. You can do this at any time; there is nothing to wait for.

Good to know

  • The App adds a new position each time. To change a range, remove the position and add a new one.
  • Positions made through other interfaces work too: they are the same Uniswap v4 NFTs. Check the pool before you add liquidity.
  • If the price leaves your range you earn nothing until it returns, or until you move the position.