#46838 [SC-Low] Agent Destruction Can Be Blocked by Malicious Collateral Pool Entries
Submitted on Jun 5th 2025 at 07:03:35 UTC by @Bluedragon for Audit Comp | Flare | FAssets
Report ID: #46838
Report Type: Smart Contract
Report severity: Low
Target: https://github.com/flare-foundation/fassets/blob/main/contracts/assetManager/implementation/CollateralPool.sol
Impacts:
Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol)
Description
Summary:
The CollateralPool system allows users to enter the pool even when the associated agent is in the "destroying" state. This creates a griefing attack vector where malicious actors can prevent legitimate agent destruction by entering the pool after an agent announces destruction, causing the destroy operation to fail due to the requirement that pool token supply must be zero for successful destruction.
Vulnerability Details:
The vulnerability exists in the pool entry validation logic. When examining the CollateralPool::enter() , there's no check to prevent entry when the agent is in a destroying state.
The agent destruction process requires that the collateral pool token supply be zero, but the current implementation allows new entries even after destruction has been announced. This is evident from the entry function which only validates minimum NAT amounts and pool state but doesn't check the agent's destruction status.
Scenario (step by step):
Agent Announces Destruction:
Agent calls
announceDestroyAgent()and enters destroying stateAgent waits for the required
withdrawalWaitMinSecondsperiod
Attacker Intervention:
Malicious actor monitors for agents in destroying state
Just before the agent attempts to call
destroyAgent(), attacker enters the poolPool token supply becomes non-zero
Destruction Failure:
Agent attempts to destroy the vault
Destruction fails due to non-zero pool token supply requirement
Agent remains stuck in destroying state
Continuous Griefing:
Attacker can repeat this process indefinitely
Each attack only requires minimal NAT deposit (MIN_NAT_TO_ENTER)
Agent cannot complete destruction process
Impact:
Agent Destruction Prevention: Legitimate agents cannot complete the destruction process
Griefing Attack Vector: Malicious actors can continuously prevent agent destruction with minimal cost
Operational Disruption: Agents become stuck in the destroying state indefinitely
Economic Harassment: Attackers can force agents to maintain collateral longer than intended
Recommended Mitigation:
Add a check in the enter function to prevent pool entry when the agent is in destroying state:
This simple check would prevent the griefing attack by blocking pool entry when the agent has announced destruction, ensuring that agents can complete the destruction process without interference.
Proof of Concept
Proof of Concept
Add the following test to the
Redemption.tsintest/unit/fasset/library/directoryRun the test using
yarn testHH
Logs
Was this helpful?