Omission of `_refreshVirtualPoolValue()` causes stale fees and PLP price
The _payout() function in PositionInteractionFacet updates pool balances but fails to update the virtual pool state and emit updated PLP pricing.
The _payout() function in PositionInteractionFacet updates pool balances but fails to update the virtual pool state and emit updated PLP pricing. This leads to stale virtual pool values used in dynamic fee calculations and outdated PLP price reporting.
The issue occurs because:
-
Pool balance changes in
_payout():poolAmount[pos.uAsset]and/orpoolAmount[pos.buyToken], affect total pool value. -
Stale
virtualNetPoolValuevalues affect dynamic fee application:
function _calcFeeRate(...) internal view returns (int256 delta, uint256 feeRate) {if (PoolStorage.layout().setUp.assets.totalWeight == 0|| PoolStorage.layout().ledger.state.virtualNetPoolValue == 0) return (0, feeRate);}
- PLP price emissions are also missed.
Recommendation:
Apply _refreshVirtualPoolValue() and _emitPLPPrice() called in _payout().
Report provenance
Published by Pashov Audit Group, with Carlos (Bloqarl) participating as a contractor. The source report states that its fixes review was not fully completed; no final remediation disposition is recorded for this finding. Read the full report.