internet-court/internet-court-skill / vendored/kleros/kleros-curate
kleros-curate
UnverifiedInteract with Kleros Curate registries across Ethereum Mainnet, Gnosis Chain, and Sepolia. Use when the user mentions Curate, Light Curate/LightGeneralizedTCR/LGTCR, Stake Curate/PermanentGTCR/PGTCR, Scout, token-curated registry/TCR, token lists, address/CDN tags, Goldsky, MetaEvidence, Verify Your List, or Curate calls such as addItem, removeItem, challengeItem, challengeRequest, and fundAppeal. Covers registry discovery and queries; policy/schema inspection; submissions, removals, challenges, evidence, appeals, rewards, execution; factory deployment; and frontend verification on all three networks. Also trigger for registry/list operations paired with Kleros, arbitrator, dispute, juror, or PNK context, and whenever the user names or tests kleros-curate. Do NOT use for non-Kleros registries or generic IPFS uploads without Curate context; route standalone uploads to kleros-ipfs-upload.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 1.0 KB |
| SKILL.md | skill md | 14.8 KB |
| references/light-curate.md | markdown | 12.8 KB |
| references/scout-registries.md | markdown | 14.2 KB |
| references/shared-abi-fragments.md | markdown | 12.5 KB |
| references/shared-deposits.md | markdown | 4.3 KB |
| references/shared-ipfs-upload.md | markdown | 5.0 KB |
| references/shared-item-json.md | markdown | 9.8 KB |
| references/shared-metaevidence.md | markdown | 11.6 KB |
| references/stake-curate.md | markdown | 23.0 KB |
| references/verify-your-list.md | markdown | 7.8 KB |
references/light-curate.md
View on GitHub# Light Curate (LightGeneralizedTCR)
LightGeneralizedTCR (LGTCR) is the most widely deployed Curate flavor. Items enter through an optimistic challenge window: a requester posts an ETH (or xDAI on Gnosis) deposit, and if no challenger disputes within the window, the item is accepted. All deposits are in the chain's native token only.
## Minimum inputs
Collect all four before proceeding. If any is missing: stop and ask.
1. **Registry address** — ask for either:
- Curate URL (preferred): `https://curate.kleros.io/tcr/<chainId>/<address>`
- or chainId + contract address directly
2. **Existing list or new list?** — existing: need chainId + address; new: need factory address + all deploy params (see Deploy section)
3. **Action** — one of: `addItem`, `removeItem`, `challengeRequest`, `submitEvidence`, `fundAppeal`, `executeRequest`, `withdrawFeesAndRewards`, factory deploy
4. **Field values** — for submissions: the actual values for each schema field
**How the user finds the list address (Curate UI):**
1. Open `https://curate.kleros.io`
2. Open the target list
3. Copy the URL — the contract address is the last segment after the chainId
## Registry discovery
Verify the contract before any policy or deposit work. Given `(chainId, listAddress)`:
1. **Confirm chainId** matches user intent — Mainnet = 1, Sepolia = 11155111, Gnosis = 100
2. **Call `eth_getCode(listAddress)`** on that chain's RPC. If result is `0x`: not a contract on this chain — stop and ask for the correct chainId/address
3. **Hallmark read** — call `submissionBaseDeposit()` or `arbitrator()`. If either reverts: wrong contract type or address — stop and re-check
4. Only after steps 1–3 pass: proceed to MetaEvidence and deposit work
Forbidden: declaring "it's an EOA" without chain-scoped `eth_getCode`; guessing which chain the registry is on.
## MetaEvidence retrieval
Fetch per the shared procedure. LGTCR has separate registration and clearing MetaEvidence:
- registration MetaEvidence governs `addItem`
- clearing MetaEvidence governs `removeItem`
Do not assume only `_metaEvidenceID = 0` and `_metaEvidenceID = 1` remain current after governor updates.
Use `eth_getLogs` with the MetaEvidence topic, fetch recent `_evidence` JSON files, and classify the latest
applicable MetaEvidence by title/description/ruling options. Do not apply the wrong stream - it gives the
wrong policy and can give the wrong schema.
For full retrieval procedure (log retrieval, sort-and-take-latest, JSON parsing): `shared-metaevidence.md § LGTCR specifics`
## item.json construction
Build item.json from the `metadata.columns` array in the MetaEvidence JSON. Do not build item.json before reading the policy — the policy defines what constitutes a compliant submission.
**Schema confirmation check (LGTCR-specific):** Before first submission to a registry, confirm field order by inspecting a successfully-registered item. Query logs for a `NewItem(bytes32 _itemID, string _data, bool _addedDirectly)` event on a known-good item — the `_data` field is the item JSON. Compare its field order against `metadata.columns` to confirm the schema encoding before building your own item.json. If no `NewItem` sample exists and type encoding is ambiguous: stop and warn the user.
For construction rules (field types, encoding, column ordering): `shared-item-json.md`
## Deposit computation
LGTCR uses native token only (ETH on Mainnet/Sepolia, xDAI on Gnosis).
| Action | Formula |
|--------|---------|
| `addItem` | `submissionBaseDeposit() + arbitrationCost` |
| `removeItem` | `removalBaseDeposit() + arbitrationCost` |
| `challengeRequest` (registration request) | `submissionChallengeBaseDeposit() + arbitrationCost` |
| `challengeRequest` (removal request) | `removalChallengeBaseDeposit() + arbitrationCost` |
Never quote a cached or approximate deposit — always compute from live onchain reads. If you cannot compute live: stop.
For arbitrationCost read sequence and the never-guess rule: `shared-deposits.md § LGTCR specifics`
## Submit item
1. **Fetch MetaEvidence** - use the latest registration-like MetaEvidence. Extract `fileURI` and `metadata.columns`. See `shared-metaevidence.md § LGTCR specifics`.
2. **Read policy** - fetch the `fileURI` document before building item.json. The policy defines what constitutes a compliant item.
3. **Build item.json** - derive schema from `metadata.columns`; validate exact columns, field types, values, and placeholders. Run the schema confirmation check (NewItem event sample) if type encoding is ambiguous. See `shared-item-json.md`.
4. **Upload to IPFS** — upload item.json → obtain `/ipfs/<CID>`. → `shared-ipfs-upload.md`
5. **Compute deposit live** — `submissionBaseDeposit() + arbitrationCost`. → `shared-deposits.md § LGTCR specifics`
6. **Simulate** — dry-run with identical calldata and `msg.value`; confirm no revert
7. **Submit** — call `addItem("/ipfs/<CID>")` with `msg.value = deposit`
ABI: `function addItem(string _item) external payable` — full fragment in `shared-abi-fragments.md`
## Challenge / remove item
### Remove item
1. **Fetch MetaEvidence** - use the latest clearing-like MetaEvidence. See `shared-metaevidence.md § LGTCR specifics`.
2. **Read removal policy** - fetch `fileURI` document from clearing MetaEvidence
3. **Draft removal evidence JSON** — upload to IPFS → `/ipfs/<CID>`. → `shared-ipfs-upload.md`
4. **Compute removal deposit** — `removalBaseDeposit() + arbitrationCost`. → `shared-deposits.md § LGTCR specifics`
5. **Simulate** — dry-run with same calldata + `msg.value`
6. **Submit** — call `removeItem(itemID, "/ipfs/<CID>")` with `msg.value = deposit`
ABI: `function removeItem(bytes32 _itemID, string _evidence) external payable`
### Challenge item
1. **Determine request type** — check whether the active request is a registration request (submission) or a removal request. This determines which deposit formula to use: registration requests use `submissionChallengeBaseDeposit()`; removal requests use `removalChallengeBaseDeposit()`.
2. **Read the applicable policy** - latest registration policy if challenging a registration; latest clearing policy if challenging a removal
3. **Draft challenge evidence JSON** — upload to IPFS → `/ipfs/<CID>`. → `shared-ipfs-upload.md`
4. **Compute challenge deposit**:
- Registration request: `submissionChallengeBaseDeposit() + arbitrationCost`
- Removal request: `removalChallengeBaseDeposit() + arbitrationCost`
→ `shared-deposits.md § LGTCR specifics`
5. **Simulate** — dry-run with same calldata + `msg.value`
6. **Submit** — call `challengeRequest(itemID, "/ipfs/<CID>")` with `msg.value = deposit`
ABI: `function challengeRequest(bytes32 _itemID, string _evidence) external payable`
## Submit evidence
1. **Draft evidence JSON** — upload to IPFS → `/ipfs/<CID>`. → `shared-ipfs-upload.md`
2. **Submit** — call `submitEvidence(itemID, "/ipfs/<CID>")` with `msg.value = 0`
Evidence can be submitted by any party while a request is active. ABI: `function submitEvidence(bytes32 _itemID, string _evidence) external`
## Fund an appeal
For the appeal funding formula: `shared-deposits.md § Appeal funding (shared)`
**Do NOT attempt to fund if:** no active dispute (`disputed == false`), loser has passed the half-time deadline (`now >= (start + end) / 2`), side is already fully funded (`hasPaid[side] == true`), or simulation fails.
**Step-by-step algorithm:**
1. Call `getItemInfo(itemID)` → get `numberOfRequests`. Set `requestID = numberOfRequests - 1`.
2. Call `getRequestInfo(itemID, requestID)` → get `disputed`, `disputeID`, `numberOfRounds`, `ruling`, `requestArbitrator`, `requestArbitratorExtraData`. If `disputed == false`: no appeal to fund — stop.
3. Set `roundID = numberOfRounds - 1`.
4. Call `getRoundInfo(itemID, requestID, roundID)` → get `amountPaid[3]`, `hasPaid[3]`.
5. From `requestArbitrator` (use the arbitrator from `getRequestInfo` — NOT the registry-level `arbitrator()` return value, which may differ): call `appealCost(disputeID, requestArbitratorExtraData)`. Optionally call `currentRuling(disputeID)` and `appealPeriod(disputeID)` → `(start, end)`.
6. Compute `totalRequired` per the formula in `shared-deposits.md § Appeal funding (shared)`.
7. Compute `remaining`: if `hasPaid[side]` is true → `remaining = 0`; else → `remaining = max(totalRequired - amountPaid[side], 0)`.
8. Simulate then call `fundAppeal(itemID, side)` with `msg.value = remaining`.
Party enum: `0 = None`, `1 = Requester`, `2 = Challenger`. Never fund side 0 (None).
Loser half-time rule: the losing side must fund before `(start + end) / 2` — if `now >= midpoint`, the loser can no longer fund.
ABI: `function fundAppeal(bytes32 _itemID, uint8 _side) external payable`
## Execute / Withdraw
After the challenge window expires with no challenge, finalize the request: call `executeRequest(itemID)`.
To withdraw crowdfunded appeal fees and rewards after a resolved dispute: call `withdrawFeesAndRewards(beneficiary, itemID, requestID, roundID)`.
ABI: `function executeRequest(bytes32 _itemID) external` and `function withdrawFeesAndRewards(address _beneficiary, bytes32 _itemID, uint256 _requestID, uint256 _roundID) external` — full fragments in `shared-abi-fragments.md`
## Admin actions
GOVERNOR-ONLY — always simulate and confirm with the governor before executing any admin action.
These calls change registry rules that affect all submitters. Never execute without explicit governor approval.
### Update stake multipliers
Use individual named calls for governor updates:
```text
changeSharedStakeMultiplier(uint256)
changeWinnerStakeMultiplier(uint256)
changeLoserStakeMultiplier(uint256)
```
Read `sharedStakeMultiplier()`, `winnerStakeMultiplier()`, and `loserStakeMultiplier()` before and after the
transaction. The factory `_stakeMultipliers` array order applies only to deployment calldata; governor
updates should call the exact function for the exact field being changed.
## Deploy a new registry (factory)
1. **Identify factory and arbitrator addresses** — for Ethereum Mainnet, Gnosis Chain, and Sepolia, use
`shared-abi-fragments.md` for the LightGTCRFactory and default Kleros V1 arbitrator addresses. Verify both
addresses with chain-scoped `eth_getCode` before deploying. For any other chain or factory version, obtain
the factory from Kleros-maintained configuration or a verified deployment transaction; do not guess.
2. **Prepare registration MetaEvidence JSON** - this is the add-flow JSON. Use the canonical LGTCR
registration template, minimum requirements, and JSON key order in `shared-metaevidence.md`. Upload
through the Kleros x402 IPFS endpoint as `/ipfs/<CID>`.
3. **Prepare clearing MetaEvidence JSON** - this is the remove-flow JSON. Use the canonical LGTCR clearing
template, minimum requirements, and the same strict validation rules in `shared-metaevidence.md`. Upload
to IPFS as `/ipfs/<CID>`.
4. **Determine all constructor params**: chain, factory address, governor, `arbitrator`,
`arbitratorExtraData` / exact court, `registrationMetaEvidence` URI, `clearingMetaEvidence` URI,
`challengePeriodDuration`, `submissionBaseDeposit`, `removalBaseDeposit`,
`submissionChallengeBaseDeposit`, `removalChallengeBaseDeposit`, `winnerStakeMultiplier`,
`loserStakeMultiplier`, `sharedStakeMultiplier`
- `registrationMetaEvidence` must be the URI for the add-flow JSON.
- `clearingMetaEvidence` must be the URI for the remove-flow JSON.
- The factory deploy signature takes registration first and clearing second. Never swap these two URIs.
- `_stakeMultipliers` order is `[sharedStakeMultiplier, winnerStakeMultiplier, loserStakeMultiplier]`.
Never pass `[winner, loser, shared]`.
5. **Confirm params with user** before proceeding - do not silently choose court, chain, challenge period, deposits, or multipliers
6. **Simulate** — dry-run the factory call with all params
7. **Send** — use the verified factory ABI. For the known `LightGTCRFactory` deployments in
`shared-abi-fragments.md`, call `deploy(...)`. If the user supplies a different factory, fetch its verified
ABI and do not infer a function name or selector.
8. **Listen for `NewGTCR(address _address)` event** — the emitted address is the new registry. Immediately run MetaEvidence retrieval on the new registry to confirm both streams are correct.
## Frontend visibility
Deployment alone does not make a list visible on the Curate frontend. List-of-lists submission is not
mandatory, but it is highly recommended if users should find the list in the UI. Skip it only when the list is
intentionally stealth/private.
Use `verify-your-list.md` for the list-of-lists workflow. On Ethereum Mainnet, Gnosis Chain, and Sepolia, the
canonical verification registries are `LightGeneralizedTCR`. Read `verify-your-list.md` for the selected
chain's fixed address, scan start block, address-role separation, and policy checks, then use the standard
`Submit item` flow above against that verification registry.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |