Skip to content
Smart contracts Audit finding Intermediate

Unconditional F-Asset burn during partial collateral redemptions enables direct theft of user funds

The redemption function burns the user's full F-asset amount before confirming that the agent vault paid the corresponding collateral. When an agent vault is undercollateralised, the user receives only partial collateral but loses the entire F-asset amount, allowing a malicious agent to profit by hovering just above the liquidation threshold.

DSbeX Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#46378 [SC-High] Unconditional F-Asset burn during partial collateral redemptions enables direct theft of user funds

Submitted on May 29th 2025 at 07:17:13 UTC by @DSbeX for Audit Comp | Flare | FAssets

Description

Brief/Intro

The RedemptionRequests::redeemFromAgentInCollateral function permanently burns users' F-assets before verifying successful collateral payout. When agent vaults are undercollateralized, users lose their F-assets while receiving only partial collateral (or nothing), enabling direct theft of user funds.

Vulnerability Details

Agents remain operational during undercollateralization periods before liquidation triggers. The protocol fails to suspend redemptions or implement safeguards during this danger zone, allowing agents to process requests while incapable of full payment.

The vulnerability stems from two flawed interactions:

  1. Partial Payments Without Reversion: The payoutFromVault function uses Math.min() to return partial collateral when agent vaults are undercollateralized, without reverting the transaction:
JavaScript
_amountPaid = Math.min(_amountWei, collateral.token.balanceOf(address(vault)));
  1. Unconditional F-Asset Burn: Immediately after payment, burnFAssets destroys the full F-asset amount regardless of actual collateral received:
JavaScript
Redemptions.burnFAssets(msg.sender, closedUBA); // Burns entire amount

This creates a value imbalance where users permanently lose F-asset value exceeding the collateral received. The vulnerability is exacerbated by: Lack of validation between paid collateral and burned assets

No mechanism to refund/protect partially redeemed F-assets

Silent acceptance of undercollateralized payouts

Impact Details

New Attack Vector: Malicious agents can intentionally hover just above liquidation thresholds to steal funds

Unintentional Harm: Legitimate agents facing temporary price drops harm users unintentionally

Systemic Risk: All users redeeming during collateral dips face uncompensated asset loss

References

Vulnerable function: https://github.com/flare-foundation/fassets/blob/fc727ee70a6d36a3d8dec81892d76d01bb22e7f1/contracts/assetManager/library/RedemptionRequests.sol#L97

Partial payment logic: https://github.com/flare-foundation/fassets/blob/fc727ee70a6d36a3d8dec81892d76d01bb22e7f1/contracts/assetManager/library/Agents.sol#L252

Proof of Concept

Proof of Concept

Scenario Setup:

Agent Collateral: 1 ETH ($2,000 value)

Agent Liability: 1,800 FUSD ($1,800 value)

ETH Price: Drops to $1,800 (agent becomes undercollateralized)

User redeems: 2,200 FUSD ($2,200 value)

Attack Flow:

  1. Redemption Request:

    User calls redeemFromAgentInCollateral(2,200 FUSD)

    Protocol calculates required collateral:

JavaScript
Required Collateral = (2,200 FUSD ÷ 1,800 FUSD) × 1 ETH = 1.222 ETH

paymentWei = 1.222 ETH (in wei equivalent)

  1. Partial Payment Execution:
JavaScript
// In payoutFromVault():
_amountPaid = min(1.222 ETH, 1 ETH) = 1 ETH

User receives only 1 ETH ($1,800 value at current prices)

  1. Unconditional Asset Burn:
JavaScript
Redemptions.burnFAssets(msg.sender, 2,200 FUSD) // $2,200 value destroyed
  1. Final Position:

User receives: 1 ETH ($1,800)

User loses: 2,200 FUSD ($2,200)

Net Loss: $400 (18.2% of redeemed value)

Agent Gains: Liability reduced by $2,200 while paying only $1,800 worth of collateral

The original report as published on Immunefi, by DSbeX. 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

The redemption logic burns the full F-asset amount unconditionally after a payout that may be capped by the vault's available collateral, without checking that the paid amount matches the burned amount.

Impact

A malicious agent could intentionally stay just above the liquidation threshold to steal user funds, and legitimate agents facing price drops could unintentionally cause users to lose the unredeemed value.

What the attacker needed

Agent vault is undercollateralised; user redeems more than the vault can cover

The fix

The redemption should either revert when the vault cannot pay the full amount or burn only the F-assets corresponding to the collateral actually paid.

How it was found

  1. An agent vault becomes undercollateralised because the collateral price drops.
  2. A user calls redeemFromAgentInCollateral for an amount larger than the vault can fully cover.
  3. The payout function returns only the available collateral using a minimum calculation.
  4. The protocol burns the user's full F-asset amount regardless of the partial payout.
  5. The user loses the difference between the burned F-assets and the collateral 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.

F-assets are tokens that represent a claim on collateral held by an agent. When a user redeems them, the protocol should give back the matching collateral and destroy the tokens. Here the tokens are destroyed in full even when the agent can only pay part of the collateral, so the user loses value and the agent keeps the difference.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by DSbeX

View all

11 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.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.