DEV Community

Cover image for G-UNI, an automated liquidity provision ERC-20 for Uniswap v3, powered by Gelato
Gelato Network
Gelato Network

Posted on

G-UNI, an automated liquidity provision ERC-20 for Uniswap v3, powered by Gelato

Automated Market Maker (AMM) 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 a market maker and benefit from fees generated from trades and potential yields spouting from yield farming schemes in distant pastures in the DeFi universe. Users provided liquidity across a single curve from 0 to infinity. The benefits of this lies in its simplicity and fungibility, users can just set and forget and receive LP tokens in ERC-20 form making them composable with the money legos of DeFi, for example leading to them being used as collateral in lending protocols such as Aave, MakerDAO.

The benefits of Uniswap v1 and v2 can be summarized by:

  • Simplicity: Having a simple one size fits all liquidity strategy making market making very accessible for everyone as users don’t have to actively manage their position
  • Fee Compounding: Reinvesting the earned trading fees back into the pool resulting in an automated compounding effect
  • Fungibility: One Uniswap LP token is equal to another, meaning they can be used as money legos in other protocols such as Aave or Maker for collateral, making the underlying capital hyper-efficient

Yet, having a pair of tokens populate infinitely along a curve means only a small minority of them are actually being utilized to provide liquidity around the current price at any given moment, with the vast majority sitting idle for most of the time. 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 optimizing 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 price range they want to provide liquidity for 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 in that range 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, an automated liquidity provision ERC-20 for Uniswap v3, powered by Gelato. G-UNI combines the capital efficiency of Uniswap v3 with the simple user experience of Uniswap v2 by enabling users to simply deposit their funds in a G-UNI ERC-20 that manages their liquidity on Uniswap v3 automatically on their behalf.

G-UNI Features:

  • Makes Uniswap v3’s non-fungible liquidity positions fungible, enabling liquidity to be used as money legos in other DeFi protocols
  • Automatically reinvests earned fees back into Uniswap to achieve a compounding effect Manages the ranges between which liquidity should be provided to always provide concentrated liquidity around the current market price
  • Being ERC-20s, G-UNI tokens can be used for liquidity mining schemes to incentivize holders to provide concentrated liquidity around certain price ranges

G-UNI tokens are also very flexible and can be used for passive and active liquidity management. Passive G-UNIs work by just providing very broad liquidity, similar to Uniswap v2 that never has to be changed. It thus can be completely free of anyone’s control as it does not require changes in its price range.

On the other hand, active G-UNI’s will always target providing liquidity as efficiently as possible around e.g. 5%-10% above or below the current trading price, but still in a completely trustless and automated fashion. This is achieved by having 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.

In fact, one of our closest partners, Instadapp, has just launched their liquidity mining scheme utilizing G-UNI. Within the first 8 hours, over $2M were deposited in the passive INST / WETH G-UNI token, making the G-UNI ERC-20 the largest liquidity provider for INST on Uniswap.

UNI 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.

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.

Discussion (0)