Skip to content
Business logic Audit finding Intermediate

Agent can frontrun executor to steal unclaimed executor fee in minting process

The executor fee paid during collateral reservation is only released to the executor if that executor calls executeMinting themselves; if anyone else calls it, the fee goes to the agent's collateral pool and vault. Because an agent can also call executeMinting as a safety mechanism, the agent can frontrun the executor's transaction and take the fee.

avoloder Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#46714 [SC-Medium] Agent can frontrun executor to steal unclaimed executor fee in minting process

Submitted on Jun 3rd 2025 at 20:55:07 UTC by @avoloder for Audit Comp | Flare | FAssets

Description

Brief/Intro

Agents can frontrun executors in the minting process to steal their fees by calling executeMinting first, causing the executor's fee to be distributed as part of the collateral reservation fee instead of being paid to the executor.

Vulnerability Details

When a user reserves collateral for minting (CollateralReservations.sol), any excess funds sent beyond the required reservation fee are designated as the executor's fee.

However, the executor fee is only paid if the executor themselves calls executeMinting (Minting.sol). If the msg.sender is not the executor, the fee will be distributed to the agent's collateral pool and to the agent's vault address.

The issue lies within the fact that executeMinting can also be called by the agents themselves, as a safety mechanism to release their collateral if the minter becomes unresponsive. This gives agents the option to frontrun the executor's transaction and steal their unclaimed fee since there is no time delay or waiting period that would protect the executor.

Impact Details

The impact is high as the unclaimed fees from the executors could easily be stolen by the agent

References

https://github.com/flare-labs-ltd/fassets/blob/acb82a27b15c56ce9dfbb6dbbd76008da6753c26/contracts/assetManager/library/CollateralReservations.sol#L57-L71

https://github.com/flare-labs-ltd/fassets/blob/acb82a27b15c56ce9dfbb6dbbd76008da6753c26/contracts/assetManager/library/Minting.sol#L61-L68

Proof of Concept

Proof of Concept

  1. User A reserves collateral with excess NAT, designating User B as executor
  2. User A makes the required payment
  3. User B attempts to execute minting to claim their fee
  4. Agent frontruns User B's transaction
  5. Agent's transaction executes first, distributing executor fee to agent's pools
  6. User B's transaction fails and User B does not receive his/her fees

The original report as published on Immunefi, by avoloder. 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 fee payout is tied to msg.sender being the executor rather than to the designated executor address, and agents are allowed to call executeMinting with no delay protecting the executor.

Impact

Unclaimed executor fees could be stolen by the agent, though the report does not show a live exploit.

What the attacker needed

A minting reservation with an executor fee; attacker is the agent for that mint; attacker can frontrun the executor's transaction

The fix

The fee should be paid to the designated executor address regardless of who calls executeMinting, or the agent's safety call should be separated so it cannot capture the executor fee.

How it was found

  1. A user reserves collateral with extra funds and names another user as executor
  2. The user makes the required payment
  3. The executor tries to call executeMinting to collect the fee
  4. The agent frontruns with its own executeMinting call
  5. The agent's call lands first and the fee goes to the agent's pools
  6. The executor's transaction fails and the fee is not received

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 someone mints an asset, they can pay a little extra as a reward for a helper called an executor who finishes the process. The contract only hands that reward to the executor if the executor is the one who triggers the final step. An agent, who is the other party in the deal, can trigger that same step first and the reward then goes to the agent instead.

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 avoloder

View all

10 more disclosed reports, best first.

More from Flare | FAssets

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.