Flow

Sablier
FoundryDeFi
20,000 USDC
View results
Submission Details
Severity: high
Invalid

Missing Maximum Fee Validation in `withdraw` Function

Summary

The withdraw function lacks a check to ensure the protocol fee does not exceed a maximum allowable limit. This oversight could result in excessive fees being applied to user withdrawals.

Vulnerability Details

The withdraw function checks if the protocol fee is greater than zero but does not validate it against a maximum fee cap.

// ... SNIP ...
if (protocolFee > ZERO) {
// Calculate the protocol fee amount and the net withdraw amount.
(protocolFeeAmount, amount) = Helpers.calculateAmountsFromFee({ totalAmount: amount, fee: protocolFee });
// Safe to use unchecked because addition cannot overflow.
unchecked {
// Effect: update the protocol revenue.
protocolRevenue[token] += protocolFeeAmount;
}
}
// ... SNIP ...

Impact

Users may receive significantly less than expected due to high fees and also they may lose trust in the platform if fees are perceived as unfair or excessive

Tools Used

Manual Review

Recommendations

Validate the protocol fee against this maximum limit within the withdraw function

Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.