LP Like A Pro in UNI-v3 Auto-Rebalancing

Gelato
Gelato Network
Published in
3 min readJun 10, 2021

Introducing G-UNI, a Uniswap v3 auto-rebalancing implementation, powered by Gelato

Automated liquidated protocols such as Uniswap have earned their place as the central primitive of DeFi. In a sense, Uniswap is the ‘townsquare of tokens’, and provides an easy-go-to arena for users who are looking to exchange them in a completely trustless and decentralized manner.

Through the simple formula of x * y = k, Uniswap v2 allowed anyone to become an automated market maker and benefit from both fees and any yield farms spouting in distant pastures in the DeFi universe. In v2, users provide liquidity across a single curve from 0 to infinity. The benefits of this lie in its simplicity, users can just set and forget and receive LP tokens in ERC-20 form making them composable with the money legos of DeFi.

Yet, having a pair of tokens populate infinitely along a curve means only a small minority of them are being utilized at any given moment, with the vast majority never getting touched at all. In order to solve this dilemma and to get the most out of every token that is being provisioned for liquidity, Uniswap took it upon themselves to step up their AMM game by prioritizing capital efficiency. The result of this premise was Uniswap v3 which takes liquidity provisioning to a whole new level.

How Uniswap v3 works is that rather than putting all tokens on the same curve, users decide the range they want to put them in and deposit them in positions filled with “ticks”. An example of this is for an ETH-DAI pair, you may decide to provide liquidity only between $2,500-$3,000 DAI worth of ETH. The result is much higher fee generation since the liquidity provision is much more concentrated. Yet the trade-offs for this efficiency is more risk for impermanent loss. The price of ETH is likely to escape your LP range, leaving you rekted without any of the benefits of fee accumulation. In addition, because of the way v3 is structured, LP tokens are now NFTs making them much less composable with other DeFi protocols.

Because of the complexity of v3, it leaves many everyday DeFi participants at a disadvantage. Many won’t have the time to keep track of their position or will be unwilling to pay the transaction costs to rebalance their position. So how do we make v3 accessible to all?

Enter G-UNI, a Uniswap v3 auto-rebalancing implementation, powered by Gelato. How it works is through its strategy, G-UNI will always target providing liquidity around 5%-10% above or below the current trading price. Gelato bots monitor the average price and every 30 minutes will decide to rebalance only if the average trading price is outside the current bounds of the position. If that is the case, rebalancing happens, and the position is withdrawn and redeposited with the proper adjustment to the new trading price.

The advantage of this includes that users can sit back and relax as all the difficulties that come with monitoring LP positions are taken care of. In addition, since G-UNI is an ERC-20, it has the capability of being composable with other protocols. This will come in handy when future protocols decide to implement v3 yield farms.

Uniswap v3 has already grown to be the highest decentralized exchange by volume and redefines what it means to be a liquidity provider. Gelato is there to empower users every step of the way.

About Gelato

Gelato Network is a protocol that automates smart contract executions on Ethereum and beyond. We are building the underlying infrastructure enabling reliable automation on top of Ethereum and with it a key part of the Web3 middleware stack, enabling trustless, automated flows of value between all smart contracts and upcoming Layer 2 networks.


► Check out what we’ve been working on at 🍦 https://gelato.network/🍦

Connect with us:

🐦 Twitter | 💬 Telegram | 📺 YouTube | 🔗Linktree

--

--