Reproduced Exploit

BENQI Ignite: a failed QI registration still draws ValidatorRewarder funds

registerWithPrevalidatedQiStake marks the node QI-reward eligible. releaseLockedTokens(failed=true) stores the failure and does not clear that flag. redeemAfterExpiry still calls ValidatorRewarder.claimRewards. The reduced rewarder pays 20% of the 1000 QI stake, so the staker receives 1200 QI and t…

Dec 2024•Other•logic•2 min read

Loss

200 QI taken from ValidatorRewarder for a registration that failed

Chain

Other

Category

logic

Date

Dec 2024

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 44251-zeeve-admin-could-drain-validatorrewarder-by-abusing-off-cha. Standalone Foundry PoC and full write-up: 44251-zeeve-admin-could-drain-validatorrewarder-by-abusing-off-cha_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/reward-calculation · vuln/logic/missing-check

Key info#

FieldValue
Loss200 QI taken from ValidatorRewarder for a registration that failed
Vulnerable contractIgnite.redeemAfterExpiry
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit
Attack txExploit.run()
Chain / block / dateLocal synthetic · 2024-12
Compilersolc 0.8.27, cancun, via IR
Bug classreleaseLockedTokens leaves qiRewardEligibility set

TL;DR#

registerWithPrevalidatedQiStake marks the node QI-reward eligible. releaseLockedTokens(failed=true) stores the failure and does not clear that flag. redeemAfterExpiry still calls ValidatorRewarder.claimRewards. The reduced rewarder pays 20% of the 1000 QI stake, so the staker receives 1200 QI and the rewarder loses 200.

The vulnerable code#

SOLIDITY
function releaseLockedTokens(bytes32 nodeId, bool failed) external {
    require(failed, "failed");
    regs[nodeId].failed = true;
}

function redeemAfterExpiry(bytes32 nodeId) external {
    uint256 qiRedemptionAmount = regs[nodeId].qiAmount;
    if (qiRewardEligibilityByNodeId[nodeId]) {
        qiRedemptionAmount += rewarder.claimRewards(regs[nodeId].duration, regs[nodeId].qiAmount);
    }
    token.transfer(msg.sender, qiRedemptionAmount);
}

The failed branch should set qiRewardEligibilityByNodeId[nodeId] = false.

Root cause#

Failure and reward eligibility are separate flags, and only the failure flag is written.

Preconditions#

  • A prevalidated QI stake of 1000 for the report's node id, with a 28 day duration.
  • The Zeeve admin path releases that registration as failed. The rewarder is funded.

Attack walkthrough#

  1. The staker registers 1000 QI. The node is marked reward-eligible.
  2. releaseLockedTokens records failure and leaves eligibility true.
  3. redeemAfterExpiry calls claimRewards because the flag is still set.
  4. The staker holds 1200 QI. The rewarder holds 800 QI.

Diagrams#

flowchart TD A["Register 1000 QI as reward-eligible"] --> B["Release the registration as failed"] B --> C["Eligibility flag stays true"] C --> D["redeemAfterExpiry calls claimRewards"] D --> E["Staker receives 1200 QI and the rewarder loses 200"]

Impact#

QI rewards are paid for a registration the off-chain BLS check rejected. This run drains 200 QI from ValidatorRewarder on top of the returned stake.

How to reproduce#

BASH
cd 44251-zeeve-admin-could-drain-validatorrewarder-by-abusing-off-cha_exp
forge test -vv

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.