Reproduced Exploit
Elytra: Missing 1e18 scale collapses tempElyAssetPrice to 2 (far below the 18-decimal oldElyAssetP
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: 63546-h-03-scaling-error-in-elyasset-price-calculation-leads-to-fe. The historical source/toolchain is unavailable; this entry is documentation only and claims no executable Forge PoC.
Vulnerability classes: vuln/locked-funds · vuln/reward-accounting · vuln/price
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#
Missing 1e18 scale collapses tempElyAssetPrice to 2 (far below the 18-decimal oldElyAssetPrice 1e18), so the reward/fee branch never fires and the protocol permanently accrues 0 performance fee instead of the owed 100e18 per update.
function updateElyAssetPrice(uint256 totalValueInProtocol, uint256 elyAssetSupply) external {
uint256 protocolFeeInHYPE;
{
uint256 tempElyAssetPrice = totalValueInProtocol / elyAssetSupply; // @> missing 1e18 scale: 18-dec/18-dec collapses price to a bare integer, always < oldElyAssetPrice
if (tempElyAssetPrice > oldElyAssetPrice) {
uint256 increaseInElyAssetPrice = tempElyAssetPrice - oldElyAssetPrice;
Why it's exploitable here#
Missing 1e18 scale collapses tempElyAssetPrice to 2 (far below the 18-decimal oldElyAssetPrice 1e18), so the reward/fee branch never fires and the protocol permanently accrues 0 performance fee instead of the owed 100e18 per update.
Attack path#
Marked-line walkthrough (Playground)#
The EVM Playground pins each step to the exact executed source line in 0x671d353a77…:
- L130 — Deploy vulnerable + fixed oracles: Setup: deploy the buggy
ElytraOracleV1alongside an identical fixed control, both with the same 18-decimal price state. - L132 — Wire the vulnerable oracle: Setup: record the vulnerable oracle's address so the exploit can drive its price update directly.
- L58 — Enter updateElyAssetPrice(): Call the update with realistic 18-decimal inputs (totalValue 2000e18, supply 1000e18), a true price of 2.0.
- L62 — Missing 1e18 scale collapses price: Root-cause:
totalValueInProtocol / elyAssetSupplyomits the 1e18 scale, so the price is bare integer 2 instead of 2e18. - L139 — Read back accrued fee — zero: Because 2 < the 18-decimal
oldElyAssetPriceof 1e18, the reward/fee branch never fires and the accrued fee stays 0. - L141 — Fixed path accrues the owed fee: The scaled fixed oracle on identical inputs computes price 2e18 and accrues the 100e18 performance fee the protocol is owed.
PoC#
Registry (Foundry, local deploy — verbatim vulnerable source + harm-asserting test + negative control):
cd 63546-h-03-scaling-error-in-elyasset-price-calculation-leads-to-fe_exp
forge test -vvv
The browser Playground replays the same synthetic opcode-for-opcode and measures the harm: Missing 1e18 scale collapses tempElyAssetPrice to 2 (far below the 18-decimal oldElyAssetPrice 1e18), so the reward/fee branch never fires a. Both gates are green (registry forge test PASS + Playground _verify-poc VERDICT: PASS).
Sources & further analysis#
Reproductions & code
- No executable Forge reproduction is claimed; the historical source/toolchain was unavailable for this finding.
- AuditVault finding: 63546-h-03-scaling-error-in-elyasset-price-calculation-leads-to-fe.
- Upstream DeFiHackLabs PoC directory: src/test.
Alerts & third-party analyses
- DeFiHackLabs incident explorer: [search "Elytra: Missing 1e18 scale collapses tempElyAssetPrice to 2 (far below the 18-decimal oldElyAssetP"](https://defihacklabs.io/explorer/index.html?q=Elytra%3A%20Missing%201e18%20scale%20collapses%20tempElyAssetPrice%20to%202%20(far%20below%20the%2018-decimal%20oldElyAssetP).
- Web3Sec X hacked database: search.
- Rekt leaderboard: [search](https://rekt.news/?s=Elytra%3A%20Missing%201e18%20scale%20collapses%20tempElyAssetPrice%20to%202%20(far%20below%20the%2018-decimal%20oldElyAssetP).
- Solodit incident search: [search](https://solodit.xyz/issues?search=Elytra%3A%20Missing%201e18%20scale%20collapses%20tempElyAssetPrice%20to%202%20(far%20below%20the%2018-decimal%20oldElyAssetP).
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.