Unichain Migrator
A React component and web app that enables migration of base tokens and DeFi positions from Uniswap V3 to V4 across Ethereum Mainnet, Arbitrum, and Base networks directly to Unichain.
The Unichain Migrator allows users to:
- migrate base tokens to Unichain
- migrate Uniswap liquidity positions to Unichain and Uniswap V4 pools.
Uniswap Migrator
Migrate positions to Unichain and V4 pools
Integrate
Integrate Unichain migrator widget in your app
How it Works
The Uniswap Migrator Widget is an interface to an orchestration of Enso’s routing capacities, Stargate bridging system, and Layer0’s notification system. Roughly, the flow is as follows:
- The user selects the asset to migrate, and the destination Uniswap V4 pool. The user approves Enso’s contracts to spend the asset.
- The user initiates the migration.
2.1. The user initiates the migration.
Enso issues a transaction bundle that:
2.2. Redeems the assets underlying the user’s position on Uniswap V3.
2.3. Swaps the assets to bridge tokens. - Bridging takes place
3.1. Enso sends the assets to Stargate.
3.2. Stargate bridges them to the destination chain.
3.3. Stargate notifies Layer0, which notifies Enso. - Enso issues a transaction on the destination chain that deposits the assets into the destination V4 pool.
Integrate
To integrate the Uniswap yield migrator widget, follow the steps below.
Install your project
In case you’re starting from scratch, set up a RainbowKit project:
Then, edit package.json
and adjust the version for viem
to 2.x
:
Integrate the Widget Component
Include the WidgetWrapper
component in your /src/pages/index.tsx
file.
Test it out
Now you can run your app and see the Uniswap Migrator widget in action!
Open your browser and navigate to http://localhost:3000
🎉
Next Steps
- Try the Unichain Migrator Widget
- Learn more about Stargate
- Explore Layer0
- Find more about Enso’s routing capabilities
Updated