Skip to main content

What Happened

QuillAudits’ analysis of the December 2024 incident describes repeated unstaking because unStake did not reject an already inactive stake. The issue is reuse of a redeemed stake, not merely bypassing its maturity time. QuillAudits incident analysis.

Attack Mechanism

unStake marked a stake inactive after paying it out but did not reject a later call for the same inactive stake. The attacker could therefore reuse a redeemed stake and collect additional payouts. The missing condition was whether the stake was still active, rather than simply whether its maturity time had elapsed. Checking only the state before the transaction is insufficient when two unstakes occur in one transaction. Both would appear to start from an active stake. The assertion reads the stake immediately before each recorded unStake(uint8) call:
  1. The first call sees isActive = true and may proceed.
  2. That call marks the stake inactive.
  3. The second call sees isActive = false and fails the assertion.
A Solidity interface declares the generated mapping getter as a function; it cannot declare the mapping itself. The returned tuple below preserves the stake fields and reads the final Boolean.

Assertion Example

What This Check Covers

Confirm the deployed getter ABI and stake-field order. Calls through another staking entry point or another adopter need coverage too. This condition prevents reuse of an inactive stake; maturity, yield arithmetic, and payout amounts are separate policies.

Further Sources