project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

Uniswap 84% Rule.

I solved for a formula in uniswap v3 to optimize for risk, capital efficiency, and volatility.

Uniswap 84% Rule.

Created At

ETHSanFrancisco 2022

Winner of

🕸 The Graph — 🥈 Best Use of Subgraph

Project Description

With uniswap v3 one can concentrate liquidity. The benefit of it is that one can earn more fees, one can also use less capital to earn the same amount of fees (capital efficiency), but one also can gain more risk in case of price diverging too far from initial LP position, additionally one faces gas costs if one has to rebalance the LP position.

From an average person's standpoint, I was looking for a simple solution that can minimize the frequency of rebalancing (passive), minimize divergence loss (pick pools of assets that correlate (ETH/OP, ETH/MATIC versus ETH/USD), and minimize the delta when the price diverges too far (keeping the price range as wide as possible.

I discovered through some math that the optimal price boundary is +/- 84 % for it (see github for details on how I did that). This allows the average ethereum user who wishes to provide liquidity to do either of two things.

Use twice as little money to provide an LP position with the +/-84% bounds and still earn the same yield as if one were to provide liquidity for the whole range ... or ... double down to earn twice as much in fees, whichever one prefers.

How it's Made

This project uses uniswap's capital efficiency formula which was modified to account for the price range diverging equally into both directions ( a useful situation when you want to provide liquidity and have no clue where the price goes ). The modified formula is solved for in Python. Through The Graph's Uniswap subgraph I wind up extracting the prices necessary to solve for the formula. From that point on, I can provide liquidity for L2 pairs, including ETH/OP and ETH/MATIC. Then an ENS domain is registered, referring to the formula "84percent.eth" where one can easily look up the LP positions on etherscan.

background image mobile

Join the mailing list

Get the latest news and updates