Flow

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

Adjusting protocol fee can retroactively change withdrawal amounts

Description:

When the protocol fee is changed via setProtocolFee(), it takes effect immediately and applies to the total amount withdrawn, regardless of whether the debt accrued before or after the fee change. Recipients withdrawing old debt can be charged the new, higher fee.

Summary:

An admin can initially set a low or 0% protocol fee to encourage higher volume, then once significant debt has accrued, raise the fee to the maximum 10% and collect outsized revenue on subsequent withdrawals, even though the debt originated under a lower-fee regime.

Vulnerability Details:

The _withdraw() function applies the current protocol fee indiscriminately:

UD60x18 protocolFee = protocolFee[token];
if (protocolFee > ZERO) {
(protocolFeeAmount, amount) = Helpers.calculateAmountsFromFee({ totalAmount: amount, fee: protocolFee });
protocolRevenue[token] += protocolFeeAmount;
}

An admin can exploit this in three steps:

  1. Set protocol fee to 0% to drive adoption

  2. Once high total debt accrued, raise fee to 10%

  3. Collect excess revenue on subsequent withdrawals

Impact:

Recipients could lose up to 10% of expected payments. Excess fees accrue to the protocol admin, an improper transfer of wealth. While impact is bound by MAX_FEE, this could still be substantial for high-value streams. Severe reputational damage if the admin is seen abusing this.

Tools Used:

Manual code review

Recommendations:

  1. Only apply fee changes prospectively, tracking fee at time debt incurred

  2. Assess fees continuously over shorter windows for a blended effective rate

  3. Require a time lock on fee hikes over a certain threshold to allow recipients to react

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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