Reproduced Exploit
Ammplify — H-10: `subtreeBorrowedX/Y` is node-only (makers underpaid)
1. Child holds large subtreeBorrowed; parent holds small own borrow. 2. Fee charge on parent adds only parent.subtreeBorrowedX (node-only). 3. Child mass ignored → fees ~418 vs correct ~20979 in the demo numbers. 4. Takers underpay; makers lose the residual.
Chain
Other
Category
untagged
Date
Sep 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: 63176-h-10-takers-can-pay-significantly-less-fees-with-makers-losi. Standalone Foundry PoC and full write-up: 63176-h-10-takers-can-pay-significantly-less-fees-with-makers-losi_exp in the
evm-hack-registrymirror.
Vulnerability classes: fee-calculation · fee-theft
Reproduction: self-contained Foundry PoC with only
forge-std. Full trace: output.txt.
AuditVault taxonomy: severity/high · sector/dex · platform/sherlock · fee-calculation · fee-theft
Key info#
| Impact | HIGH — makers lose up to ~99% of taker fees when parent touched first |
| Protocol | Ammplify |
| Vulnerable code | Fee base uses node.subtreeBorrowedX without rolling up children |
| Finding | #63176 / issue 426 · panprog (+ others) |
| Compiler | ^0.8.24 |
TL;DR#
- Child holds large
subtreeBorrowed; parent holds small own borrow. - Fee charge on parent adds only
parent.subtreeBorrowedX(node-only). - Child mass ignored → fees ~418 vs correct ~20979 in the demo numbers.
- Takers underpay; makers lose the residual.
The vulnerable code#
totalXBorrows += node.liq.subtreeBorrowedX; // @> VULN: not a true subtree sum
// FIX: ownBorrow + children.subtreeBorrow like subtreeTLiq
Diagrams#
Sources#
- AuditVault #63176
- Sherlock #426
- Source:
src/walkers/Liq.sol/ Fee walker borrow base
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 63176-h-10-takers-can-pay-significantly-less-fees-with-makers-losi_exp (evm-hack-registry mirror).
- AuditVault finding: 63176-h-10-takers-can-pay-significantly-less-fees-with-makers-losi.
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.