F-2026-0010·retroactive-parameter-change

cancelDelaySeconds changes apply retroactively to existing positions

Fixedvaultleveragedprediction-marketgithub.com/bloom-art/dripster-lend
TL;DR

Admin updates to cancelDelaySeconds apply retroactively because the cancel check reads the current global value. A live position created under one delay can be cancelled under another, weakening the user-facing guarantee.

Severity
INFO
Impact
LOW
Likelihood
LOW
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description

Description

updateCancelDelay() at L329 modifies the global cancelDelaySeconds. The cancel check at L787 reads this global value at cancel-time:

solidity
uint256 cancelAfter = uint256(position.createdAt) + cancelDelaySeconds;

If a user creates a position when the delay is 10 minutes and the admin later changes it to 1 hour, that position's lock-up is retroactively extended. The position was created under one set of rules and cancelled under another.

This works in both directions, increasing the delay locks existing Created positions longer than expected, while decreasing it to 0 makes all Created positions immediately cancellable.

The impact is bounded by MAX_CANCEL_DELAY_SECONDS (1 hour) and the short window positions typically spend in Created state. However, this becomes more relevant if cancelPosition is made user-callable (per L-01), since the delay would then function as a user-facing guarantee that can be retroactively changed.

03Section · Recommendation

Recommendation

Snapshot the applicable delay per-position at creation time. Add a field to PositionVault:

solidity
uint32 appliedCancelDelaySeconds;

Set it in storeNewPosition, and read it in cancelPosition instead of the global:

solidity
uint256 cancelAfter = uint256(position.createdAt) + uint256(position.appliedCancelDelaySeconds);
04Section · Resolution

Resolution

Hardened. updateCancelDelay moved to onlyTimelock so retroactive changes traverse the timelock delay.

Status
Fixed
F-2026-0010

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx