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

60311 sc high double effective stake decrement freezes unstake permanently after validator exit

Submitted on Nov 21st 2025 at 08:45:14 UTC by @TianYu4n for Audit Comp | Vechain | Stargate Hayabusa

  • Report ID: #60311

  • Report Type: Smart Contract

  • Report severity: High

  • Target: https://github.com/immunefi-team/audit-comp-vechain-stargate-hayabusa/tree/main/packages/contracts/contracts/Stargate.sol

  • Impacts:

    • Permanent freezing of funds

Description

Brief/Intro

Calling requestDelegationExit records a first effective-stake decrement, util validator status changed to EXITED, USER try to call unstake , and enters the EXITED/PENDING branch and applies a second decrement for the same period, causing an underflow (panic 0x11) before any transfers.

Vulnerability Details

  • First decrement: requestDelegationExit calls _updatePeriodEffectiveStakefor the next period (Stargate.sol #L568).

  • Second decrement: unstake in the currentValidatorStatus == EXITED || status == PENDING branch calls _updatePeriodEffectiveStake again Stargate.sol (#L266-#L283), leading to underflow when the checkpointed value is already zero.

Impact Details

Once triggered, every unstake attempt reverts; delegations cannot be changed, so the user’s staked VET remains locked in the staking contract. Funds are not stolen but are permanently frozen.

Affected flow: stake + delegate → requestDelegationExit (first decrement) → validator becomes EXITED → any unstake reverts on second decrement.

References

add a status judge before call _updatePeriodEffectiveStake in unstake.

https://gist.github.com/2298233831/6f45209c73b685fd619c933c08abe16b

Proof of Concept

Proof of Concept

Was this helpful?