Skip to content
Business logic Audit finding Intermediate

Inconsistent Use of poolFeeShareBIPS Between Collateral Reservation and Distribution

The collateral reservation stores the pool fee share at reservation time, but the fee distribution later uses the agent's current mutable fee share. An agent can change the fee share after a minter reserves collateral, redirecting a larger portion of the reservation fee to themselves.

Josh4324 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#46969 [SC-Low] Inconsistent Use of poolFeeShareBIPS Between Collateral Reservation and Distribution

Submitted on Jun 6th 2025 at 23:00:55 UTC by @Josh4324 for Audit Comp | Flare | FAssets

Description

Brief/Intro

The protocol allows a minter to reserve collateral using the reserveCollateral function. During this process, the poolFeeShareBIPS which determines how much of the reservation fee is sent to the pool is recorded and stored as part of the collateral reservation (cr.poolFeeShareBIPS). However, during the actual minting step, the function distributeCollateralReservationFee calculates the fee split using the current value of _agent.poolFeeShareBIPS from storage instead of using the previously stored cr.poolFeeShareBIPS.

Vulnerability Details

The stored cr.poolFeeShareBIPS is intended to represent the fee split agreement at the time of reservation. However, because the actual distribution later relies on the mutable Agent.State.poolFeeShareBIPS, a malicious or opportunistic agent can change the value after the reservation but before minting. This allows the agent to redirect a larger share of the fee to themselves, violating the implicit fee agreement made at the time of reservation.

This inconsistency breaks the assumption that the parameters agreed upon during reservation will be respected during fee distribution.

Impact Details

Minter Exploitation: Minters are subjected to fee changes after reservation, leading to potential overpayment to the agent.

Agent Manipulation: Dishonest agents can exploit this timing window to divert more fees from the pool to their own vaults.

Loss of Trust: Undermines the reliability of the fee mechanics and may discourage protocol participants from interacting with certain agents.

References

Add any relevant links to documentation or code

Proof of Concept

Proof of Concept

Proof of Concept (PoC) Agent sets poolFeeShareBIPS to 80% (to make the pool look attractive).

Minter calls reserveCollateral, and cr.poolFeeShareBIPS = 81 (value + 1 offset) is stored.

Agent immediately updates poolFeeShareBIPS to 10%.

During minting, distributeCollateralReservationFee() is called.

The new 10% value is used instead of the agreed-upon 80%, and the agent keeps most of the reservation fee.

The original report as published on Immunefi, by Josh4324. 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 distribution function reads the agent's current poolFeeShareBIPS from storage instead of the value stored in the collateral reservation.

Impact

An agent could redirect a larger share of the reservation fee to themselves, causing the minter to overpay and undermining trust in the fee mechanics.

What the attacker needed

Agent controls poolFeeShareBIPS; minter reserves collateral; agent changes fee share before minting

How it was found

  1. Agent sets poolFeeShareBIPS to 80% to make the pool look attractive.
  2. Minter calls reserveCollateral, storing cr.poolFeeShareBIPS as 81 (value + 1 offset).
  3. Agent immediately updates poolFeeShareBIPS to 10%.
  4. During minting, distributeCollateralReservationFee() is called.
  5. The new 10% value is used instead of the agreed-upon 80%, and the agent keeps most of the reservation fee.

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 reserve collateral, the system records how the reservation fee will be split between the pool and the agent. Later, when the fee is actually paid out, the system ignores that recorded split and uses the agent's current setting instead. This lets an agent change the split after you reserve, so they can take more of your fee than agreed.

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.

More by Josh4324

View all

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

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.