{
  "sources": [
    {
      "url": "https://raw.githubusercontent.com/gtmcknight/amm-sim/e65314f88de945f6d055bfc2aab01c482ab6570e/research/solved/README.md",
      "quote": "10000  448.261189  443.455598  443.522608  443.663520\n10001  576.779199  571.463409  571.623551  571.977293\n10002  531.886497  525.168028  525.865859  526.411631"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/compiler.py",
      "quote": "SOLC_VERSION = \"0.8.24\""
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/compiler.py",
      "quote": "\"optimizer\": {\n                        \"enabled\": True,\n                        \"runs\": 200,\n                    },\n                    \"viaIR\": True,\n                    \"evmVersion\": \"paris\","
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/compiler.py",
      "quote": "FORBIDDEN_OPCODES = {\n        0x31: \"BALANCE\",\n        0x3B: \"EXTCODESIZE\",\n        0x3C: \"EXTCODECOPY\",\n        0x3F: \"EXTCODEHASH\",\n        0xF0: \"CREATE\",\n        0xF1: \"CALL\",\n        0xF2: \"CALLCODE\",\n        0xF4: \"DELEGATECALL\",\n        0xF5: \"CREATE2\",\n        0xFA: \"STATICCALL\",\n        0xFF: \"SELFDESTRUCT\",\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/compiler.py",
      "quote": "# The only permitted storage entry is the inherited `slots` array at slot 0.\n            if label == \"slots\" and str(slot) == \"0\" and str(offset) == \"0\":\n                continue"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/contracts/src/AMMStrategyBase.sol",
      "quote": "uint256[32] public slots;"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/validator.py",
      "quote": "\"Inline assembly is not allowed\""
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/validator.py",
      "quote": "ALLOWED_IMPORT_PATHS = {\n        \"AMMStrategyBase.sol\",\n        \"IAMMStrategy.sol\",\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/evm/strategy.rs",
      "quote": "const GAS_LIMIT_INIT: u64 = 250_000;\nconst GAS_LIMIT_TRADE: u64 = 250_000;\nconst GAS_LIMIT_NAME: u64 = 50_000;"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_sim_rs/src/evm/strategy.rs",
      "quote": "tx.transact_to = TxKind::Create;\n                    tx.data = Bytes::copy_from_slice(&self.bytecode);\n                    tx.value = U256::ZERO;\n                    tx.gas_limit = 10_000_000;"
    },
    {
      "url": "https://raw.githubusercontent.com/bluealloy/revm/900409f134c1cbd4489d370a6b037f354afa4a5c/crates/revm/src/context/inner_evm_context.rs",
      "quote": "// EIP-170: Contract code size limit\n        // By default limit is 0x6000 (~25kb)\n        if SPEC::enabled(SPURIOUS_DRAGON)\n            && interpreter_result.output.len() > self.cfg().max_code_size()\n        {\n            self.journaled_state.checkpoint_revert(journal_checkpoint);\n            interpreter_result.result = InstructionResult::CreateContractSizeLimit;\n            return;\n        }"
    },
    {
      "url": "https://raw.githubusercontent.com/bluealloy/revm/900409f134c1cbd4489d370a6b037f354afa4a5c/crates/primitives/src/env.rs",
      "quote": "pub fn max_code_size(&self) -> usize {\n        self.limit_contract_code_size.unwrap_or(MAX_CODE_SIZE)\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/bluealloy/revm/900409f134c1cbd4489d370a6b037f354afa4a5c/crates/primitives/src/constants.rs",
      "quote": "pub const MAX_CODE_SIZE: usize = 0x6000;"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/cli.py",
      "quote": "strategy.after_initialize(Decimal(\"100\"), Decimal(\"10000\"))\n        print(f\"Strategy '{strategy.get_name()}' validated successfully!\")"
    },
    {
      "url": "https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557",
      "quote": "301941829a44bb60977bb28181a5e4bfa6544f3696763f987054789b2611d686"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/validator.py",
      "quote": "# Low-level address calls\n        (r\"\\.transfer\\s*\\(\", \"transfer() is not allowed\"),\n        (r\"\\.send\\s*\\(\", \"send() is not allowed\"),\n        # Block manipulation hints\n        (r\"\\bcoinbase\\b\", \"block.coinbase access is not allowed\"),\n        # External contract interactions\n        (r\"interface\\s+\\w+\\s*\\{(?![\\s\\S]*IAMMStrategy)\", \"Custom interfaces are not allowed\"),\n    ]"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/executor.py",
      "quote": "# Gas limits\n    GAS_LIMIT_DEPLOY = 10_000_000\n    GAS_LIMIT_INIT = 250_000\n    GAS_LIMIT_TRADE = 250_000\n\n    # Maximum storage slots (enforced by contract, but we track for reporting)\n    MAX_STORAGE_SLOTS = 32"
    },
    {
      "url": "https://raw.githubusercontent.com/benedictbrady/amm-challenge/6b6921f8d463314aa7c96234e1be25a25245f704/amm_competition/evm/validator.py",
      "quote": "# Dangerous operations\n        (r\"\\bselfdestruct\\s*\\(\", \"selfdestruct is not allowed\"),\n        (r\"\\bsuicide\\s*\\(\", \"suicide is not allowed\"),\n        # Assembly (could bypass restrictions)\n        (r\"\\bassembly\\b(?:\\s*\\([^)]*\\))?\\s*\\{\", \"Inline assembly is not allowed\"),"
    }
  ]
}
