Skip to content
DoS Audit finding Intermediate

stETH edge case in transfer rounding can cause denial of service for depositors and redeemers

The contract records the full requested stETH amount on deposit, but stETH may deliver 1-2 wei less due to share-based rounding, so later transfers of the recorded amount revert. This causes a denial of service for depositors and redeemers trying to cancel, claim, or process batches.

0x23r0 Follow with 0xShoonya, Kirkeelee and 1 other

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-07-mellow-flexible-vaults-judging/issues/141

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

Found by

0x23r0, 0xShoonya, Kirkeelee, t.aksoy

Summary

The use of stETH, which can transfer 1-2 wei less than requested due to its internal share-based accounting and rounding, will cause a denial of service for depositors and redeemers as the contract will revert when attempting to transfer more stETH than it actually holds.

Root Cause

The root cause of the issue lies in how the queue contracts handle the assets variable during deposits, cancellations, and batch processing. When a user deposits stETH, the contract assumes that the exact amount specified by the user is received and records this value in its internal accounting. However, due to stETH’s internal share-based accounting and rounding, the contract may actually receive 1-2 wei less than the requested amount. This discrepancy is not accounted for in the contract’s logic. As a result, when a user later cancels their deposit or when a batch is processed in the _handleReport function, the contract attempts to transfer the full recorded assets amount to the user or the vault using TransferLibrary.sendAssets. If the contract’s actual stETH balance is less than the recorded assets due to the initial shortfall, the transfer will revert. This leads to a denial of service for users attempting to cancel, claim, or process deposits/redeems, as the contract cannot fulfill the transfer with its actual balance. The fundamental problem is the assumption that the contract always receives and holds exactly the amount of stETH specified in user actions, without verifying or adjusting for the real amount received.

https://github.com/sherlock-audit/2025-07-mellow-flexible-vaults/blob/main/flexible-vaults/src/queues/DepositQueue.sol#L115

Internal Pre-conditions

  1. A user deposits or redeems stETH through the queue contracts.
  2. The contract receives slightly less stETH than requested due to stETH's transfer rounding.
  3. The contract records the full requested amount in its internal accounting.

External Pre-conditions

  1. stETH is used as the asset for the queue.
  2. stETH's transfer function rounds down and delivers less than the requested amount.

Attack Path

  1. User deposits or redeems stETH.
  2. The contract receives less stETH than expected.
  3. When the user later cancels, claims, or when a batch is processed, the contract attempts to transfer the full recorded amount.
  4. The transfer reverts because the contract does not have enough stETH, causing a denial of service for all subsequent users attempting to withdraw or claim.

Impact

The users cannot withdraw, claim, or process their deposits or redemptions, resulting in a denial of service for affected users. No funds are lost, but users are unable to access their assets.

PoC

No response

Mitigation

Track the actual amount of stETH received by checking the contract balance before and after transfers, and use the real received amount for all internal accounting and subsequent transfers.

The original report as published on Sherlock, by 0x23r0. 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 contract assumes it receives exactly the requested stETH amount and records that value, without adjusting for stETH's transfer rounding that can deliver 1-2 wei less.

Impact

Users cannot withdraw, claim, or process their deposits or redemptions, resulting in a denial of service; no funds are lost.

What the attacker needed

StETH is used as the asset for the queue; stETH transfer rounds down and delivers less

The fix

Track the actual amount of stETH received by checking the contract balance before and after transfers, and use the real received amount for all internal accounting and subsequent transfers.

How it was found

  1. A user deposits or redeems stETH through the queue contracts.
  2. The contract receives slightly less stETH than requested due to stETH's transfer rounding.
  3. The contract records the full requested amount in its internal accounting.
  4. When the user later cancels, claims, or when a batch is processed, the contract attempts to transfer the full recorded amount.
  5. The transfer reverts because the contract does not have enough stETH, causing a denial of service.

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.

stETH is a token whose transfers can arrive slightly short because of how it tracks shares internally. The vault trusted the requested amount instead of checking what actually arrived, so when it later tried to send that amount back it did not have enough and the transaction failed. This blocks users from getting their deposits or redemptions processed.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by 0x23r0

View all

23 more disclosed reports, best first.

More from Mellow Flexible Vaults

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.