v4-periphery
v4-periphery copied to clipboard
Create Position Manager
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.
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)