Reproduced Exploit

OmoVault totalAssets counts positions that belong to another vault

OmoVault.totalAssets starts from the vault's own holdings and then adds getPositionValue for every registered agent. The agent holds positions opened with assets from more than one vault. The sum does not filter by vault.

Jan 2025•Ethereum•logic•2 min read

Loss

totalAssets reports 200. This vault's cash plus its own positions is 140. The other vault's 60 is inside the…

Chain

Ethereum

Category

logic

Date

Jan 2025

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: 53322-h-04-cross-vault-misattribution-leads-to-incorrect-omovaults. Standalone Foundry PoC and full write-up: 53322-h-04-cross-vault-misattribution-leads-to-incorrect-omovaults_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/asset-valuation · vuln/defi/share-price

Key info#

FieldValue
LosstotalAssets reports 200. This vault's cash plus its own positions is 140. The other vault's 60 is inside the total
Vulnerable contractVault.totalAssets
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit at 0x15452ec016c4dc8c549e7fe6ff4b26324ea8b7a4
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 2025-01
Compilersolc 0.8.27, cancun, via IR
Bug classtotalAssets adds getPositionValue for every position on the agent
flowchart TD A["The vault holds 100 and the agent reports 100 of positions"] --> B["40 of those positions came from this vault and 60 from another"] B --> C["VULN totalAssets adds the whole 100"] C --> D["The reported total is 200"] B --> E["Control adds only this vault's 40"] E --> F["The reported total is 140"]

TL;DR#

OmoVault.totalAssets starts from the vault's own holdings and then adds getPositionValue for every registered agent. The agent holds positions opened with assets from more than one vault. The sum does not filter by vault.

Cash is 100. The agent reports 100, of which 40 belongs to this vault and 60 to another. totalAssets stores 200. The control adds valueFor(1), which is 40, and returns 140. The overstatement is 60.

The vulnerable code#

SOLIDITY
uint256 accountHoldings = agent.getPositionValue(address(this));
uint256 sum = vaultHoldings + accountHoldings; // @> VULN: every position on the agent is counted, including the other vault's 60
lastAssets = sum;

Impact#

Share price for this vault includes 60 of assets that belong to another vault's accounting. The reported total is 200 against 140.

How to reproduce#

BASH
cd 53322-h-04-cross-vault-misattribution-leads-to-incorrect-omovaults_exp
forge test -vv

test_exploit_counts_the_other_vault asserts the stored total is 200. test_control_counts_only_this_vault asserts 140.

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.