For the complete documentation index, see llms.txt. This page is also available as Markdown.

90409 sc medium a slash collapses the share price to near zero and deposits reopen in the same transaction letting anyone mint the vault s entire future value for dust

Submitted on Aug 24th 2026 at 21:25:17 UTC by @Oxidant for Audit Comp | Firelight

  • Report ID: #90409

  • Report Type: Smart Contract

  • Report severity: Medium

  • Target: https://github.com/immunefi-team/audit-comp-firelight/blob/v1_audit_ready/contracts/core/FirelightVault.sol

  • Impacts:

    • Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield

    • Theft of unclaimed yield

Description

Brief/Intro

A near-total payout() collapses the share price without burning shares, and approveCurrentAssessment reopens deposits in the same transaction, so anyone can back-run it with a dust deposit and mint more shares than the entire pre-incident supply.

Recovered assets from incidents can be returned to the vault afterwards and premiums forwarded by VaultRewardDistributor, they are split pro-rata with the attacker.

In the attached PoC a 2 wei deposit takes 500 of 1000 recovered tokens and withdraws them, leaving the two stakers who absorbed the full loss with 250 each instead of 500; a larger dust position takes proportionally more.

Vulnerability Details

A payout reduces totalAssets() without burning any shares. This behavior is intentional and is confirmed by the protocol documentation.

However, when a payout consumes nearly all of the vault's assets, totalAssets() can approach zero while totalSupply() remains unchanged. Because the vault does not override _decimalsOffset(), it inherits the default value of 0, which provides only one virtual share and one virtual asset as protection against extreme share-price manipulation.

As a result, immediately after a near-total slash, even a dust-sized deposit can mint an extremely large number of shares relative to the existing supply.

The timing makes this exploitable. During approveCurrentAssessment, _executePayout performs the slash, and _decreaseIncident clears the vault's hasActiveIncident flag within the same transaction. Therefore, the restriction preventing deposits is removed in the same block in which the vault's share price collapses.

An attacker can back-run this transaction and deposit a dust amount, for example 2 wei of USDC, receiving a disproportionately large share of the vault.

The documentation describes two possible ways the vault may later recover from the incident:

  • Recovered assets: Assets recovered after a payout through white-hat returns, law-enforcement action, or protocol-level recovery are returned to the vault, with stakers being repaid before the remaining amount is allocated to the first-loss buffer.

  • Increased emissions: The protocol may temporarily increase the base emission rate to attract additional capital to the vault.

In the first case, the attacker benefits disproportionately from any recovered assets because the dust deposit gave them a much larger share of the vault than their economic contribution should justify. This allows the attacker to capture part of the recovery that was intended to compensate the stakers who actually absorbed the incident loss.

In the second case, the attacker similarly receives a disproportionate portion of future emissions because those rewards are distributed while the attacker controls an abnormally large percentage of the vault's shares.

This creates a strong incentive to monitor and back-run incident transactions that nearly or completely slash a vault. By depositing a negligible amount immediately after the slash, an attacker can obtain a disproportionately large ownership position and profit from any subsequent recovery or incentive emissions.

Impact Details

A near-total payout can collapse the vault's share price while leaving the existing share supply unchanged. This allows an attacker to deposit a negligible amount immediately after the incident is cleared and mint a disproportionately large number of shares.

The attacker can then capture an outsized portion of any future value returned to the vault, despite contributing almost no capital. This includes assets recovered after the incident through white-hat returns, law-enforcement recovery, or protocol-level recovery, as well as additional value distributed through temporarily increased emissions.

As a result, value intended to restore losses suffered by existing stakers can instead be redirected to an attacker who entered only after the loss occurred. The greater the slash and the closer totalAssets() gets to zero, the more severe the dilution becomes.

In the extreme case, a dust-sized deposit can give the attacker ownership comparable to or greater than that of pre-incident stakers, allowing them to capture a significant portion of subsequent vault recoveries and rewards without having participated in the original loss.

Proof of Concept

Proof of Concept

To reproduce this test;

  1. Create the test file, backrun_attack.js, inside test/ directory.

  2. Paste the code below.

  3. npx hardhat test test/backrun_attack.js

Output

Was this helpful?