The potential precision loss in the provided remainingRecapitalization()
function occurs due to the intermediate division operation.
Here:
This division and multiplication by 1e6
aims to round down totalDollars
to the nearest USDC
. However, this operation could result in precision loss due to truncation during the division process.
This imprecision could result in wrong calculations such as calculation of how many new Deposited Beans
will be minted in addUnderlying()
where remainingRecapitalization()
is used i.e:
Manual Review
This way, the multiplication operation is carried out first, followed by the division, maintaining precision.
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.