Fee amount is calculated as below:
mul()
function: https://github.com/PaulRBerg/prb-math/blob/280fc5f77e1b21b9c54013aac51966be33f4a410/src/ud60x18/Math.sol#L450
From prb-math's dev note, function mulDiv18()
is rounding down: https://github.com/PaulRBerg/prb-math/blob/280fc5f77e1b21b9c54013aac51966be33f4a410/src/Common.sol#L480
Rounding down fee can lead to negative impact, as it should always rounding down in every protocol
Financial problem
Manual review
feeAmount
should be rounding up.
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.