Reproduced Exploit

Karak slash charges a node owner for shares that were already transferred

slash computes totalRestakedETH[owner] - convertToAssets(balanceOf(owner)). A share transfer changes balanceOf and does not change totalRestakedETH.

Undated•Ethereum•logic•2 min read

Loss

100 ETH of share backing is slashed. The buyer still holds 100 shares and those shares convert to 0

Chain

Ethereum

Category

logic

Date

Undated

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack replays in your browser. Step through it by Solidity line or by opcode.

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: 38493-h-05-transferring-nativevault-tokens-can-break-some-function. Standalone Foundry PoC and full write-up: 38493-h-05-transferring-nativevault-tokens-can-break-some-function_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/share-slash · vuln/arithmetic/restaked-balance

Key info#

FieldValue
Loss100 ETH of share backing is slashed. The buyer still holds 100 shares and those shares convert to 0
Vulnerable contractNativeVault.slash
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit at 0x15452ec016c4dc8c549e7fe6ff4b26324ea8b7a4
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 1970-01
Compilersolc 0.8.27, cancun, via IR
Bug classSlash uses totalRestakedETH minus convertToAssets of the owner's remaining balance
flowchart TD A["Owner deposits 100 ETH and receives 100 shares"] --> B["Owner transfers the 100 shares"] B --> C["totalRestakedETH is still 100 and balanceOf owner is 0"] C --> D["VULN slash computes 100 minus 0"] D --> E["Vault pays out 100 ETH and the buyer's shares convert to 0"] A --> F["Control slashes while the owner still holds the shares"] F --> G["100 minus 100 is 0 and the 100 ETH stays"]

TL;DR#

slash computes totalRestakedETH[owner] - convertToAssets(balanceOf(owner)). A share transfer changes balanceOf and does not change totalRestakedETH.

The owner deposits 100 ETH and receives 100 shares, then transfers them. balanceOf is 0, so the slash is 100 ETH. The vault pays that 100 out. The buyer still has 100 shares, and convertToAssets of those shares is 0.

Calling slash while the owner still holds the 100 shares computes 100 - 100 = 0. The vault keeps the 100 ETH.

The vulnerable code#

SOLIDITY
uint256 held = balanceOf[nodeOwner];
uint256 backed = convertToAssets(held);
uint256 restaked = totalRestakedETH[nodeOwner];
slashedAssets = restaked - backed; // @> VULN: a transferred balance slashes the ETH that backs the recipient's shares
totalAssets -= slashedAssets;

The quoted line is node.totalRestakedETH - convertToAssets(balanceOf(nodeOwner)).

Impact#

100 ETH that backs the transferred shares is slashed. The recipient keeps the shares and the shares are worth 0.


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.