Cover photo

Migrating the UDT Uniswap Pool to Uniswap v3

Transferring the existing UDT/WETH liquidity provision by the DAO's treasury in Uniswap V2 to the existing Uniswap V3 pool

This post was originally posted on December 7, 2023 and updated on December 13, 2023.

We are introducing a new proposal to migrate the liquidity provided by the Unlock DAO’s treasury from Uniswap V2 to Uniswap V3. This migration should provide more efficient trading and routing capabilities.

The rationale and process for the transition is outlined below.

Why the migration?

Uniswap allows token holders to trade pairs and to exchange one token for another. Today, the UDT / WETH pair on mainnet primarily uses Uniswap V2, while the newer Uniswap V3 pool has very little liquidity.

Using Uniswap V3 allows more efficient trading and routing, making it easier to trade UDT for any other tokens available. Therefore, we propose that the DAO migrate most of liquidity from the existing V2 pool to the V3 pool.

Uniswap V2 vs V3

The main difference between Uniswap V2 and V3 pools is the way liquidity is concentrated. In Uniswap V2, liquidity is evenly distributed across the entire price range while in Uniswap V3, liquidity can be concentrated in specific price ranges, allowing for more efficient trading.

Mechanism to migrate the Uniswap pool

For the migration, Uniswap provides a contract called V3Migrator to enable liquidity transfers. This contract will remove the liquidity from the existing V2 pools, execute the required allowance settings and token transfers to the new V3 pool, then mint a new position.

Uniswap maintains a deployed version on mainnet that can be used directly.

The Unlock DAO liquidity migration approach

The current liquidity pool provision in the Unlock DAO's treasury on V2 pool contains approximately 5066.32 UDT and 30.96 WETH. This is a proposal to transfer the WETH and UDT tokens held by the DAO into the newer V3 pool in order to provide liquidity there.

After conferring with a number of advisors, the recommended approach to transfer the liquidity from V2 to V3 is as follows:

  • First, withdraw some of the liquidity, assign it to a multisig of trusted community members, and then have this multisig deposit the liquidity on v3

  • Then, have the multisig transfer the V3 Liquidity Pool NFT to the Unlock DAO after that 

This would make it difficult for someone to anticipate the exact timing of the transfer and reduces the chance of arbitrage during the transfer (see the “Potential risks and challenges” section below). 

In taking this approach, the Unlock Labs team will set up a new multisig wallet, as well as ask some of Unlock DAO delegates to be signers on the multisig so we can proceed. A member of the Unlock Labs team will then submit a DAO proposal to withdraw liquidity and allocate it to that multisig.

Potential risks and challenges

During the migration phase, users might experience a temporary reduction in liquidity and change in price. By splitting the liquidity transfer in two, we aim at reducing the potential change in UDT price that may occur.

All along the migration process, observers can monitor that all positions are transferred correctly and that UDT swaps can resume using Uniswap V3.

Additionally, since a significant amount of liquidity for a token will be moved from V2 to V3, it's possible for a malicious entity to attempt to manipulate prices on either pool beforehand in an attempt to perform an arbitrage. 

Note: An earlier version of this blog post suggested moving the liquidity pool from V2 to V3 by way of a proposal on the Unlock DAO that would take several weeks to vote and execute. After discussing that proposed approach with a number of Unlock Protocol project advisors, the multisig based approach outlined above was recommended in lieu of the approach originally proposed. The original proposed approach opened up an opportunity for an arbitrageur to submit a transaction that would decrease the price of UDT with a flash loan, sandwich the proposal execution, and then sell the UDT again at a higher price. Using a multisig, as outlined above, "decouples" the two steps of pulling liquidity from V2 and submitting it V3, making it difficult for someone to see or predict exactly at what time and price the liquidity would be added.

Loading...
highlight
Collect this post to permanently own it.
Unlock Protocol logo
Subscribe to Unlock Protocol and never miss a post.