Reproduced Exploit
RegnumAurum: A dust borrow resets position.positionIndex to the current usageIndex while adding only pr
Chain
Other
Category
untagged
Date
Jan 1970
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: 63402-h-02-borrowers-can-avoid-paying-interest-for-lenders-pashov. Standalone Foundry PoC and full write-up: 63402-h-02-borrowers-can-avoid-paying-interest-for-lenders-pashov_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/locked-funds
Reproduction: a faithful minimal reproduction of the vulnerable finding — the vulnerable function is reproduced verbatim (marked
@>) with faithful minimal doubles; local deploy, no fork.
Root cause#
A dust borrow resets position.positionIndex to the current usageIndex while adding only principal to rawDebtBalance, collapsing usageIndex/positionIndex to ~1 and wiping 50 crvUSD of accrued interest from the borrower's tracked debt, so lenders never receive it.
// Transfer borrowed amount to user
IRToken(reserve.reserveRTokenAddress).transferAsset(msg.sender, amount);
position.rawDebtBalance += underlyingAmount; // @> only the new principal is added; the accrued interest returned by mint is ignored while positionIndex is reset to usageIndex, collapsing usageIndex/positionIndex to ~1 and wiping all prior interest
}
Why it's exploitable here#
A dust borrow resets position.positionIndex to the current usageIndex while adding only principal to rawDebtBalance, collapsing usageIndex/positionIndex to ~1 and wiping 50 crvUSD of accrued interest from the borrower's tracked debt, so lenders never receive it.
Attack path#
Marked-line walkthrough (Playground)#
The EVM Playground pins each step to the exact executed source line in 0xbd4fd5a3ce…:
- L139 — Load borrower position: Loads the caller's borrow
position— itsrawDebtBalanceandpositionIndex— to update on this new borrow. - L149 — Add principal, drop accrued interest: Root cause: borrow adds only principal to
rawDebtBalancewhile the position's index is reset tousageIndex, wiping previously accrued interest. - L152 — Scaled-debt view entry: Public view returning a user's current debt including interest, derived from the raw balance and the index ratio.
- L153 — Delegate to internal calc: Forwards to
_positionScaledDebt, which applies theusageIndex/positionIndexratio the exploit collapses to ~1. - L158 — Zero index returns no debt: Returns zero for an uninitialized position (
positionIndex == 0) before the interest-scaling formula runs. - L159 — Interest via index ratio: Debt = principal x
usageIndex/positionIndex; after the borrow resetspositionIndextousageIndex, this ratio is ~1 so interest vanishes. - L172 — Wire reserve debt token: Setup: records the reserve's debt-token address during reserve initialization.
PoC#
Registry (Foundry, local deploy — verbatim vulnerable source + harm-asserting test + negative control):
cd 63402-h-02-borrowers-can-avoid-paying-interest-for-lenders-pashov_exp
forge test -vvv
The browser Playground replays the same synthetic opcode-for-opcode and measures the harm: A dust borrow resets position.positionIndex to the current usageIndex while adding only principal to rawDebtBalance, collapsing usageIndex/p. Both gates are green (registry forge test PASS + Playground _verify-poc VERDICT: PASS).
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 63402-h-02-borrowers-can-avoid-paying-interest-for-lenders-pashov_exp (evm-hack-registry mirror).
- AuditVault finding: 63402-h-02-borrowers-can-avoid-paying-interest-for-lenders-pashov.
- Upstream DeFiHackLabs PoC directory: src/test.
Alerts & third-party analyses
- DeFiHackLabs incident explorer: search "RegnumAurum: A dust borrow resets position.positionIndex to the current usageIndex while adding only pr".
- 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.