https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/StabilityPool/StabilityPool.sol#L202
Incorrect calculation in StabilityPool.sol::calculateRcrvUSDAmount
When rToken has more decimal than deToken, number of decimal of deToken should be increase to get the amount of rToken. However, the current implementation incorrectly adjusts the scaling factor, leading to erroneous calculations.
Users will receive a lesser amount of rToken than expected when calling StabilityPool.sol::withdraw
to retrieve their tokens from the protocol.
Manual review
Both tokens have 18 decimals. Info
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.