nutsfinance/tapio-eth

Not actual balances to check a new D value

azat-hafizov opened this issue · 0 comments

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.