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: incldue bin liquidity in getBin for BinPool #101

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

ChefMist
Copy link
Collaborator

resolve https://github.com/pancakeswap/pancake-v4-core/issues/100

This PR includes a third return value binLiquidity in poolManager.getBin(poolId, binId)

{
(binReserveX, binReserveY) = pools[id].getBin(binId);
PoolKey memory key = poolIdToPoolKey[id];
Copy link
Collaborator Author

@ChefMist ChefMist Jun 28, 2024

Choose a reason for hiding this comment

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

this also imply we might need poolIdToPoolKey to stay since the param is poolId which does not include binStep

@ChefMist
Copy link
Collaborator Author

verified quite hard to replicate the entire math on subgraph, merging

@ChefMist ChefMist merged commit 52b2168 into main Jun 28, 2024
2 checks passed
@ChefMist ChefMist deleted the feat/include-bin-liquidity branch June 28, 2024 11:10
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 this pull request may close these issues.

Follow up from https://github.com/pancakeswap/pancake-v4-core/issues/96
2 participants