Inclusive period boundary checkpoint lets a staker underfund valid claims
A staker can redeem at the exact timestamp of a period boundary, which causes the vault's exposure cap to be recorded as the post-redemption balance. A later valid incident in that period is then only partially paid, leaving the beneficiary underfunded despite available collateral.
- Disclosed after under an hour
88345 sc high inclusive period boundary checkpoint lets a staker underfund valid claims
Submitted on Aug 12th 2026 at 19:58:07 UTC by @jerrysd for Audit Comp | Firelight
- Report ID: #88345
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/audit-comp-firelight/blob/v1\\_audit\\_ready/contracts/core/lib/Checkpoints.sol
- Impacts:
- Protocol insolvency
Description
Brief/Intro
An unprivileged staker can reduce the vault’s period-start exposure cap by redeeming in a block whose timestamp exactly equals currentPeriodEnd(). A later valid incident in that period then closes after a partial payout even though the excluded collateral remains claimable by stakers. The PoC turns a fully backed 200-FXRP assessment into a final 100-FXRP payment.
Vulnerability Details
redeem() immediately removes assets from active accounting and writes the new value under block.timestamp. payout() later treats the inclusive value at the period-start timestamp as an immutable exposure cap:
uint256 assetsAtCapturePeriod = totalAssetsAt(capturePeriodStart);
paidAmount = Math.min(amount, Math.min(assetsAtCapturePeriod, activePayableAmount));
When a redemption is mined exactly at capturePeriodStart, upperLookupRecent(capturePeriodStart) returns the post-redemption active balance. The withdrawal remains in activePayableAmount, but the corrupted cap prevents it from being fully slashed. This contradicts payout()’s stated rule that withdrawals requested during the capture period remain payable.
Impact Details
The boundary withdrawer preserves 50 FXRP that the valid payout would otherwise consume. The covered beneficiary receives only 100 of the approved 200 FXRP, the incident becomes CLOSED, and no retry path exists. At larger scale, boundary withdrawals can exclude up to their full amount from the cap and leave sold cover underfunded despite available collateral.
The attacker cannot force a validator’s timestamp, but period boundaries are public and recurring. Flare documents approximately 1.8-second blocks and priority-gas ordering, making exact-boundary inclusion a feasible high-complexity condition.
References
Link to Proof of Concept
https://gist.github.com/JRBusiness/817670536b4d7035712ca68ce6e33a2c
Proof of Concept
Proof of Concept
From commit 42f9ea5e43d88b35197b901acc2a8c24b314fa62:
npx hardhat test periodBoundarySnapshotOverwrite.js
The test deposits 100 FXRP from each of two stakers. One redeems at the exact next-period boundary. A later 200-FXRP incident is created, assessed within allocated cover, approved, and executed through the real IncidentManager.
[snapshot] preBoundaryAssets=200000000 storedExposure=100000000
[payout] requested=200000000 paid=100000000
[retained] boundaryWithdrawer=50000000 remainingStakerValue=50000000
[control +1s] storedExposure=200000000 paid=200000000
[manager] assessedCanonical=200000000000000000000 vaultPaid=100000000 receiverPaid=100000000
[manager close] status=4 residualVaultBalance=100000000
3 passing
The +1-second control is identical except for transaction timestamp and pays the full 200 FXRP.
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 checkpoint lookup at the period-start timestamp includes a redemption written in the same block, so the exposure cap is taken from the post-redemption balance instead of the balance at the start of the period.
Impact
A valid claim could be only partially paid and closed with no retry path, leaving the beneficiary underfunded even though collateral remains; the attacker cannot force the timestamp, but period boundaries are public and recurring.
What the attacker needed
A staker position in the vault; transaction mined at exact period boundary; priority-gas ordering to hit the boundary
How it was found
- Two stakers each deposit 100 FXRP into the vault.
- One staker redeems at the exact timestamp of the next period boundary.
- A 200-FXRP incident is created, assessed within allocated cover, approved, and executed through the IncidentManager.
- The payout is capped at 100 FXRP instead of the full 200 FXRP.
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 vault tracks how much money is at risk during each period. If someone withdraws at the exact moment a new period starts, the vault records the lower, after-withdrawal amount as the cap for that period. Later, when a valid claim is approved, the vault thinks it has less money to pay than it really does, so the claim is only partly paid.
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.