Liquidity Rebalancing: Moving Around $9.4 Million for More Fee Revenues.
To maximize the benefits of Uniswap V3's concentrated liquidity, constant adjustment from market fluctuations necessitates routine rebalancing.
Uniswap V3’s concentrated liquidity offers numerous benefits, enabling liquidity providers and users to manage their liquidity more efficiently. These benefits have attracted market makers to develop and implement their strategies, thereby earning protocol fee revenues from providing liquidity to Uniswap V3’s pools.
The Automated Market Making (AMM) mechanism causes market makers' positions to constantly adjust in response to market price fluctuations. This exposes them to impermanent loss. Hence, market makers must regularly rebalance their positions. The quality of their rebalancing strategy demonstrates their level of expertise.
Usually, you'd follow three crucial steps to rebalance liquidity. First, you remove any imbalanced liquidity. Next, you rebalance the existing liquidity. Finally, you add the now balanced liquidity back.
Let’s look at a real-life example of how this liquidity provider moved $9.4 million to maximize the fee revenues.
Strategy One Liner
The market maker rebalanced his liquidity in a Uniswap V3 pool trading USDC & USDT by swapping 4.15 million USDC for USDT via the 1inch aggregator to maximize fee revenues.
Big Picture
Here is the token flow chart of this transaction.
Key Steps
Adding and removing liquidity from the Uniswap V3 pool involves a lot of internal accounting operations. Please read What's Really Going on When Processing Liquidity in a Uniswap Pool? to understand how EigenTx can help you get to the bottom of it.
Steps 4 and 5: Remove liquidity. 1,626 USDT and 9,409,921 USDC were removed from the Uniswap V3 pool.
Steps 10-31: Rebalance the existing liquidity. 4,150,507 USDC was used to swap for 4,149,601 USDT via 1inch.
Steps 32-35: Add liquidity. 4,148,799 USDT and 5,256,909 USDC were added to the Uniswap V3 pool.
Key Protocols
Uniswap V3: The largest DEX.
Balancer, Curve, DODO: Other DEXes.
1inch: An exchange aggregator that scans decentralized exchanges to find the lowest cryptocurrency prices for traders.
MakerDAO: A decentralized organization responsible for creating and managing the DAI stablecoin. In this transaction, it acts as a DEX swapping USDC for DAI.
The DAI uses a synthetic algorithm to peg to USD. This is different from custodial stablecoins such as USDT and USDC.
Key Addresses
The pentagon "from" is the market maker, a.k.a., liquidity provider(LP)'s EOA.
The oval "to" is LP's contract address.
The addresses in the right-bottom box are the addresses of Uniswap V3. You will see their usage in the following Step-by-Step Decoding. So as the addresses in the "Balancer v2" box and the "MakerDAO" box.
The oval "DLP", "DODO", and "Curve Pool" are different DEXes.
The oval "0xa45...cba3e" is a contract created by the LP.
Key Assets
USDT, USDC, DAI
Simplified Illustration
Step-by-step Decoding
Steps 1-3: The user was going to remove liquidity. The corresponding virtual liquidities were burned.
For more details about virtual liquidity, please see What's really going on when processing liquidity in a Uniswap Pool?
Steps 4 and 5: Remove liquidity. 1,626 USDT and 9,409,921 USDC were removed.
Steps 6 and 7: The virtual USDT corresponding to the 1,626 USDT was removed.
Steps 8 and 9: The LP sent 4,150,507 USDC to his own contract. Then, the USDC was sent to 1inch to swap for USDT.
Steps 10 and 11: 415,050 USDC were sent to MakerDAO to swap for DAI.
Steps 12-15: The DAI was swapped for USDT at DLP and Curve.
Step 16: The swap fee was stored at their fund collection address, marked as a leaf node in the figure.
Steps 17-29: 2,988,365 USDC were swapped for USDT at Balancer, another DEX.
Steps 30 and 31: All the USDTs were aggregated at 1inch Router and then sent to the LP (user).
Steps 32-35: Add liquidity. 4,148,799 USDT and 5,256,909 USDC were added into Uniswap V3.
This case study is one of the many intriguing DeFi transaction and trading strategies, which you can read in this Gitbook compilation.
Follow us via these to dig more hidden wisdom of DeFi:
Website | Discord | Twitter | YouTube | Substack | Medium | Telegram | EigenTx