Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 Proportional Adds Issue #437

Open
johngrantuk opened this issue Oct 17, 2024 · 1 comment
Open

V3 Proportional Adds Issue #437

johngrantuk opened this issue Oct 17, 2024 · 1 comment

Comments

@johngrantuk
Copy link
Member

Investigate issue mentioned by Alberto.

  • Initial thought is this could be similar to CowAmm issues and we need to replicate maths 100%. Currently there may still be changes to maths (and between deploy versions) so would wait until that is final.

From Alberto:

The v3 proportional adds and removes are merged and working as expected but I found one issue in the permit2 signature step:
I hit this AMOUNT_OUT_OF_RANGE error when setting the amountsIn to MaxAllowanceTransferAmount (MaxUint160) in the Permit2Helper.signAddLiquidityApproval call.
I didn’t debug the SDK code but saw that I was setting:
MaxUint160 -> 1461501637330902918203684832716283019655932542975n
but the number that you check here is slightly bigger:
1462963138968233821121888517548999302675588475517n (edited)
Given that the proportional amount do not have slippage, I guess that It could be the fees being added? (I can check the code if you don’t have the answer)
If that’s the case, we should detect that the user is allowing the maximum MaxUint160 and avoid adding the fee.
For now. I’m just using MaxUint159 (which works like max in practice) so no hurries at all

@brunoguerios
Copy link
Member

Are we still expecting changes to maths or is it ok to work on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants