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

Fix price impact for add liquidity boosted on near proportional inputs #584

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

brunoguerios
Copy link
Member

No description provided.

@brunoguerios brunoguerios added the bug Something isn't working label Feb 5, 2025
@brunoguerios brunoguerios self-assigned this Feb 5, 2025
@brunoguerios
Copy link
Member Author

Tests are not failing locally - any idea what's causing this unrelated test to fail on CI? 👀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could be using the wrong rpc url but this example fails on my machine

Error: addLiquidity operation will fail at SC level with user defined input.
ContractFunctionExecutionError: Missing or invalid parameters.
Double check you have provided the correct parameters.

URL: https://rpc.ankr.com/sonic_mainnet
Request body: {"method":"eth_call","params":[{"data":"0xc9b8ddb200000000000000000000000043026d483f42fb35efe03c20b251142d022783f200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000000000"},"latest"]}
 
Raw Call Arguments:
  data:  0xc9b8ddb200000000000000000000000043026d483f42fb35efe03c20b251142d022783f200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000000000
 
Contract Call:
  function:  queryAddLiquidityUnbalancedToERC4626Pool(address pool, bool[] wrapUnderlying, uint256[] exactAmountsIn, address sender, bytes userData)
  args:                                              (0x43026d483f42fb35efe03c20b251142d022783f2, [false,false], ["100000","100000"], 0x0000000000000000000000000000000000000000, 0x)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true - I initially branched out v1.4.3 - it was working there 🫠
I know that buildPoolStateTokenMap should be fixed to use t.index instead of underlying.index but that alone isn't enough to get the example to work
I'll take another look tomorrow to investigate this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad - this won't work until the new composite router is deployed on Sonic 🤦‍♂️ - this fix was meant to be added as a hotfix to 1.4.3, so we'll have to put this on hold until everything else is deployed/updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants