{"assessments":[],"deployments":[],"fuzz":[],"identity":{"adapter":"0xde152afb7db5373f34876e1499fbd893a82dd336","chainId":1,"collection":"0x0000ec93127baa929e58e97dd0095a2bfb38ec1d","registry":"0x8004a169fb4a3325136eb29fa0ceb6d2e539a432"},"interpretation":"Records acceptance and evidence. Neither completion nor an AI assessment establishes correctness, safety, or independent review.","jobId":"fde2af58-028f-491f-95b6-f9b5f1eddf69","kind":"shape:chain","nodes":[{"acceptedSubmissionHash":null,"dependsOn":["build_contract_project","write_foundry_tests","frontend_for_contract"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"6b037a7b6601e883cf8a906c1520c0624817d42d8310b65c2f43679204608af3","skillId":"adversarial-review","tools":[]},"key":"adversarial_review","kind":"code","role":"review","skillHash":"6b037a7b6601e883cf8a906c1520c0624817d42d8310b65c2f43679204608af3","skillId":"adversarial-review","state":"waiting"},{"acceptedSubmissionHash":"1bc839afe12208c1da36afae8669d5cc3edc27a615fc5c8500c68761a93661fb","dependsOn":[],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"d59561da3b378461b7c749f6bd5084477d44993aa94972ddea90f542535751df","skillId":"build-contract-project","tools":[]},"key":"build_contract_project","kind":"code","role":"implement","skillHash":"d59561da3b378461b7c749f6bd5084477d44993aa94972ddea90f542535751df","skillId":"build-contract-project","state":"accepted"},{"acceptedSubmissionHash":null,"dependsOn":["build_contract_project","write_foundry_tests","frontend_for_contract"],"execution":{"network":true,"optionalTools":["browser"],"profile":"none","requires":["network"],"skillHash":"fd33b6741366d364a55a4c0ba2bc4f5d329cec0b62f27a83289dc5b30ab03575","skillId":"design-critic","tools":[]},"key":"design_critic","kind":"code","role":"review","skillHash":"fd33b6741366d364a55a4c0ba2bc4f5d329cec0b62f27a83289dc5b30ab03575","skillId":"design-critic","state":"waiting"},{"acceptedSubmissionHash":null,"dependsOn":["write_foundry_tests"],"execution":{"mustProduce":["dist/index.html"],"network":true,"optionalTools":["browser"],"profile":"none","requires":["network"],"skillHash":"7a8712ac362fd9796a2d33fcee6ee3ad1adaefb41673944a34b3d34ef78b3e37","skillId":"frontend-for-contract","tools":[]},"key":"frontend_for_contract","kind":"code","role":"implement","skillHash":"7a8712ac362fd9796a2d33fcee6ee3ad1adaefb41673944a34b3d34ef78b3e37","skillId":"frontend-for-contract","state":"waiting"},{"acceptedSubmissionHash":null,"dependsOn":["build_contract_project"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"4c76766b00591dfe982fe85d3de589fdb2f810e5137c301155d1c5e36a1d3b23","skillId":"write-foundry-tests","tools":[]},"key":"write_foundry_tests","kind":"code","role":"tests","skillHash":"4c76766b00591dfe982fe85d3de589fdb2f810e5137c301155d1c5e36a1d3b23","skillId":"write-foundry-tests","state":"failed"}],"objective":"COMPLETE SELF-CONTAINED SPEC - this objective supersedes the project's stored brief in full (the stored copy is truncated); build from this text alone.\n\nCROWN MODEL 2 (the Throne) - one immortal token per ticker, and a registry that decides who controls it. Build the full system for Robinhood Chain (chainId 4663) per this specification and deliver a working end-to-end demo.\n\nCONCEPT: A registry binds a ticker to exactly ONE token contract, forever - one Dexscreener page, one chart, one pool, history never resets. What changes hands is the throne: the controller/beneficiary who receives the token's hook fee stream. A Uniswap v4 hook on the token's pool skims a cut of every swap and accrues it to the registry's current beneficiary for that ticker. Anyone can challenge for the throne with a bonded ETH stake-vote naming a candidate beneficiary wallet; if the challenger out-stakes the reigning side within the window and quorum is met, the registry flips the beneficiary after a timelock and every subsequent swap accrues to the new controller. The token, its supply, and its pool NEVER change - a dethrone moves control only.\n\nCONTRACT 1 - ThroneRegistry:\n- ticker is bytes32 = keccak256 of the uppercase symbol string.\n- registerTicker(ticker, token, beneficiary): callable once per ticker; the token address is immutable afterward - no setter may exist, by construction.\n- openChallenge(ticker, candidateBeneficiary) payable: bond 0.01 ETH; one live challenge per ticker; challengeable only after MIN_REIGN (a constructor parameter, production default 7 days); 3-day cooldown per ticker after a failed challenge. A challenge names a candidate beneficiary wallet - there is no challenger token in this model.\n- stake(challengeId, side) payable in ETH during a 72-hour window (side = reigning or challenger).\n- finalize(challengeId) after the window plus a 24-hour timelock: the challenger wins iff challenger stake > reigning stake AND total staked >= 0.05 ETH quorum. On a win, the registry beneficiary (and controller) flips to the candidate and a Reign record is appended (controller, from, to, how the reign ended). Losing side: 80% refundable to its stakers (pull pattern), 20% slashed - half of the slash pro-rata to winning-side stakers (pull), half to treasury 0xf19F11Dee16a341671E6Ed3e209b704C1Bbc3E57. Winning side stake is fully refundable (pull).\n- Public reign history per ticker (the dynasty log) and per-ticker stake totals. Events: TickerRegistered, ChallengeOpened, Staked, Dethroned, ChallengeFailed.\n- No admin functions after deployment beyond the constructor parameter init; resolution is purely rule-based.\n\nCONTRACT 2 - CrownHook (Uniswap v4; afterSwap and afterSwapReturnsDelta permissions), ACCRUE-AND-PULL fee design:\n- afterInitialize records poolId -> ticker; the deployer registers each pool ticker explicitly.\n- On every swap: compute the cut (per-pool bps set at init, default 100, range 0-500) from the swap amount, read registry.beneficiary(ticker) via staticcall, take the cut as the hook's own delta and settle it inside the same unlock by calling PoolManager.mint(address(this), currency.toId(), cut), so the hook holds an ERC-6909 claim on the PoolManager backing the accrual; credit crownOwed[beneficiary][currency] += cut. Maintain a public counter crownPaid[ticker][currency] (cumulative accrued).\n- During settlement the hook may call ONLY the PoolManager (mint/settle/take) and the registry staticcall read - never any contract whose target or code is beneficiary-controlled, and never a transfer to the beneficiary mid-swap: a contract beneficiary could otherwise leave transient PoolManager debt inside receive() and revert the enclosing unlock with CurrencyNotSettled. Swap liveness is unconditional - if the registry read fails, the swap proceeds without the cut.\n- claim() on the hook, callable outside any swap, runs in its own unlock: it redeems the hook's ERC-6909 claim for that currency (burn the claim, take the currency) and transfers the caller's full crownOwed balance to the caller, zeroing the balance first (checks-effects-interactions). Claiming must work at any time, including while a challenge is live.\n\nDEMO LAUNCH (this launch token): name \"Throne Demo\", symbol THRONE, paired with native ETH on Robinhood Chain, its pool wearing CrownHook, registered as the genesis entry for ticker THRONE with beneficiary = the launch payer wallet. The demo registry instance uses MIN_REIGN = 0 (the production default of 7 days stays in the code and README) so a full challenge -> stake -> finalize -> beneficiary flip can be executed end-to-end immediately after launch; name the second beneficiary wallet used in the demo flip in the delivery notes.\n\nSITE: the ticker single canonical page - the token and its pool links, the current throne holder (controller and beneficiary), accrued and claimed fee totals, the reign history timeline (the dynasty log), live challenge state (window, both stakes, time remaining), stake, challenge and claim actions wired to the contracts, and a plain-English how-it-works section.\n\nTESTS (Foundry, in the repo): registry and challenge math unit tests (bond, quorum, slash split exact to the wei); a malicious-contract-beneficiary test whose receive() attempts to leave PoolManager debt, proving swaps still settle and the fee still accrues; claim() correctness exact to the wei; an integration test that executes buy -> challenge -> stake -> finalize -> buy and asserts (a) accrual now goes to the new beneficiary, (b) crownPaid matches accruals and claims, and (c) the token address stored in the registry is byte-identical before and after the dethrone. Contracts must compile with the repo pinned settings and be Sourcify-verifiable; record the compiler settings in the README.","parentJobId":"0918b655-0b09-4593-b49c-a3621a0d7df9","planHash":"f695f490152f5ad008b5015da39176d4779bcc57bf55cebedd2dfdd24343ec9d","previousHash":"0000000000000000000000000000000000000000000000000000000000000000","projectId":"9685c19c-ce28-4580-919f-92dff08e27a3","publication":{"commit":null,"deliveredAt":null,"repoUrl":"https://github.com/identity-md-launches/launch-1884-crown-model-2-throne"},"receiptIdentity":{"adapter":"0xde152afb7db5373f34876e1499fbd893a82dd336","chainId":1,"collection":"0x0000ec93127baa929e58e97dd0095a2bfb38ec1d","registry":"0x8004a169fb4a3325136eb29fa0ceb6d2e539a432"},"registry":"0xb6d0a187b050fa5bb0b87033a203f37becf4a775","research":[],"schema":"identitymd-work-v1","signals":[{"agentId":"50904","feedbackHash":"cf9b37028d1fab34d41120ce8945455c1434a085fdd0097ab3930aa7289e9b82","nodeKey":"build_contract_project","submissionHash":"1bc839afe12208c1da36afae8669d5cc3edc27a615fc5c8500c68761a93661fb","tag1":"verification:checks","tag2":"acceptance-v2","value":1}],"site":null,"snapshotHash":"23a8810b06b47ae098136cdebbc8116ad78fbfdaa07f0e8ed4d4f455e8dfd0ad","state":"blocked","submissions":[{"artifacts":[],"attempt":1,"bundleHash":"019b92ad46f0a2dcce5a6842efe0b4724b06d17d9efe6d7c6a1af449e8c1db33","device":"c4f696e22e7a36f7","findings":[],"hash":"1bc839afe12208c1da36afae8669d5cc3edc27a615fc5c8500c68761a93661fb","nodeId":"7de0af60-c461-49f7-a851-473e5f3f07d2","outcome":"completed","summary":"Implemented the registry, ERC-6909-backed CrownHook, token, site, and working local demo.\n\nVerified: `forge build`, all **32 tests**, `forge fmt --check`, and end-to-end site actions.\n\nRun `node tools/demo.mjs --serve`.\n\n[README and delivery notes](/root/.identitymd/work/fde2af58-028f-491f-95b6-f9b5f1eddf69/7de0af60-c461-49f7-a851-473e5f3f07d2/README.md) include deployment parameters and the second beneficiary. No public-chain deployment was performed; the demo advances the full 96-hour window locally.","treeHash":"547b5b33ceca12d11e16bef2d4046bd574ffe473","usage":{"cachedInputTokens":4268672,"inputTokens":142584,"model":"gpt-6-astra","outputTokens":80457,"runtime":"codex","turns":9,"wallClockMs":2185443}},{"artifacts":[],"attempt":1,"bundleHash":null,"device":"e02faafd8034e613","findings":[],"hash":"24c0db75c2fc59cf76f3eb1fa13b725689d56f5c561f00ee98ed1838317c3fb8","nodeId":"fe419911-c7fe-4d73-87ba-015b2b5e74c7","outcome":"failed","summary":"codex-devin wrapper: unhandled option --strict-config","treeHash":null,"usage":{"cachedInputTokens":0,"inputTokens":0,"model":"gpt-6-astra","outputTokens":0,"runtime":"codex","turns":0,"wallClockMs":38}},{"artifacts":[],"attempt":2,"bundleHash":null,"device":"aeca54a62e4f602e","findings":[],"hash":"a23be652712eb803f2e1ce1ed30cb6666f0f3543afdabadac5cad4513d21f45c","nodeId":"fe419911-c7fe-4d73-87ba-015b2b5e74c7","outcome":"failed","summary":"codex-devin wrapper: unhandled option --strict-config","treeHash":null,"usage":{"cachedInputTokens":0,"inputTokens":0,"model":"gpt-6-astra","outputTokens":0,"runtime":"codex","turns":0,"wallClockMs":57}},{"artifacts":[],"attempt":3,"bundleHash":null,"device":"9704b5b521bdf559","findings":[],"hash":"acd04419829f7e99ea81f9e40205f16f493fed6f9f7cd2042de71aa252ce6811","nodeId":"fe419911-c7fe-4d73-87ba-015b2b5e74c7","outcome":"failed","summary":"codex-devin wrapper: unhandled option --strict-config","treeHash":null,"usage":{"cachedInputTokens":0,"inputTokens":0,"model":"gpt-6-astra","outputTokens":0,"runtime":"codex","turns":0,"wallClockMs":40}}],"verification":[{"checks":[{"durationMs":16398,"exitCode":0,"name":"build","output":"Compiling 73 files with Solc 0.8.26\nSolc 0.8.26 finished in 15.91s\nCompiler run successful!\n","passed":true},{"durationMs":204,"exitCode":0,"name":"test","output":"No files changed, compilation skipped\n\nRan 2 tests for test/ThroneToken.t.sol:ThroneTokenTest\n[PASS] testConstructorRequiresExplicitPayerAndNonzeroSupply() (gas: 5773)\n[PASS] testFixedSupplyTransfersAllowancesAndInvalidRecipients() (gas: 264153)\nSuite result: ok. 2 passed; 0 failed; 0 skipped; finished in 616.96µs (647.80µs CPU time)\n\nRan 15 tests for test/ThroneRegistry.t.sol:ThroneRegistryTest\n[PASS] testBelowQuorumFailsEvenWithMajorityAndNoDefenders() (gas: 835689)\n[PASS] testBondIsExactAndCountsAsOpenerStake() (gas: 467952)\n[PASS] testBothSidesSingleWalletAndClaimsDuringLaterChallenge() (gas: 1140919)\n[PASS] testClaimsCannotPrecedeFinalizationAndUnknownWalletCannotClaim() (gas: 584638)\n[PASS] testExactSlashSplitAndWinnerRewards() (gas: 1437888)\n[PASS] testFuzzConservationRoundingAndClaimOrder(uint96,uint96,bool) (runs: 256, μ: 1506263, ~: 1506409)\nLogs:\n  Bound result 1\n  Bound result 4101730988\n\n[PASS] testInvalidCandidatesUnknownIdsAndConcurrentChallenge() (gas: 470555)\n[PASS] testProductionDefaultAndMinReignBoundary() (gas: 836320)\n[PASS] testQuorumExactlyWinsAndTokenNeverChanges() (gas: 822810)\n[PASS] testRegistrationIsPermanentAndNormalized() (gas: 225100)\n[PASS] testRejectingAndReentrantStakerCannotBlockResolutionOrOthers() (gas: 1401760)\n[PASS] testRejectingTreasuryCannotBlockFinalizationOrStakerClaims() (gas: 966205)\n[PASS] testTieFailsAndCooldownStartsAtFinalization() (gas: 1044868)\n[PASS] testTreasuryCanClaimBeforeStakersAndCannotRedirectFunds() (gas: 975890)\n[PASS] testWindowAndTimelockExactBoundaries() (gas: 699047)\nSuite result: ok. 15 passed; 0 failed; 0 skipped; finished in 20.61ms (24.05ms CPU time)\n\nRan 15 tests for test/CrownHook.t.sol:CrownHookTest\n[PASS] testBuyChallengeStakeFinalizeBuyPreservesTokenPoolAndAccruals() (gas: 1830188)\n[PASS] testCallbacksAndConfigurationRejectUnauthorizedCalls() (gas: 182421)\n[PASS] testClaimWithinAnotherUnlockIsRefusedWithoutLosingAccrual() (gas: 1552527)\n[PASS] testClaimsAcrossMultipleTickersAndBoundedClaimRemoval() (gas: 2091913)\n[PASS] testFuzzBothDirectionsExactInputAndOutput(uint96,bool,bool) (runs: 256, μ: 421381, ~: 422358)\nLogs:\n  Bound result 635642618298058\n\n[PASS] testMaliciousBeneficiaryCannotBreakSwapAndCanClaimWhenLocked() (gas: 1964996)\n[PASS] testNativeAndTokenClaimsAreExactAndIndependentDuringLiveChallenge() (gas: 1707742)\n[PASS] testPartialFillChargesActualAmountNotRequestedAmount() (gas: 402520)\n[PASS] testPermissionsCanonicalPoolAndImmutableSettings() (gas: 158737)\n[PASS] testRegistryGasExhaustionSkipsFee() (gas: 253545)\n[PASS] testRegistryReadFailuresSkipFeesAndNeverBreakSwaps() (gas: 1052150)\n[PASS] testRejectedClaimRollsBackOnlyClaimAndSwapsContinue() (gas: 2133148)\n[PASS] testSubWeiCutRoundsToZeroAndSwapStillSettles() (gas: 216996)\n[PASS] testUnconfiguredManagerAndInvalidPoolSettings() (gas: 19028692)\n[PASS] testZeroFeeAndMaximumFeePools() (gas: 2218377)\nSuite result: ok. 15 passed; 0 failed; 0 skipped; finished in 29.98ms (38.62ms CPU time)\n\nRan 3 test suites in 30.69ms (51.21ms CPU time): 32 tests passed, 0 failed, 0 skipped (32 total tests)\n","passed":true},{"durationMs":153,"exitCode":0,"name":"source-index","output":"{\"v\":1,\"entryPoints\":[\"CrownHook.afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)\",\"CrownHook.afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)\",\"CrownHook.claim(address)\",\"CrownHook.claim(bytes32,address)\",\"CrownHook.configurePoolManager(address)\",\"CrownHook.receive()\",\"CrownHook.registerPool((address,address,uint24,int24,address),bytes32,uint16,uint160)\",\"CrownHook.registerPool((address,address,uint24,int24,address),bytes32,uint160)\",\"CrownHook.unlockCallback(bytes)\",\"CrownHookFactory.deploy(address,address,bytes32)\",\"ProductionThroneRegistry.claimStake(uint256)\",\"ProductionThroneRegistry.claimTreasury()\",\"ProductionThroneRegistry.finalize(uint256)\",\"ProductionThroneRegistry.openChallenge(bytes32,address)\",\"ProductionThroneRegistry.registerTicker(bytes32,address,address)\",\"ProductionThroneRegistry.stake(uint256,uint8)\",\"ThroneRegistry.claimStake(uint256)\",\"ThroneRegistry.claimTreasury()\",\"ThroneRegistry.finalize(uint256)\",\"ThroneRegistry.openChallenge(bytes32,address)\",\"ThroneRegistry.registerTicker(bytes32,address,address)\",\"ThroneRegistry.stake(uint256,uint8)\",\"ThroneToken.approve(address,uint256)\",\"ThroneToken.transfer(address,uint256)\",\"ThroneToken.transferFrom(address,address,uint256)\"],\"files\":{\".gitignore\":6,\"README.md\":186,\"docs/demo-evidence.json\":188,\"docs/dependencies.md\":26,\"docs/dependencies.sha256\":84,\"docs/validation.md\":23,\"foundry.toml\":25,\"site/abi.json\":1,\"site/app.js\":342,\"site/deployment.json\":15,\"site/index.html\":53,\"site/styles.css\":1,\"site/vendor/ethers.LICENSE.md\":21,\"site/vendor/ethers.umd.min.js\":1,\"src/CrownHook.sol\":271,\"src/CrownHookFactory.sol\":39,\"src/ThroneRegistry.sol\":284,\"src/ThroneToken.sol\":57,\"test/CrownHook.t.sol\":424,\"test/ThroneRegistry.t.sol\":337,\"test/ThroneToken.t.sol\":45,\"test/helpers/DemoRouter.sol\":94,\"test/helpers/HookFixture.sol\":110,\"tools/check-site.mjs\":83,\"tools/demo.mjs\":174,\"tools/export-abi.mjs\":11,\"tools/local-provider.mjs\":54,\"tools/mine-hook.mjs\":29,\"tools/vendor/linkedom.LICENSE\":15,\"tools/vendor/linkedom.mjs\":12761},\"excluded\":[\"lib/\",\"node_modules/\"],\"truncated\":false}","passed":true},{"durationMs":3327,"exitCode":0,"name":"slither","output":"[high/medium] arbitrary-send-eth at src/ThroneRegistry.sol:275: ThroneRegistry._send(address,uint256) (src/ThroneRegistry.sol#275-278) sends eth to arbitrary user\n[medium/medium] unused-return at src/CrownHook.sol:251: CrownHook._pay(Currency,uint256) (src/CrownHook.sol#251-257) ignores return value by poolManager.unlock(abi.encode(currency,amount)) (src/CrownHook.sol#254)\n[low/medium] reentrancy-benign at src/CrownHook.sol:166: Reentrancy in CrownHook.afterSwap(address,PoolKey,IPoolManager.SwapParams,BalanceDelta,bytes) (src/CrownHook.sol#166-196):\n[low/medium] reentrancy-events at src/CrownHook.sol:166: Reentrancy in CrownHook.afterSwap(address,PoolKey,IPoolManager.SwapParams,BalanceDelta,bytes) (src/CrownHook.sol#166-196):\n[low/medium] timestamp at src/ThroneRegistry.sol:199: ThroneRegistry.finalize(uint256) (src/ThroneRegistry.sol#199-228) uses timestamp for comparisons\n[low/medium] timestamp at src/ThroneRegistry.sol:163: ThroneRegistry.openChallenge(bytes32,address) (src/ThroneRegistry.sol#163-181) uses timestamp for comparisons\n[low/medium] timestamp at src/ThroneRegistry.sol:183: ThroneRegistry.stake(uint256,ThroneRegistry.Side) (src/ThroneRegistry.sol#183-188) uses timestamp for comparisons\n[low/medium] timestamp at src/ThroneRegistry.sol:116: ThroneRegistry.registerTicker(bytes32,address,address) (src/ThroneRegistry.sol#116-127) uses timestamp for comparisons","passed":true},{"durationMs":404,"exitCode":0,"name":"aderyn","output":"[high] abi-encode-packed-hash-collision at src/CrownHookFactory.sol:21: `abi.encodePacked()` Hash Collision\n[high] contract-locks-ether at src/CrownHook.sol:19: Contract locks Ether without a withdraw function\n[high] eth-send-unchecked-address at src/ThroneRegistry.sol:244: ETH transferred without address checks (2 places)\n[high] reentrancy-state-change at src/CrownHook.sol:186: Reentrancy: State change after external call\n[high] unprotected-initializer at src/CrownHookFactory.sol:20: Unprotected initializer\n[low] costly-loop at src/CrownHook.sol:220: Costly operations inside loop\n[low] large-numeric-literal at src/CrownHook.sol:26: Large Numeric Literal (2 places)\n[low] missing-inheritance at src/ThroneRegistry.sol:7: Missing Inheritance (2 places)\n[low] state-change-without-event at src/CrownHook.sol:259: State Change Without Event\n[low] unchecked-return at src/CrownHook.sol:254: Unchecked Return\n[low] unsafe-erc20-operation at src/CrownHook.sol:256: Unsafe ERC20 Operation\n[low] unused-public-function at src/ThroneRegistry.sol:129: Public Function Not Used Internally","passed":true}],"detail":"all checks passed","evaluation":"checks","profile":"foundry","status":"accepted","submissionHash":"1bc839afe12208c1da36afae8669d5cc3edc27a615fc5c8500c68761a93661fb","verifiedTreeHash":"547b5b33ceca12d11e16bef2d4046bd574ffe473","verifierVersion":"0.1.0+8fbf00a5"}]}