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

Feat/pool id in amm arb #7018

Open
wants to merge 21 commits into
base: development
Choose a base branch
from

Conversation

vic-en
Copy link
Contributor

@vic-en vic-en commented May 8, 2024

Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:
Adds pool_id to amm_arb strategy.
To be tested with hummingbot/gateway#280

Tests performed by the developer:

  • Manual test with Gateway

Tips for QA testing:

@rapcmia rapcmia requested a review from nikspz May 8, 2024 04:34
@nikspz
Copy link
Contributor

nikspz commented May 8, 2024

@vic-en Should it be optional?
image

Copy link
Sponsor Contributor

@fengtality fengtality left a comment

Choose a reason for hiding this comment

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

See comment below. I think users should be able to enter either trading pair or poolID, and the poolID is used if it is present.

"pool_id": ConfigVar(
key="pool_id",
prompt="Specify poolId to interract with on the DEX connector >>> ",
prompt_on_new=True,
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Change to prompt_on_new=False

I think users should not need to enter a poolID. However, if they do enter a poolID, it should be used instead of the trading pair.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fengtality @nikspz This is done

Copy link

@fengtality
Copy link
Sponsor Contributor

thanks @vic-en

@nikspz please test with Balancer and Uniswap on Arbitrum:

Expected behavior:

  • User can get price and execute swaps using poolId on Balancer
  • User can get price and execute swaps using poolId on Uniswap
  • User can get price and execute swaps using trading pair with no poolId on Uniswap

If these cases pass, this PR should be ready to merge

@vic-en
Copy link
Contributor Author

vic-en commented May 17, 2024

thanks @vic-en

@nikspz please test with Balancer and Uniswap on Arbitrum:

Expected behavior:

* User can get price and execute swaps using `poolId` on Balancer

* User can get price and execute swaps using `poolId` on Uniswap

* User can get price and execute swaps using trading pair with no `poolId` on Uniswap

If these cases pass, this PR should be ready to merge

@fengtality Uniswap on Gateway wouldn't acknowledge the poolId. Only Balancer will ack it. Core files for all other connectors will need to modified to make use of poolId when it's supplied. Otherwise, they'll always default to using their smart routers.

@vic-en
Copy link
Contributor Author

vic-en commented May 17, 2024

That being said, I can update Uniswap to acknowledge the poolId when it's present in my Balancer pr on Gateway this weekend.
It's not a big deal for me.
Other connectors will be left as it.

@vic-en
Copy link
Contributor Author

vic-en commented May 17, 2024

@fengtality Let me know if you want me to deprecate the useRouter on Uniswap. It's almost a duplicate feature
image

@vic-en
Copy link
Contributor Author

vic-en commented May 20, 2024

@nikspz @fengtality
Update has been made on Gateway balancer pr on Uniswap to make it acknowledge poolId - hummingbot/gateway@00ec985

@fengtality
Copy link
Sponsor Contributor

thanks for adding poolId to Uniswap, @vic-en!

I'll review the useRouter status and get back to you soon

@nikspz
Copy link
Contributor

nikspz commented May 21, 2024

Test performed:

  • Cloned and installed PR7018 + gwPR280 ✅

image

image

image
image

@vic-en
Copy link
Contributor Author

vic-en commented May 21, 2024

@nikspz Seems only sells failed. I'll get back soon.

@vic-en
Copy link
Contributor Author

vic-en commented May 21, 2024

@nikspz Balancer pool ids are the longer addresses. That is why they worked.

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

Successfully merging this pull request may close these issues.

None yet

3 participants