pd.currentPrice in calcReserveAtRatioSwap() is not updated correctly. #59
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-11
🤖_primary
AI based primary recommendation
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-07-basin/blob/7d5aacbb144d0ba0bc358dfde6e0cc913d25310e/src/functions/Stable2.sol#L226
Vulnerability details
Impact
currentPrice
is converged towardstargetPrice
as reserve oftoken0
ortoken1
changes.lpTokenSupply
is calculated fromscaledReserves
which is updated insidefor
loop. ButlpTokenSupply
in here is calculated only once beforefor
loop and keeps unchanged.Tools Used
Manual audit
Recommended Mitigation Steps
Assessed type
Other
The text was updated successfully, but these errors were encountered: