Reproduced Exploit
Remora — div-before-mul in `FiveFiftyRule::_updateEntityAllowance` exceeds caps
1. Allowance updates use (REMORA_PERCENT_DENOMINATOR / equity) amount. 2. Integer division truncates first → delta is smaller than DENOM amount / equity. 3. On the reduce path, allowance shrinks too little. 4. Entity + catalyst look-through exposure exceeds the configured cap.
Chain
Other
Category
arithmetic
Date
Oct 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: 63780-divide-before-multiply-loses-precision-in-fivefiftyrule-upda. Standalone Foundry PoC and full write-up: 63780-divide-before-multiply-loses-precision-in-fivefiftyrule-upda_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/arithmetic/division-before-multiply · vuln/arithmetic/precision-loss
Reproduction: self-contained Foundry PoC with only
forge-std. Full trace: output.txt. PoC: test/63780-divide-before-multiply-loses-precision-in-fivefiftyrule-upda_exp.sol.
AuditVault taxonomy: lang/solidity · platform/cyfrin · has/github · has/poc · severity/high · sector/token · genome: division-before-multiply · precision-loss · indirect-loss · integer-bounds
Key info#
| Impact | HIGH — when reducing entity allowance (add == false), truncated math leaves residual allowance too high so look-through exposure can exceed the catalyst cap |
| Protocol | Remora Dynamic Tokens |
| Vulnerable code | FiveFiftyRule._updateEntityAllowance — (DENOM / equity) * amount |
| Bug class | Division before multiplication / precision loss |
| Finding | Cyfrin — Remora Dynamic Tokens v2.1, 2025-10-22 · #63780 · reporter 0xStalin |
| Report | Cyfrin Remora report |
| Source | AuditVault |
| Status | Fixed at commit de9a89a. Local synthetic PoC. |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Allowance updates use
(REMORA_PERCENT_DENOMINATOR / equity) * amount. - Integer division truncates first → delta is smaller than
DENOM * amount / equity. - On the reduce path, allowance shrinks too little.
- Entity + catalyst look-through exposure exceeds the configured cap.
- HARM:
exposure > capAmountMicrosafter entity/catalyst receives.
The vulnerable code#
uint256 delta = (REMORA_PERCENT_DENOMINATOR / aData.equity) * amount; // @> VULN
Fix: REMORA_PERCENT_DENOMINATOR * amount / aData.equity.
Root cause#
Solidity integer division truncates toward zero. Dividing the large denominator by equity first collapses precision before scaling by amount.
Preconditions#
- Entity with non-divisor-friendly
equity(e.g. 333_334). - Entity and catalyst both hold balances after allowance updates.
Attack walkthrough#
- Create entity with equity 333_334 and a correctly computed initial allowance.
- Entity receives 1_500_000 tokens → allowance reduced by truncated delta.
- Catalyst holds 700_000 directly.
- Look-through exposure exceeds the 10% cap.
Diagrams#
Impact#
Investors who both buy individually and via an entity can exceed the five-fifty / individual concentration cap — a compliance invariant break with economic over-exposure.
Sources#
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 63780-divide-before-multiply-loses-precision-in-fivefiftyrule-upda_exp (evm-hack-registry mirror).
- AuditVault finding: 63780-divide-before-multiply-loses-precision-in-fivefiftyrule-upda.
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.