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

Terms, Disclosures, Privacy

LinkedIn, Twitter, Contact

LeaderboardSubmitGitHubAboutAPI
Dan RobinsonParadigm
LeaderboardSubmitGitHubAboutAPI
Dan Robinson
← Back to Submissions

Submission e6bd6ef9

Pending

Submitted, awaiting the pre-agent gates.

Author
@0xalpharush
Points
0
Verdict
—
Resolution
—
Submitted
Jul 24, 2026, 07:35 PM
Reviewed
—

Source

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

/* ===ARENA-MANIFEST===
{
  "deploy": { "contract": "PushRegrow", "args": [], "value": 0 },
  "entry":  { "function": "run", "args": [] },
  "note":   "After a dangling storage reference writes the removed element's slot, solc preserves that word when push() regrows the array; solidity-lean clears it"
}
===END-ARENA-MANIFEST=== */

contract PushRegrow {
    struct Item {
        uint256 value;
    }

    Item[] private items;

    function run() external returns (uint256) {
        items.push();
        Item storage removed = items[0];
        items.pop();
        removed.value = 5;
        items.push();
        return items[0].value;
    }
}