Adam pfp

Adam

@adamtj-xyz

415 Following
238 Followers


Adam pfp
Adam
@adamtj-xyz
New meme template
0 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
hey @haardikkk , think im just gonna bring this one to office hours if you dont mind. i tried to approve but still getting the same error thrown. unless @poi you have any recommendations on how to move past this lol(see stack traces above)
0 reply
0 recast
1 reaction

Adam pfp
Adam
@adamtj-xyz
for the life of me, I cannot find the transferFrom implementation in my project to see where this arithmetic is happening.
0 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
For context, the value that I'm passing in as the amount is -5, which is then turned positive. When checking the balance of the payer they have like 100000 tokens of the particular currency being unwrapped. its kind of confusing cause the panic is happening on the transfer function according to the logs
2 replies
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
hey @haardikkk , the arithmetic panic is happening here https://github.com/Uniswap/v4-core/blob/f5674e46720c0fc4606b287cccc583d56245e724/src/test/PoolTestBase.sol#L35
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

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
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
and then to be clear that I'm understanding this. delta L is the total amount of liquidity in the pool? where does that fit in again in these parameters. I uinderstand the math behind it more or less lol but does this parameter signify the change of the liquidity afterwards?
0 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
Wrote up a quick article breaking down EIP-7702. A well designed evolution of EIP-3074 by the researchers at the Ethereum Foundation for a more forwards compatible implementation of smart account functionality. https://mirror.xyz/0x0e729b11661B3f1C1E829AAdF764D5C3295e1256/XfsGyZkKOtfnnFiR-b0AzYT_2FRnfEShDtNmDEydeq4
0 reply
0 recast
1 reaction

Adam pfp
Adam
@adamtj-xyz
one question for a point of clarity on uni pools token 0 <> token 1 these tokens are lexicographically sorted by their addresses. what is the reasoning behind sorting tokens in a pool like that? particularly in terms of the sc design choice there
1 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
gotcha that makes a lot of sense. so eth <> usdc might be lower but eth <> some newer meme coin is typically higher to incentivize folks to add liquidity and i mitigates impermanent loss
1 reply
0 recast
1 reaction

Adam pfp
Adam
@adamtj-xyz
Ok this feels a little counter intuitive actually. I'm guessing that the fees on the pool affect the tick spacing because you want to optimize for just how much value lps are extracting on swaps?
1 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
I'm familiar with sushi doing some kind of mev protection at the protocol level https://snapshot.org/#/sushigov.eth/proposal/bafkreigjjhjx2j2b526d3poeg23w2xan4rcgnzvcxinsssv7n37lu5p7s4
0 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
i see. and then when we discuss how hooks can be created that prevent toxic mev, it would be us coming up with mechanism designs to mitigate that. are there any existing examples of this out there? I'd be curious to read more
2 replies
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
and then whats the time frame of that all of this can happen? sometimes its hard for me to imagine just how fast the bots are exploiting discrepancies. im assuming that the price wont stay inconsistent past even 1 block
1 reply
0 recast
0 reaction

Adam pfp
Adam
@adamtj-xyz
prices remain consistent across different AMMs? Do they just rely on arbitragers to exploit the discrepancy until its fixed?
1 reply
0 recast
1 reaction

Adam pfp
Adam
@adamtj-xyz
1 / 2 A few questions 1) how are tick spaces determined when deploying a pool? Is there a sort of common number thats just fine for most cases? 2) i understand that the price shifts whenever y / x moves in the tick range. But different pools across all of defi have different ratios. How do
2 replies
0 recast
1 reaction

Adam pfp
Adam
@adamtj-xyz
For sure. UI/UX designers and front end devs are gonna have a blast with V4 lol. Uni frontend definitely won’t suffice
1 reply
0 recast
1 reaction

Adam pfp
Adam
@adamtj-xyz
Anyone else looked into this? I’m under the impression most hook pools will have to get their own flows and only approved hooks from labs get the frontend routes. But just taking a guess
2 replies
0 recast
3 reactions