Reproduced Exploit
Regnum Aurum: DebtToken.burn reverts a 50 interest payment and forces the full 100
AuditVault 66353 is the same H-12. burn subtracts accrued interest from the payment before checking which is larger. A 50 payment against 100 interest reverts. Only a payment of the full 100 succeeds. The fixed token accepts 50 and leaves 50 interest.
Loss
A 50-token interest payment reverts. The borrower must pay the full 100 accrued interest
Chain
Ethereum
Category
arithmetic
Date
May 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. 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.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa. Standalone Foundry PoC and full write-up: 66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/arithmetic/underflow·vuln/dos/griefing
Key info#
| Field | Value |
|---|---|
| Loss | A 50-token interest payment reverts. The borrower must pay the full 100 accrued interest |
| Vulnerable contract | DebtToken.burn |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 2025-05 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | Unchecked subtraction of accrued interest |
TL;DR#
AuditVault 66353 is the same H-12. burn subtracts accrued interest from the payment before checking which is larger. A 50 payment against 100 interest reverts. Only a payment of the full 100 succeeds. The fixed token accepts 50 and leaves 50 interest.
The vulnerable code#
// @> VULN: amount - accrued interest underflows when the payment is partial
uint256 amountAfterPaidInterest = amount - scaledBalanceIncrease;
Root cause#
The partial-payment else branch is placed after an unchecked subtraction, so Solidity 0.8 never reaches it.
Preconditions#
scaledBalanceis 1000 andscaledBalanceIncreaseis 100.- The caller burns 50.
Attack walkthrough#
burn(50)reverts. Interest stays 100 and no tokens move.burn(100)clears the interest.- The contract balance is 100. Principal is unchanged.
Diagrams#
Impact#
Partial interest payments are impossible. The borrower pays 100 to clear interest that a checked burn would reduce by 50.
Remediation#
Branch on amount > scaledBalanceIncrease before any subtraction.
How to reproduce#
cd 66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa_exp
forge test -vv
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa.md
- Pashov review: https://github.com/pashov/audits/blob/master/team/md/RegnumAurum-security-review_2025-05-06.md
- Reduced source:
test/66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa.sol
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa_exp (evm-hack-registry mirror).
- AuditVault finding: 66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa.
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.