Reproduced Exploit
Altr: a documented 4% grace fee charges 4,000 on a 1,000 debt
Chain
Other
Category
logic
Date
Jun 2024
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: 60243-inconsistent-use-of-basis-points-leading-to-enormous-fees-qu. Standalone Foundry PoC and full write-up: 60243-inconsistent-use-of-basis-points-leading-to-enormous-fees-qu_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/logic/fee-calculation · vuln/arithmetic/precision-loss
PRECISION is 10,000 and MAX_REPAY_GRACE_FEE is 4 * PRECISION. The comments treat that cap as 4%. repay computes platformFee += (totalPayable * repayGraceFee) / PRECISION. On a 1,000 debt that is 1000 * 40000 / 10000 = 4000, four times the debt, instead of the 40 a basis-point 4% would charge.
uint256 public constant PRECISION = 10000;
uint256 public constant MAX_REPAY_GRACE_FEE = 4 * PRECISION;
platformFee += (totalPayable * repayGraceFee) / PRECISION; // @> VULN
Diagrams#
Impact#
The fee recipient receives 4,000. The lender receives the 1,000 principal. A fee stored as 400 basis points, with the same division, charges 40. The excess is 3,960.
PoC#
cd 60243-inconsistent-use-of-basis-points-leading-to-enormous-fees-qu_exp
forge test -vv
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 60243-inconsistent-use-of-basis-points-leading-to-enormous-fees-qu_exp (evm-hack-registry mirror).
- AuditVault finding: 60243-inconsistent-use-of-basis-points-leading-to-enormous-fees-qu.
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.