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: Filter out useless Balancer pools #2204

Closed
sunce86 opened this issue Dec 21, 2023 · 1 comment · Fixed by #2205
Closed

feat: Filter out useless Balancer pools #2204

sunce86 opened this issue Dec 21, 2023 · 1 comment · Fixed by #2205

Comments

@sunce86
Copy link
Contributor

sunce86 commented Dec 21, 2023

Problem

On colocation activation, we started seeing logs https://production-6de61f.kb.eu-central-1.aws.cloud.es.io/app/r/s/aTHp4
Specifically, two bad tokens are involved 0xbd1bd5c956684f7eb79da40f582cbe1373a1d593 and 0x1b808f49add4b8c6b5117d9681cf7312fcf0dc1d, where the latter one is even in the unsupported_tokens list right now.

After investigation, I realized that Balancer liquidity fetcher (which has a function get_registered_pools() is indexing pool https://etherscan.io/address/0x94ffd754170b741c9a22bf66885681ef4ce1ea07. This pool is useless and we need to figure out how to filter it out based on some additional liqudity field of Balancer subgraph or similar.

Suggested solution

Adjust the get_registered_pools to only return meaningul pools.

Acceptance criteria

No more "error retrieving allowance for token" errors.

@sunce86 sunce86 changed the title feat: Skip liquidity fetching for unsupported tokens feat: Filter out useless Balancer pools Dec 21, 2023
@MartinquaXD
Copy link
Contributor

MartinquaXD commented Dec 21, 2023

The orderbook and autopilot have --balancer-pool-deny-list for that.
And in the driver config it's called pool-deny-list under the balancer section.

sunce86 added a commit that referenced this issue Dec 22, 2023
# Description
Fixes #2204

By filtering out pools that basically don't have meaningful liquidity we
reduce the number of pools from ~1300 to ~500 and also eliminate
problematic pools (with old problematic tokens).

## How to test
Play with unit test `balancer_subgraph_query`
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

Successfully merging a pull request may close this issue.

2 participants