{ "observed_at_utc": "2026-10-31T14:34:42.692Z", "environment": { "node": "v20.20.2", "solc": "0.8.30+commit.73712a01.Emscripten.clang", "openzeppelin": "5.4.0", "ethereumjs_vm": "8.1.1", "decimals": 6, "hardfork": "Shanghai" }, "method": "Four fresh in-memory EVM states; ordered runCall executions, not signed transactions or observed mempool races.", "compiler_input": { "language": "Solidity", "sources": { "LabToken.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n// Test-only, unrestricted mint, unsuitable for real deployment.\ncontract LabToken is ERC20 {\n constructor() ERC20(\"Local Lab Token\", \"LAB\") { _mint(msg.sender, 20000000); }\n function decimals() public pure override returns(uint8) { return 6; }\n function mintForLab(address to,uint256 n) external { _mint(to,n); }\n}" } }, "settings": { "evmVersion": "shanghai", "optimizer": { "enabled": false }, "outputSelection": { "*": { "*": [ "abi", "evm.bytecode.object" ] } } } }, "import_sha256": { "@openzeppelin/contracts/token/ERC20/ERC20.sol": "9f906af4cba6e7e091dc12d45e6687e1239cf82d17678198424250fd64ab96bd", "@openzeppelin/contracts/token/ERC20/IERC20.sol": "01b6f5c4fa45fd38822b286ecef6daf983d27306dd6362496fa71b3e4600b72c", "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": "0b7132f17d14d1d84b41b0bb429be62dafdff00fd3470f68724d8018eb07f57a", "@openzeppelin/contracts/utils/Context.sol": "847fda5460fee70f56f4200f59b82ae622bb03c79c77e67af010e31b7e2cc5b6", "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": "df936240c9a5d342582cbda70dd773b1c1d0e0dda3042b1c17b902ef0c36827b" }, "creation_bytecode_sha256": "db1ef2a3b5317f97471a664beca2ec5676728130d63e0ae082cbb7e9d46bda75", "package_lock_sha256": "703935e46f8fa3e4d58f83c74314d36f1c4f99815ff52d2771849755d33e66f4", "cases": [ { "case": "overwrite_before_spend", "steps": [ { "operation": "approve", "amount_LAB": 5, "method": "approve", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "approve", "amount_LAB": 3, "method": "approve", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "3000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "spend", "amount_LAB": 3, "method": "transferFrom", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "3000000" }, "after": { "owner_balance_raw": "17000000", "recipient_balance_raw": "3000000", "allowance_raw": "0" }, "error": null, "events": [ "Transfer" ] }, { "operation": "spendFail", "amount_LAB": 1, "method": "transferFrom", "before": { "owner_balance_raw": "17000000", "recipient_balance_raw": "3000000", "allowance_raw": "0" }, "after": { "owner_balance_raw": "17000000", "recipient_balance_raw": "3000000", "allowance_raw": "0" }, "error": "ERC20InsufficientAllowance", "events": [] } ], "final": { "owner_balance_raw": "17000000", "recipient_balance_raw": "3000000", "allowance_raw": "0" }, "recipient_LAB": 3 }, { "case": "old_spend_then_new_approval", "steps": [ { "operation": "approve", "amount_LAB": 5, "method": "approve", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "spend", "amount_LAB": 5, "method": "transferFrom", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "after": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "error": null, "events": [ "Transfer" ] }, { "operation": "approve", "amount_LAB": 3, "method": "approve", "before": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "after": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "3000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "spend", "amount_LAB": 3, "method": "transferFrom", "before": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "3000000" }, "after": { "owner_balance_raw": "12000000", "recipient_balance_raw": "8000000", "allowance_raw": "0" }, "error": null, "events": [ "Transfer" ] } ], "final": { "owner_balance_raw": "12000000", "recipient_balance_raw": "8000000", "allowance_raw": "0" }, "recipient_LAB": 8 }, { "case": "zero_after_old_spend", "steps": [ { "operation": "approve", "amount_LAB": 5, "method": "approve", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "spend", "amount_LAB": 5, "method": "transferFrom", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "after": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "error": null, "events": [ "Transfer" ] }, { "operation": "approve", "amount_LAB": 0, "method": "approve", "before": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "after": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "error": null, "events": [ "Approval" ] }, { "operation": "approve", "amount_LAB": 3, "method": "approve", "before": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "after": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "3000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "spend", "amount_LAB": 3, "method": "transferFrom", "before": { "owner_balance_raw": "15000000", "recipient_balance_raw": "5000000", "allowance_raw": "3000000" }, "after": { "owner_balance_raw": "12000000", "recipient_balance_raw": "8000000", "allowance_raw": "0" }, "error": null, "events": [ "Transfer" ] } ], "final": { "owner_balance_raw": "12000000", "recipient_balance_raw": "8000000", "allowance_raw": "0" }, "recipient_LAB": 8 }, { "case": "zero_before_old_spend", "steps": [ { "operation": "approve", "amount_LAB": 5, "method": "approve", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "approve", "amount_LAB": 0, "method": "approve", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "error": null, "events": [ "Approval" ] }, { "operation": "spendFail", "amount_LAB": 5, "method": "transferFrom", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "error": "ERC20InsufficientAllowance", "events": [] }, { "operation": "approve", "amount_LAB": 3, "method": "approve", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "after": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "3000000" }, "error": null, "events": [ "Approval" ] }, { "operation": "spend", "amount_LAB": 3, "method": "transferFrom", "before": { "owner_balance_raw": "20000000", "recipient_balance_raw": "0", "allowance_raw": "3000000" }, "after": { "owner_balance_raw": "17000000", "recipient_balance_raw": "3000000", "allowance_raw": "0" }, "error": null, "events": [ "Transfer" ] } ], "final": { "owner_balance_raw": "17000000", "recipient_balance_raw": "3000000", "allowance_raw": "0" }, "recipient_LAB": 3 } ], "limits": [ "These selected execution orders illustrate allowance overwrite and already-spent amounts. They do not measure real transaction ordering, wallet UX or attacker behavior.", "No RPC, wallet, keys, user accounts, real funds or live-chain deployment. Only this fixed OpenZeppelin wrapper/version.", "A zero approval cannot reverse earlier transfers; these observations are not a safe-action recommendation or complete token/security audit." ] }