#45961 [SC-Insight] `selfMint()` Can Lead to Permanent Loss of Agents' Funds During Emergency Pause

Submitted on May 22nd 2025 at 23:35:41 UTC by @danvinci_20 for Audit Comp | Flare | FAssets

  • Report ID: #45961

  • Report Type: Smart Contract

  • Report severity: Insight

  • Target: https://github.com/flare-foundation/fassets/blob/main/contracts/assetManager/facets/MintingFacet.sol

  • Impacts:

    • Permanent freezing of funds

Description

Description

The selfMint() function in the Flare Assets protocol enables agents to mint assets for themselves after submitting an underlying payment. However, the function is guarded by the notEmergencyPaused modifier, which disables minting when an emergency pause is active.

This becomes problematic because the proof of payment used in selfMint() is only valid for 24 hours. If the system is paused during this time, users are blocked from calling selfMint(), and once the proof expires, the user has no way to recover or utilize the sent funds, resulting in a total loss of funds.

function selfMint(
        IPayment.Proof calldata _payment,
        address _agentVault,
        uint256 _lots
    )
        external
        onlyAttached
       @>>  notEmergencyPaused    {
        Minting.selfMint(_payment, _agentVault, _lots.toUint64());
    
}

unlike other functionalities that involves submitting valid proof the notEmergencyPaused is safely removed to prevent this possibility

Impact Details

Consider a situation when user sends the required underlying payment and the system is now paused before they call selfMint(), the function becomes completely inaccessible due to the notEmergencyPaused modifier. Since payment proofs expire after 24 hours, any emergency pause exceeding this window results in a total, irrecoverable loss of user funds, even though the payment was valid.

Furthermore what makes this funds irrecoverable is actually due to the fact that if the agent withdraws this from the underlying address they can get challenged and enter fullLiquidation

Recommendations

To prevent against this we can promptly remove the modifier on selfMint():

Proof of Concept

Proof of Concept

Let's consider this Scenario where the agents' funds can be locked Scenario:

  1. A user makes an underlying payment of 10,000 tokens intending to mint.

  2. They plan to immediately call selfMint() but find the system is emergency paused.

  3. The pause lasts let's say for 36 hours.

  4. Once the pause is lifted, the user cannot make a call for selfMint() due to an expired proof.

The funds are now permanently locked in the agents' EOA account

Was this helpful?