v4-periphery icon indicating copy to clipboard operation
v4-periphery copied to clipboard

Create Position Manager

Open hensha256 opened this issue 1 year ago • 1 comments

Much like the V3 NonfungiblePositionManager, we need a position manager for V4 too.

While it could still be an ERC721 like in V3, it would be interesting to explore the use of ERC1155. If 2 positions have:

  • the same pool
  • the same lower tick
  • the same upper tick

They are fungible, and could be minted amounts of the same ERC1155 ID. We could use hash(poolID, tickLower, tickUpper) as token ID, and liquidity as the amount.

hensha256 avatar Jun 06 '23 10:06 hensha256

Bc of the time component baked into V3 math with fees, it's very difficult to make 1155's fungible per range :((( 1155's may still be worth exploration.

Next PositionManager Implementation should allow:

  • Altering range of entire position without reminting a new position (gas savings for rebalancing)
  • Should not implemenent ERC-721 Enumerable extension (gas savings for mint)
  • More granular storage access (gas savings for loading position data)

ewilz avatar Jul 03 '23 15:07 ewilz