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.

May 2025•Ethereum•arithmetic•2 min read

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

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: 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-registry mirror.


Vulnerability classes: vuln/arithmetic/underflow · vuln/dos/griefing

Key info#

FieldValue
LossA 50-token interest payment reverts. The borrower must pay the full 100 accrued interest
Vulnerable contractDebtToken.burn
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 2025-05
Compilersolc 0.8.27, cancun, via IR
Bug classUnchecked 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#

SOLIDITY
// @> 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#

  • scaledBalance is 1000 and scaledBalanceIncrease is 100.
  • The caller burns 50.

Attack walkthrough#

  1. burn(50) reverts. Interest stays 100 and no tokens move.
  2. burn(100) clears the interest.
  3. The contract balance is 100. Principal is unchanged.

Diagrams#

flowchart TD A["Principal 1000 and accrued interest 100"] --> B["Borrower calls burn with 50"] B --> C["VULN subtracts 100 from 50 and reverts"] C --> D["Interest is still 100"] D --> E["burn of 100 clears the interest"] E --> F["Borrower paid 100. The fixed burn would have taken 50"]

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#

BASH
cd 66353-h-12-underflow-forces-full-interest-payment-in-debt-token-pa_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.