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

SOR - Add support for LBPs #1151

Open
brunoguerios opened this issue Nov 7, 2024 · 5 comments
Open

SOR - Add support for LBPs #1151

brunoguerios opened this issue Nov 7, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@brunoguerios
Copy link
Member

Make sure this pool on gnosis is being picked up by the SOR: https://balancer.fi/pools/gnosis/v2/0x373B347BC87998B151A5E9B6BB6CA692B766648A0002000000000000000000D7

@brunoguerios brunoguerios added the enhancement New feature or request label Nov 7, 2024
@brunoguerios brunoguerios self-assigned this Nov 7, 2024
@brunoguerios
Copy link
Member Author

Franz implemented this by handling LBPs as Weigthed pools.
I'm still checking with Daniel if there's need to add a final tweak, but likely not.

@brunoguerios
Copy link
Member Author

The expectation is that LBPs can be handled as Weighted pools from the SOR perspective, but it would be nice to have a test scenario that would check if an LBP with no trades is properly picked up.

The assumption is that even without trades and NL defaulting to zero, SOR would make it a low priority, but not filter out the pool/path. This should be ok, because normally and LBP is a token launch and no other higher liquidity pool will have that token available for swapping.

In case no trades mean the pool is filtered out from path finding, then we should adapt the code to make sure it's included.

@franzns
Copy link
Collaborator

franzns commented Nov 28, 2024

This is done?

@brunoguerios
Copy link
Member Author

No, I didn't add the extra test and it's kinda low priority at the moment. Should take a while until I get to this.

@brunoguerios
Copy link
Member Author

@franzns - the assumption here is that normalizedLiquidity computation is done after every swap event, so we'd need a swap on the LBP for its tokenPairData to be filled out in the DB, but that's not the only moment this sync is called, right?
Maybe a better question: when is fetchTokenPairData called other than after every swap event?
If we do call it on a cron job or when the pool is first picked up by subgraph, we don't actually need the extra test and we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants