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

Failing test for AlphaRouter.calculateOptimalRatio() #77

Closed
wants to merge 1 commit into from

Conversation

eliotstock
Copy link

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Failing test

  • What is the current behavior? (You can also link to an open issue here)

The ratio returned by AlphaRouter.calculateOptimalRatio() is out by about 2% for this test case.

  • What is the new behavior (if this is a feature change)?

  • Other information:

@ewilz
Copy link
Member

ewilz commented Apr 6, 2022

can look into this. It's possible that the fraction is taking into account Price Impact. If you need to trade through the pool you're providing liquidity to, you will move the price, and hence affect the ratio. (edit: nvm, not it, since you're calling the pure function)

@eliotstock
Copy link
Author

Thanks for taking a look. I would expect only a tiny price impact for this size of swap in a real pool, but I don't know how the tests handle liquidity in the pool. Isn't the implementation of calculateOptimalRatio() completely independent of liquidity in the pool?

@stale
Copy link

stale bot commented Jul 14, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix This will not be worked on label Jul 14, 2022
@stale stale bot closed this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants