Multiple consecutive rounding down operations during fee distribution in UpliftOnlyExample::onAfterRemoveLiquidity(), including a critical division rounding, cause cumulative value leakage over time, resulting in lost revenue for both the protocol and LPs.
The contract performs multiple rounding down operations when calculating and distributing fees:
1- Initial division rounding down when setting fee percentage:
2- Second rounding down when calculating exit fee:
3- Third rounding down when calculating admin fee portion:
4- And last calculation with two consecutive rounding downs:
leakage of value on the long run
Manual Review
its better to round Up for fee calculations, cause it cost nothing for the user withdrawing, but leaks value on the long run for the admin
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.