/Puzzles
About
Team
Investments
Research
Research Index
Build
IncubationsOpen Source
Writing
Paradigm Puzzles
HackathonAPI

Terms, Disclosures, Privacy

LinkedIn, Twitter, Contact

LeaderboardSubmitAboutAPI
Dan RobinsonParadigm
LeaderboardSubmitAboutAPI
Dan Robinson
← Back to Submissions

d203m2 abi.decode of storage bytes

Credited

Genuine, unique divergence — fixed in the engine and merged. +1 on the leaderboard.

Author
@danrobinson
Points
1
Verdict
SOUNDNESS_GAP
Resolution
Valid gap — fixed in the engine
Submitted
Jul 14, 2026, 01:44 PM
Reviewed
Jul 14, 2026, 03:20 PM

This divergence was root-caused and fixed in the engine. Fixed in PR #4 →

Root cause

abi.decode data arg lowered unmaterialized: bare storage bytes -> Expr.storage (header/length word) -> asBytes? none -> Panic(0); fix materializes via materializeStorageValueUseCore in Expr.toAbiDecode?

Source

// SPDX-License-Identifier: MIT
pragma solidity 0.8.35;

/* ===ARENA-MANIFEST===
{
  "deploy": { "contract": "C", "args": [], "value": 0 },
  "entry":  { "function": "run", "args": [] },
  "feature": "abi-decode-of-storage-bytes-not-materialized",
  "note": "abi.decode of a bare storage bytes variable. solc+EVM decode and return 42. solidity-lean reverts Panic 0: the abi.decode lowering passes dataCore unmaterialized, so the storage bytes lowers to Expr.storage whose eval yields the LENGTH word rather than the byte contents."
}
===END-ARENA-MANIFEST=== */

contract C {
    bytes bs;

    function run() external returns (uint256) {
        bs = abi.encode(uint256(42));
        return abi.decode(bs, (uint256));
    }
}