Reproduced Exploit
Kinetiq — `receive()` re-stakes Core-returned HYPE and bricks confirmWithdrawal
1. On HyperEVM, HYPE is the native gas token. Undelegations from Hypercore arrive as native ETH-like transfers to StakingManager. 2. receive() external payable { stake(); } immediately re-stakes any incoming HYPE and forwards it back to Core, minting kHYPE to the sender. 3. After a user queues a wi…
Chain
Other
Category
accounting
Date
Apr 2025
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
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. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 58555-h-03-mishandling-of-receiving-hype-in-the-stakingmanager-use. Standalone Foundry PoC and full write-up: 58555-h-03-mishandling-of-receiving-hype-in-the-stakingmanager-use_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/accounting/reward-accounting · vuln/logic/state-update · vuln/liveness/withdrawal-brick
Reproduction: a self-contained Foundry PoC that compiles & runs in an isolated project with only
forge-std— no fork, no RPC, noanvil_state. Full trace: output.txt. PoC: test/58555-h-03-mishandling-of-receiving-hype-in-the-stakingmanager-use_exp.sol.
AuditVault taxonomy: severity/high · sector/oracle · sector/staking · sector/token · platform/code4rena · reward-accounting · logic/state-update · data-corruption/accounting-error · known-pattern · always · redesign-logic · blast-radius/protocol-wide
Key info#
| Impact | HIGH — Core-returned HYPE is auto-staked; users cannot confirmWithdrawal; spurious kHYPE mint to system inflates exchange accounting |
| Protocol | Kinetiq — StakingManager on HyperEVM |
| Vulnerable code | StakingManager.receive — unconditionally calls stake() (StakingManager.sol#L208-L211) |
| Bug class | Native receive handler re-enters deposit path (withdrawal funds re-staked) |
| Finding | Code4rena 2025-04-kinetiq · #58555 · reporter FalseGenius |
| Report | code4rena.com/reports/2025-04-kinetiq |
| Source | AuditVault |
| Status | Audit finding — acknowledged by Kinetiq. Reproduced as a standalone local PoC. |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- On HyperEVM, HYPE is the native gas token. Undelegations from Hypercore arrive as native ETH-like transfers to
StakingManager. receive() external payable { stake(); }immediately re-stakes any incoming HYPE and forwards it back to Core, minting kHYPE to the sender.- After a user queues a withdrawal, Core returns the undelegated HYPE — but it is re-staked, so the manager balance stays 0.
confirmWithdrawalrequiresaddress(this).balance >= pendingand reverts. The user is stuck.- Spurious kHYPE is minted to the system address;
totalStakedgrows again → exchange-ratio inflation. Fix: skipstake()whenmsg.sender == systemAddress.
The vulnerable code#
receive() external payable {
// Simply call the stake function
stake(); // @> VULN
// FIX: if (msg.sender != systemAddress) { stake(); }
}
Root cause#
receive() treats every native credit as a user deposit. Withdrawal returns and validator rewards from Core are not user deposits — they are liquidity the manager must hold to pay confirmWithdrawal. Auto-staking them empties the balance the withdrawal path needs and mints unbacked kHYPE to whoever sent the ETH (Core/system).
Preconditions#
targetBuffer = 0(simplest; with buffer the user may still confirm but ratio still inflates).- User has queued a withdrawal; operator has undelegated on L1; Core pushes HYPE back.
Attack walkthrough#
- User stakes 1 HYPE → forwarded to Core; manager balance 0.
- User queues full withdrawal (kHYPE burned, pending = 1e18).
- Core
pushTo(manager, 1e18)→receive()→stake()→ HYPE re-forwarded to Core; manager balance still 0; system receives 1e18 spurious kHYPE. confirmWithdrawalreverts (insufficient HYPE). User funds stuck; accounting inflated.
Diagrams#
Impact#
Withdrawal confirmations fail whenever Core returns HYPE through the native receive path. Users cannot exit. Spurious kHYPE mint + re-counted stake distorts the HYPE/kHYPE exchange ratio protocol-wide. The same path fires for validator rewards sent to the manager.
Sources#
- AuditVault finding #58555
- Code4rena report 2025-04-kinetiq
- Reduced source: code-423n4/2025-04-kinetiq @ 7f29c91 —
StakingManager.receive
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 58555-h-03-mishandling-of-receiving-hype-in-the-stakingmanager-use_exp (evm-hack-registry mirror).
- AuditVault finding: 58555-h-03-mishandling-of-receiving-hype-in-the-stakingmanager-use.
Alerts & third-party analyses
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.