Reproduced Exploit

OmoVault — a donation inflates topOff and Alice cannot redeem

Alice and Bob each have 20 in the vault, so _totalAssets is 40. The agent holds the 20 it is supposed to return for Bob's redeem. Bob transfers another 20 to the agent before topOff. The function pulls the agent's whole balance, pays Bob 40, and subtracts 40 from _totalAssets. Alice's later redeem…

Jan 2025•Other•logic•3 min read

Chain

Other

Category

logic

Date

Jan 2025

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: 53314-c-03-users-cant-redeem-funds-due-to-malicious-manipulation-o. Standalone Foundry PoC and full write-up: 53314-c-03-users-cant-redeem-funds-due-to-malicious-manipulation-o_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/state-update · vuln/dos/frozen-funds

Key info#

ProtocolOmoVault
FindingPashov Audit Group C-03, AuditVault 53314
Vulnerable codeOmoVault.topOff sweeps agentBalance
HarmBob is paid 40 and Alice's redeem of 20 reverts. The control pays Alice 20.
Chainlocal synthetic

TL;DR#

Alice and Bob each have 20 in the vault, so _totalAssets is 40. The agent holds the 20 it is supposed to return for Bob's redeem. Bob transfers another 20 to the agent before topOff. The function pulls the agent's whole balance, pays Bob 40, and subtracts 40 from _totalAssets. Alice's later redeem underflows. A vault that pulls record.assets instead still has 20 of accounting left, and Alice is paid 20.

The vulnerable code#

SOLIDITY
uint256 agentBalance = asset.balanceOf(msg.sender);
asset.transferFrom(msg.sender, address(this), agentBalance);
asset.transfer(record.receiver, agentBalance);
totalAssets -= agentBalance;

The report's fix pulls and forwards record.assets, not the agent's token balance.

Root cause#

topOff treats the agent's entire token balance as the amount owed to the redeem receiver. A direct transfer to the agent changes that balance without changing the recorded redeem amount, and the same number is subtracted from _totalAssets.

Preconditions#

The caller is agents(0), so the agent check passes. The recorded redeem is 20 to Bob. The agent already holds that 20. Bob donates 20 more. The vault contract still holds Alice's 20. _totalAssets starts at 40.

Attack walkthrough#

  1. Bob transfers 20 to the agent. The agent balance is 40.
  2. The agent calls topOff.
  3. transferFrom pulls 40 and _totalAssets becomes 0.
  4. Bob's balance goes from 20 to 40. His profit in the attack call is 20.
  5. Alice's redeem(20) reverts. The vault still holds her 20 tokens.
  6. The control agent also holds a 20 donation plus 20 of assets. It pulls only record.assets. Alice is then paid 20.

Diagrams#

flowchart TD A["Bob donates 20 to the agent"] --> B["Agent balance is 40"] B --> C["VULN: topOff sweeps 40"] C --> D["totalAssets falls to 0"] D --> E["Alice redeem of 20 reverts"] E --> F["Control pays Alice 20"]

Impact#

Bob receives 40 after donating 20, so he keeps 20 that was not his redeem. _totalAssets is 0 while the vault still holds Alice's 20, and her redeem reverts. The control leaves _totalAssets at 20 and pays her that 20.

Remediation#

Pull and forward record.assets, and subtract that amount from _totalAssets, as the report's diff shows.

How to reproduce#

BASH
cd 53314-c-03-users-cant-redeem-funds-due-to-malicious-manipulation-o_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.