Collateral Reservation Fee Calculation Inconsistent with Actual Reserved Value
The collateral reservation fee is calculated using only the user's requested minting amount, while the actual collateral reserved includes an additional pool fee. This causes the protocol to undercharge the reservation fee relative to the total value locked.
- Disclosed after under an hour
#46758 [SC-Low] Collateral Reservation Fee Calculation Inconsistent with Actual Reserved Value
Submitted on Jun 4th 2025 at 09:31:48 UTC by @light279 for Audit Comp | Flare | FAssets
- Report ID: #46758
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/flare-foundation/fassets/blob/main/contracts/assetManager/library/CollateralReservations.sol
- Impacts:
- Contract fails to deliver promised returns, but doesn't lose value
Description
Brief/Intro
The function CollateralReservations::reserveCollateral is responsible for reserving collateral in preparation for minting f-assets. It reserves collateral based on both the requested minting amount (valueAMG) and an additional amount minted as a pool fee (poolFeeAMG). However, when calculating the required reservation fee, only valueAMG is considered, potentially leading to under-collection of fees compared to the actual value reserved.
Vulnerability Details
When a user reserves collateral to mint f-assets through CollateralReservations::reserveCollateral , the following logic is used:
_reserveCollateral(agent, valueAMG + _currentPoolFeeAMG(agent, valueAMG));
This means collateral is reserved for both the user's requested amount and the agent's pool fee. However, the reservation fee charged to the user is calculated using only valueAMG:
uint256 reservationFee = agent.availableAgentsPos != 0
? _reservationFee(collateralData.poolCollateral.amgToTokenWeiPrice, valueAMG)
: 0;
This results in an inconsistency: the fee collected does not correspond to the total value of assets being reserved. This could create a mismatch between the economic intent of the system and actual cost imposed on users.
Impact Details
- Fee Undercalculation: The protocol collects reservation fees based on only a portion of the actual reserved collateral.
- An agent can configure a higher minting fee and a larger share of the pool fee, which increases the total collateral reserved during a mint. However, since the reservation fee is calculated only on the user's mint amount and not the full reserved value (including the pool fee), the agent effectively receives less fee coverage for more collateral being locked.
Proof of Concept
Proof of Concept
- Assume the agent fee is non-zero and _lots = 1. Let valueAMG = 100. 2.Call reserveCollateral(...) for this 1 lot through CollateralReservationFacet.
- Internally, collateral reserved will be:
_reserveCollateral(agent, 100 + poolFeeAMG);
Let's say poolFeeAMG = 2, so total reserved = 102.
- However, reservation fee is computed only using 100:
uint256 reservationFee = agent.availableAgentsPos != 0
? _reservationFee(collateralData.poolCollateral.amgToTokenWeiPrice, 100)
: 0;
Mismatch: The user is paying fee for 100 AMG reservation while 102 AMG worth is reserved.
Result: Fee is undercharged for what is effectively being locked in the system.
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 reservation fee calculation uses only the user's minting amount (valueAMG) instead of the total collateral reserved (valueAMG plus poolFeeAMG).
Impact
The protocol collects less reservation fee than intended for the collateral actually locked, potentially reducing fee coverage for agents.
What the attacker needed
Agent fee is non-zero; user mints f-assets
How it was found
- Assume the agent fee is non-zero and lots = 1, with valueAMG = 100.
- Call reserveCollateral for this 1 lot through CollateralReservationFacet.
- Internally, collateral reserved is valueAMG plus poolFeeAMG (e.g., 100 + 2 = 102).
- The reservation fee is computed using only valueAMG (100), not the total reserved (102).
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.
When you mint a new asset, the system locks up some collateral as a guarantee. It also adds a small extra fee to that locked amount. The bug is that the system only charges you a reservation fee based on your original amount, not the total locked amount, so you pay less than you should.
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.