Migration from V2 to V3

In order to move your assets from V2 markets to V3 markets, you can use the migration tool which assists and guides you to migrate your positions in a single transaction on the V2 dashboard. To find the migration button, head to your dashboard in any V2 market with V3 version where you have assets, and click on "Migrate to V3" on the righthand side of the market name.

Instructions

  1. Select the supply and borrow prepositions you would like to migrate

  2. Click ‘Preview tx and migrate’

  3. Sign approval for each position*

  4. Submit migration transaction

If you have open positions, the migration tool will inform you of your new Health Factor on both V2 and V3. Please be mindful of this new Health Factor to mitigate liquidation risks.

*Each supply position requires approval to the migration contract to transfer aTokens, and each borrow position requires approval of credit delegation for the migration contract to execute the borrow on your behalf in V3.

Both approvals can be performed via signed message or an approval transaction.

If you have a lot of assets borrowed and deposited in V2, you can migrate them in several batches, which is recommended. It is recommended to migrate no more than 5 assets in a single migration transaction.

It is not necessary to migrate assets from V2 to V3, the V2 contracts will keep running and remain accessible.

The migration tool uses a combination of credit delegation and flashloans to migrate positions.

The tool is using flashloans and credit delegation, the debt is repaid on V2, and the same positions and amounts are borrowed on behalf of the user on V3, leaving the user debt on V3.

If you would like to see the technical implementation, you can find the migration tool contract here.

Last updated