Skip to content
Business logic Audit finding Intermediate

User can instantly `unlock` most of his funds with less fee when he is unique `staker`/`liquidityProvider`

A user who is the only staker or liquidity provider can repeatedly call instant unlock with a zero unlock period, and the penalty that should be distributed to other participants is returned to their own locker, allowing them to bypass most of the 80% fee. The attacker can unlock almost all their funds immediately with minimal cost.

Artur Follow with globalace and newspacexyz

Originally disclosed on Sherlock

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

Found by

Artur, globalace, newspacexyz

Summary

User can bypass instant unlock fee when he is unique staker and liquidityProvider.

Root Cause

FluidLocker.unlock checks STAKER_DISTRIBUTION_POOL and LP_DISTRIBUTION_POOL have non-zero units. But if user is unique staker or liquidityProvider, distributed penalty returns to user's locker.

Solidity
    function _instantUnlock(uint256 amountToUnlock, address recipient) internal {
        // Calculate instant unlock penalty amount
        uint256 penaltyAmount = (amountToUnlock * _INSTANT_UNLOCK_PENALTY_BP) / BP_DENOMINATOR;


        (, uint256 providerAllocation) = STAKING_REWARD_CONTROLLER.getTaxAllocation();


        // Distribute penalty to provider (connected to the LP_DISTRIBUTION_POOL)
        uint256 actualProviderDistributionAmount =
@>          FLUID.distribute(address(this), LP_DISTRIBUTION_POOL, penaltyAmount * providerAllocation / BP_DENOMINATOR); // @audit returns to locker


        // Distribute penalty to staker (connected to the STAKER_DISTRIBUTION_POOL)
        uint256 actualStakerDistributionAmount =
@>          FLUID.distribute(address(this), STAKER_DISTRIBUTION_POOL, penaltyAmount - actualProviderDistributionAmount); // @audit returns to locker


        // Transfer the leftover $FLUID to the locker owner
        FLUID.transfer(recipient, amountToUnlock - actualProviderDistributionAmount - actualStakerDistributionAmount);


        emit FluidUnlocked(0, amountToUnlock, recipient, address(0));
    }

This means user can call instantly unlock repeatedly and he can unlock most of his funds with less fee. (Dust of fee can be locked in contract because penalty is always exist and unlock amount is greater than MIN_UNLOCK_AMOUNT)

Internal Pre-conditions

User is unique staker/liquidityProvider.

External Pre-conditions

.

Attack Path

  1. User must be unique staker and unique liquidityProvider. (stakes and provide liquidity small amount of FLUID token)
  2. User calls unlock his whole available tokens repeatedly with unlockPeriod = 0.
  3. User's locker receives his whole penalty.
  4. Penalty is 80% but he can bypass fee.
  5. User unlock his almost available funds without fee.

Impact

User can bypass penalty(80%) and unlock immediately his almost available tokens.

PoC

No response

Mitigation

Check locker is unique staker or liquidityProvider and revert it.

Solidity
require(STAKER_DISTRIBUTION_POOL.getTotalUnits() > STAKER_DISTRIBUTION_POOL.getUnits(address(this)), "Unique staker");
require(LP_DISTRIBUTION_POOL.getTotalUnits() > LP_DISTRIBUTION_POOL.getUnits(address(this)), "Unique Liquidity Provider");

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/superfluid-finance/fluid/pull/25

The original report as published on Sherlock, by Artur. 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

The instant unlock function distributes the penalty to the staker and liquidity provider pools, but if the user is the sole member of those pools, the distributed amount is credited back to their own locker, effectively refunding the penalty.

Impact

A user who is the sole staker or liquidity provider can bypass the 80% instant unlock penalty and unlock almost all their tokens immediately with minimal fee.

What the attacker needed

User is the only staker or liquidity provider; User has FLUID tokens locked

The fix

The protocol team fixed this issue in a pull request.

How it was found

  1. User becomes the only staker and the only liquidity provider by staking and providing a small amount of FLUID.
  2. User calls unlock on their whole available token balance repeatedly with unlockPeriod set to 0.
  3. The penalty that is distributed to the staker and liquidity provider pools is returned to the user's own locker.
  4. User effectively bypasses the 80% penalty and unlocks almost all funds without paying the fee.

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 unlock funds early, a fee is taken and shared among other people who stake or provide liquidity. If you are the only such person, that fee comes back to you, so you pay almost nothing. This report shows that by being the only participant, you can avoid the early unlock fee.

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 Artur

View all

2 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.