Incorrect calculation of amounts from fees during withdrawal
When calling _withdraw(), a fee must be paid if protocolFee is greater than 0 at SablierFlow.sol:848
From the comments, we understand that the fee is expressed as a percentage, where 1e18 represents 100%, and the maximum fee is 0.1e18 (10%).
In the calculateAmountsFromFee function, the totalAmount is the input amount, and the fee has 18 decimals. This leads to an incorrect calculation of the feeAmount and netAmount.
Incorrect calculation of feeAmount and netAmount
The protocol receives more tokens than intended, while users withdraw fewer tokens than they should.
Manual code review
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.