code-423n4 / 2021-11-vader-findings

0 stars 0 forks source link

Add method to migrate from fungible to nonfungible liquidity #237

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

TomFrench

Vulnerability details

Impact

Higher gas costs for migrating from fungible to NFT liquidity

Proof of Concept

VaderProtocol allows users to provider fungible liquidity or NFT based liquidity (VaderPoolV2 allows one or the other or both on a pair). NFT based liquidity provided IL protection and so is more desirable.

We then expect that for pairs which start with fungible liquidity enabled and NFT based liquidity enabled later that many users will want to migrate from a fungible position to an NFT position.

There's currently no way to do this other than removing liquidity and re-adding liquidity which opens users up to slippage as well as high gas costs. Instead the liquidity units from the fungible LP position could just be transferred over to an NFT position at current prices.

Kinda a feature request but listed as gas optimisation this will save users a ton of gas.

Recommended Mitigation Steps

Listed above.