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.
- 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
- Report ID: #46378
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/flare-foundation/fassets/blob/main/contracts/assetManager/library/RedemptionRequests.sol
- Impacts:
- Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield
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:
- Partial Payments Without Reversion: The
payoutFromVaultfunction usesMath.min()to return partial collateral when agent vaults are undercollateralized, without reverting the transaction:
_amountPaid = Math.min(_amountWei, collateral.token.balanceOf(address(vault)));
- Unconditional F-Asset Burn: Immediately after payment,
burnFAssetsdestroys the full F-asset amount regardless of actual collateral received:
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:
-
Redemption Request:
User calls
redeemFromAgentInCollateral(2,200 FUSD)Protocol calculates required collateral:
Required Collateral = (2,200 FUSD ÷ 1,800 FUSD) × 1 ETH = 1.222 ETH
paymentWei = 1.222 ETH (in wei equivalent)
- Partial Payment Execution:
// In payoutFromVault():
_amountPaid = min(1.222 ETH, 1 ETH) = 1 ETH
User receives only 1 ETH ($1,800 value at current prices)
- Unconditional Asset Burn:
Redemptions.burnFAssets(msg.sender, 2,200 FUSD) // $2,200 value destroyed
- 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
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
- An agent vault becomes undercollateralised because the collateral price drops.
- A user calls redeemFromAgentInCollateral for an amount larger than the vault can fully cover.
- The payout function returns only the available collateral using a minimum calculation.
- The protocol burns the user's full F-asset amount regardless of the partial payout.
- 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.