code-423n4 / 2021-12-mellow-findings

0 stars 0 forks source link

Migrate from NonFungiblePositionManager to UniV3Pool directly #133

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

0x421f

Vulnerability details

Hmm with vaults I dont think there is usecase to use NonFungiblePositionManager for uniV3, its a periphery contract, we can directly go to core for pool https://github.com/Uniswap/v3-core/blob/v1.0.0/contracts/UniswapV3Pool.sol

I think we would save ton of gas if we interacted with pool directly There is no mint of ERC721 :)

Its simple use liqForAmounts to get liq from amount0 and amount1, and then we can us mint, burn

For ref : https://github.com/charmfinance/alpha-vaults-contracts/blob/774960877e122da12015878ee3a03dfa58536968/contracts/AlphaVault.sol#L403