Rewards claiming functionality is broken.
The reward-claiming functions in the AgentVault contract pass a hard-coded flag that asks the rewards manager to send native currency rather than the wrapped token. Because the vault's receive function rejects incoming native currency unless an internal withdrawal flag is set, the claim call reverts and the agent can never collect its rewards.
Originally disclosed on Immunefi
- Disclosed after under an hour
#46271 [SC-Medium] Rewards claiming functionality is broken.
Submitted on May 27th 2025 at 16:25:16 UTC by @farman1094 for Audit Comp | Flare | FAssets
- Report ID: #46271
- Report Type: Smart Contract
- Report severity: Medium
- Target: https://github.com/flare-foundation/fassets/blob/main/contracts/assetManager/implementation/AgentVault.sol
- Impacts:
- Permanent freezing of unclaimed yield
Description
Brief/Intro
There is functionality in AgentVault.sol to claim rewards but that is broken. Rewards can never be claimed.
Vulnerability Details
The two function of AgentVault:: claimDelegationRewards and AgentVault:: claimAirdropDistribution is used to claim rewards.
Both function underside call the claim function from rewards manager and distribution
// claimAirdropDistribution
_distribution.claim(address(this), _recipient, _month, false);
// claimDelegationRewards
_rewardManager.claim(address(this), _recipient, _lastRewardEpoch, false, _proofs);
Here we sending the hard coded value false. This false value means the rewards (native eth) should be sent instead of the wNative token. Can be confirmed here. https://github.com/flare-foundation/flare-smart-contracts-v2/blob/8dc7b8c936c960aa7338e0bb903f1966c3bf57ed/contracts/userInterfaces/LTS/RewardsV2Interface.sol#L36C4-L50C48
@param _wrap Indicates if the reward should be wrapped (deposited) to the WNAT contract.
But in AgentVault.sol we have check we don't allow the native eth without internalWithdrawal .
receive() external payable {
require(internalWithdrawal , "internal use only");
}
So the whole call would revert and the agent owner never we able to claim the rewards.
Impact Details
There is rewards available which could come from the FTSO (Flare Time Series Oracle) system. By delegating voting power (of wNAT or similar tokens) to signal providers in the FTSO, the vault could earns rewards.
The rewards can also come from airdrop distribution. But cannot be claimed due to the broken functionality as explained above.
So the yield generated can never be claimed. Which is directly financial loss to the agent.
Proof of Concept
Proof of Concept
- Initially owner delegate the collateral For FTSO or other factor.
- The rewards would come as a FTSO reward because of delegation or in form of airdrop form distribution.
- Then user will use one of the function
AgentVault:: claimDelegationRewardsorAgentVault:: claimAirdropDistributionto claim the rewards. - As we are sending the
falsevalue
// claimAirdropDistribution
_distribution.claim(address(this), _recipient, _month, false);
// claimDelegationRewards
_rewardManager.claim(address(this), _recipient, _lastRewardEpoch, false, _proofs);
- The false means the native eth should be send back instead of reward in form of
wNativetoken. - But as there is an check in the
AgentVault.sol
receive() external payable {
require(internalWithdrawal, "internal use only");
}
It would revert, so the rewards can never be claimed
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 claim calls hard-code the wrap flag to false, requesting native currency, while the vault's receive function only accepts native currency during an internal withdrawal.
Impact
Rewards from FTSO delegation and airdrop distributions can never be claimed, causing a permanent freezing of unclaimed yield and a direct financial loss to the agent.
What the attacker needed
Agent has delegated collateral; rewards have accrued
The fix
The claim calls should request the wrapped token (wrap set to true) or the vault should accept native currency during claims.
How it was found
- The owner delegates collateral for FTSO or another source.
- Rewards accrue from FTSO delegation or an airdrop distribution.
- The user calls claimDelegationRewards or claimAirdropDistribution.
- The call passes false, asking for native currency instead of the wrapped token.
- The vault's receive function rejects the native currency, so the call reverts.
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.
A smart contract can hold money and has functions to move it out. Here the vault asks the rewards system to pay it in the network's native coin, but the vault is set up to refuse native coins unless a special internal flag is on. So every attempt to collect rewards fails and the money stays stuck.
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.