You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Investigate issue mentioned by Alberto.
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
The text was updated successfully, but these errors were encountered: