Skip to content
Business logic Audit finding Intermediate

Any address can insert a request at the head of another controller's queue, and the ERC-4626 claim entrypoints and max* views only read that head

Any address can create a dust deposit or redeem request for another controller, which lands at the head of that controller's queue. The ERC-4626 claim entrypoints and max* views only read the head, so integrations sizing claims from those views see an understated amount or revert until the extra head entry is handled.

W3B_SR_0xki Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#97792 [SC-Low] Any address can insert a request at the head of another controller's queue, and the ERC-4626 claim entrypoints and max* views only read that head

Submitted on Nov 3rd 2026 at 08:34:07 UTC by @W3B_SR_0xki for Audit Competition | Plether

Description

Target: packages/perps/src tree at a82d4fefb02768e5b3bddcc97dee371eee24fea8 (TrancheVault.sol) Impact: Insight — Security best practices

Description

Each TrancheVault controller has one queue of deposit requests and one queue of redeem requests, ordered by request epoch. The ERC-4626 entrypoints and the max* views read only the queue head:

  • Claims use controllerDepositHead / controllerRedeemHead (TrancheVault.sol:953-1012):
    • deposit(assets, receiver[, controller])
    • mint(shares, receiver[, controller])
    • withdraw(assets, receiver, controller)
    • redeem(shares, receiver, controller)
  • Views read the same head (TrancheVault.sol:1285-1311): maxDeposit, maxMint, maxWithdraw, maxRedeem.

The head can be created by an address other than the controller:

  • requestDeposit(assets, controller, owner) checks only that the caller is owner or its operator (_requireRequestDepositPreflight, TrancheVault.sol:1574-1584). It does not check the controller.
  • requestRedeem(shares, controller, owner) likewise authorizes only owner (TrancheVault.sol:606-631). The minimum request size does not apply when the owner redeems its full balance (_requireMinimumRedeemSize, TrancheVault.sol:1611-1618), so the inserted request can be dust.

A request created for a controller is added to that controller's queue (_appendControllerDeposit / _appendControllerRedeem, TrancheVault.sol:1742-1796). If it lands in an earlier epoch than the controller's own request, it becomes the head.

From then on, until the controller claims that head through a separate transaction:

  • maxWithdraw(controller) and maxRedeem(controller) report only the head's claimable amount.
  • withdraw and redeem act only on the head, so a call sized to the controller's own funded request reverts with ERC4626ExceededMaxWithdraw / ERC4626ExceededMaxRedeem.

The same applies on the deposit side.

Impact

  • Nothing is lost:
    • The controller receives the inserted request's value.
    • Its own request can always be claimed with the explicit-id functions claimRedeem(requestId, …) and claimDeposit(requestId, …).
  • Integrations that use only the standard ERC-4626/7540 surface misbehave in this state:
    • An integration that sizes claims from maxWithdraw / maxRedeem and claims through withdraw / redeem sees an understated amount, or a revert, until it handles the extra head entry.
    • Any address can put a controller in this state for the cost of a dust request.
  • This is not documented. SECURITY.md "LP claim and allocation limitations" covers receiver rules and rounding, but not head-only aggregation or requests created by third parties.

Recommendation

Any one of the following:

  • Have the id-less entrypoints and max* views walk the controller's claimable requests in order, aggregating across them, instead of reading only the head.
  • Require controller consent for requests created by another address: msg.sender == controller or an approved operator of the controller. ERC-7540 allows vaults to add this.
  • Document that the id-less entrypoints and max* views reflect only the oldest request. Point integrators to claimDeposit / claimRedeem with an explicit request id, and to PerpsPublicLens.getLpRequestState for per-request balances.

Proof of Concept

Proof of Concept

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

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 id-less ERC-4626 entrypoints and max* views aggregate only the queue head, while request creation does not require the controller's consent.

Impact

Nothing is lost and the controller can still claim its own request with explicit-id functions, but integrations using only the standard ERC-4626/7540 surface could see an understated amount or a revert until they handle the extra head entry.

What the attacker needed

Victim has a queued request; attacker can submit a dust request; attacker request lands in an earlier epoch

The fix

The id-less entrypoints and max* views should aggregate across all claimable requests in order, or requests created by another address should require controller consent, and the head-only behaviour should be documented.

How it was found

  1. Create a dust deposit or redeem request for a victim controller from an address that is not the controller.
  2. Ensure the inserted request lands in an earlier epoch than the controller's own request so it becomes the head.
  3. Observe that maxWithdraw and maxRedeem report only the head's claimable amount.
  4. Observe that withdraw and redeem sized to the controller's own funded request revert with ERC4626ExceededMaxWithdraw or ERC4626ExceededMaxRedeem.

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.

A vault keeps a queue of deposit and redeem requests for each controller. The standard claim functions and the max* views only look at the oldest request in that queue. Because anyone can add a tiny request for someone else's controller, an attacker can make that oldest entry be theirs, so the victim's normal claim calls see the wrong amount or fail.

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 W3B_SR_0xki

View all

13 more disclosed reports, best first.

More from Plether

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.