ClaimRegistry: one fee, one claim - #1
Merged
Merged
Conversation
…de; not deployed) contracts/: ClaimRegistry.sol pulls the fee and burns it in the transaction that records the claim, one record per (digest, claimant), no owner, no pause, no upgrade, no ether. 18 Foundry tests with a switchable mock token, a fuzz at 10,000 runs, an invariant (supply drop equals fee times distinct claims), and a fork test against the real token that runs when a Robinhood RPC is reachable. Python: attest approves only when short and claims through the registry; read_claim reads the Claimed log; a self-addressed claim mined after the registry is refused; the import ledger is charged to the claim for registry claims and to the burn for older ones. The in-browser verifier reads the receipt. REGISTRY_DEFAULT stays None until the user deploys. 52 tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deployed 2026-09-18 at block 66593107, runtime bytecode matched against the local build with the immutables masked, token and fee read back from chain. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Quorum3 finding(s) confirmed by two lenses each. 5 candidate(s) seen by one lens and held back. reentrancy in
unguarded-state-write in
unguarded-state-write in
A finding is a shape worth review, not a vulnerability claim. Two independent readings agreed; a person decides. |
…orge tests in CI Deployed 2026-09-18 at block 66593107. First claim through it the same day (block 66594959), verified, revealed, imported into an empty memory. Older QUORUM2 claims still read against their separate burn. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A contract on Robinhood Chain that records a claim and takes its fee in the same transaction.
claim(digest)pulls 100,000 QUORUM from the claimant, burns it through the token's ownburn(uint256), and only then writesclaimedAt[digest][claimant]. A record cannot exist without its own fee and a fee cannot back two records. No owner, no pause, no upgrade, no ether, nothing to sweep. A different fee is a different registry address.This closes the limit that SECURITY.md and the README honesty table have carried since 13 Sep: on chain, nothing tied a burn to a claim.
What is built and tested
contracts/src/ClaimRegistry.sol(about 70 lines, solc 0.8.28, Paris).forge testpasses.attestapproves only when the allowance is short and claims through the registry;read_claimreads theClaimedlog from the registry address and ignores that log from any other address; a self-addressed QUORUM2 claim mined after the registry existed is refused; older claims still read; the import ledger is charged to the claim for registry claims and to the burn for older ones; the in-browser verifier on the registry page reads the receipt. 52 tests pass.What is not done
REGISTRY_DEFAULTisNone, so on this branchquorum attestrefuses untilQUORUM_REGISTRYis set. That is why this is a draft and not on main.forge test --match-contract Fork --fork-url "$QUORUM_RPC" --evm-version cancun) could not complete: the public Robinhood RPC drops the connection mid-run. It runs when a stable node is available.Merge conditions
forge script script/Deploy.s.sol:Deploy --rpc-url "$QUORUM_RPC" --broadcast --slow(the key comes fromDEPLOYER_PRIVATE_KEYin the environment).quorum verify, revealed, and imported into a fresh memory.REGISTRY_DEFAULTandREGISTRY_SINCEset; SECURITY.md, README and the registry page updated in the same commit.Clone note:
git submodule update --initfor forge-std.🤖 Generated with Claude Code