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

Not actual balances to check a new D value #45

Open
azat-hafizov opened this issue Feb 23, 2024 · 0 comments
Open

Not actual balances to check a new D value #45

azat-hafizov opened this issue Feb 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@azat-hafizov
Copy link
Collaborator

During the updateA() function, an assertion is made to ensure that the impact on the total calculated liquidity value is not too significant.

require(absolute < maxDeltaD, "Pool imbalanced");

However, this assertion relies on cached values of asset balances.

uint256 newD = _getD(balances, futureA);

Consequently, this assertion may produce false positives or false negatives, leading to undesired results.

@azat-hafizov azat-hafizov added the bug Something isn't working label Feb 23, 2024
@azat-hafizov azat-hafizov added this to the Tapio v1.5 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants