Skip to content
Business logic Audit finding Intermediate

Program start failure due to incorrect buffer calculation

The buffer calculation for starting a funding program incorrectly sums two flow rates before computing the required buffer, ignoring that each flow may require a minimum deposit. This underestimates the buffer, causing the funding transaction to revert and preventing the admin from starting the program.

0x73696d616f Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-06-superfluid-locker-system-judging/issues/233

This issue has been acknowledged by the team but won't be fixed at this time.

Found by

0x73696d616f

Summary

The buffer to start funding is defined as uint256 buffer = program.token.getBufferAmountByFlowRate(fundingFlowRate + subsidyFlowRate);.

However, due to the existence of the minimum deposit, whenever one of these rates multiplied by the liquidation period is smaller than the minimum buffer, the buffer needed will be underestimated and the program funding reverts as the resulting realtime balance of the FluidEPProgramManager is 0 after flowing (due to the wrong buffer).

This happens because it distributes 2 different flows (program + tax), so each one of them may require at least a minimum deposit. However, summed together (current estimate), they may require less than 2 minimum deposits (or only one of them would require a minimum deposit, but together with the other one, it would just increase the buffer by a smaller amount).

Root Cause

In FluidEPProgramManager:265, buffer is calculated as if it was 1 distributed flow, but due to the minimum deposit it is not the same.

Internal Pre-conditions

None.

External Pre-conditions

None.

Attack Path

  1. Admin calls startFunding(), but one of the flow rates is too small and the total buffer required if the flow rate is approximated as one is smaller than the effective required buffer of distributing the 2 flows separately.

Impact

DoSed FluidEPProgramManager::startFunding(). Not only it is time sensitive, but also it won't allow the admin to start flows with all possible values, which is key functionality.

PoC

None.

Mitigation

Calculate the buffer individually for each flow rate.

The original report as published on Sherlock, by 0x73696d616f. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the buffer was calculated by summing the two flow rates and treating them as a single flow, but the minimum deposit requirement applies per flow, so the combined buffer is insufficient.

Impact

This could cause a denial of service on startFunding(), preventing the admin from starting flows with certain values, which is key functionality.

What the attacker needed

Admin calls startFunding(); One flow rate is small enough to trigger minimum deposit

The fix

The buffer should be calculated individually for each flow rate and then summed.

How it was found

  1. Admin calls startFunding() with one flow rate small enough that the combined buffer is underestimated.
  2. The transaction reverts because the realtime balance becomes zero after the flows are started.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you start a money flow in this system, you must lock up a small extra amount as a safety buffer. The code calculated this buffer as if there was only one flow, but actually two separate flows are started, and each might need its own minimum buffer. So the total buffer was too small, and the transaction failed.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by 0x73696d616f

View all

172 more disclosed reports, best first.

More from Superfluid Locker System

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.