Content pfp
Content
@
0 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
has anyone run into the error "panic: arithmetic underflow or overflow" when adding liquidity? My math is probably wrong lol I'm using the liquidity amount library in v4 to figure out how much liquidity i need to add to my pool. https://github.com/atj3097/nft-amm-hook/blob/master/test/NFTAMMHook.t.sol#L131-L163
2 replies
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
having a hard time seeing where this panic is happening. i think its in under modifyLiquidity in the poolmodifytest or the arithmetic happening in the pool manager's settle function. https://github.com/Uniswap/v4-core/blob/f5674e46720c0fc4606b287cccc583d56245e724/src/PoolManager.sol#L265-L270
1 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
this is my full stack trace https://github.com/atj3097/nft-amm-hook/blob/master/test/utils/stacktrace.sol
0 reply
0 recast
0 reaction