Skip to content
Business logic Audit finding Intermediate

No maximum on `dustThreshold` allows management to lock user funds

The setDustThreshold function lacks a maximum limit, allowing management to set an extremely high value that prevents auctions from occurring. This causes user funds from liquidations to become permanently locked in the strategy contract.

Robert Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-05-yearn-ybold-judging/issues/90

Found by

Robert

Summary

Because there is no maximum amount on dustThreshold, management can increase it to an absurdly high number. By doing this, they stop all auctions from happening. Users will continue to lose BOLD to liquidations but will not be able to receive anything in return, therefore leading to permanent locking of funds users are owed.

Root Cause

Strategy.sol#L155:

/// @notice Set the dust threshold for the strategy /// @param _dustThreshold New dust threshold function setDustThreshold( uint256 _dustThreshold ) external onlyManagement { require(_dustThreshold >= MIN_DUST_THRESHOLD, "!minDust"); dustThreshold = _dustThreshold; }

This function allows management to set dust threshold. It has a minimum amount, but no maximum. If a maximum is added it will stop management from being able to lock user funds.

Internal Pre-conditions

  1. Admin sets dustThreshold absurdly high
  2. Users funds owed to them from liquidations are locked as collateral in the strategy contract

External Pre-conditions

  1. Liquidations must occur for it to have an actual effect

Attack Path

  1. Management sees a large amount of incoming liquidations
  2. Management sets dustThreshold very high so auctions cannot occur
  3. User funds taken by liquidations are permanently locked

Impact

The attacker doesn't inherently gain anything from the attacker but users suffer from locking of their funds. If done directly before a large amount of liquidations, this could be a significant amount of user funds.

PoC

No response

Mitigation

Add a maximum amount to dust threshold such as 1e18

The original report as published on Sherlock, by Robert. 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 setDustThreshold function only enforces a minimum value and does not enforce a maximum, allowing management to set an arbitrarily high threshold that disables auctions.

Impact

User funds from liquidations could be permanently locked, with the potential for significant loss if timed before a large amount of liquidations.

What the attacker needed

Management role; liquidations occur

The fix

A maximum amount should be added to the dust threshold, such as 1e18.

How it was found

  1. Management sees a large amount of incoming liquidations
  2. Management sets dustThreshold very high so auctions cannot occur
  3. User funds taken by liquidations are permanently locked

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.

In this system, a 'dust threshold' is a minimum amount that determines when small leftover funds can be auctioned off. The person in charge can set this threshold very high, which stops any auctions from happening. As a result, when users lose money through liquidations, that money gets stuck in the contract and cannot be returned to them.

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 Robert

View all

1 more disclosed report, best first.

More from Yearn yBOLD

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.