What Happened
QuillAudits’ analysis of the December 2024 incident describes repeated unstaking becauseunStake 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:
- The first call sees
isActive = trueand may proceed. - That call marks the stake inactive.
- The second call sees
isActive = falseand fails the assertion.

