Core Data Structures
Item Struct
Request Struct
Arbitration Parameters
Enumerations
Initialization
Initialize Function
Base Deposits Array
Example Initialization
Challenge Period Guidelines:
- Testnet: 3600 seconds (1 hour)
- Mainnet: 259200-604800 seconds (3-7 days)
Item Data Format
Items in Curate V2 are stored as a JSON string. The registry’slistMetadata defines the schema via a columns array, and each item matches those columns:
itemID is keccak256(abi.encodePacked(itemJSON)) - the hash of the exact JSON string submitted. The data mappings system uses this column structure to extract {{itemName}} and {{itemDescription}} template variables.
arbitrationParamsIndex - Versioning
Each Request stores a uint24 arbitrationParamsIndex that snapshots the registry’s arbitration parameters at submission time. This is critical: if the governor updates the arbitrator or extraData after a request is submitted, the original parameters are preserved for that request’s challenge and dispute lifecycle.
This means:
- Challengers must use the same arbitrationParamsIndex as the original submission - fetch it from the request before challenging
- Cost calculations must use the arbitration params at
request.arbitrationParamsIndex, not the current params
Registration vs Removal - Separate Dispute Templates
Curate V2 uses two separate dispute templates: one for registration requests and one for removal (clearing) requests. They have different answer logic:
Both are set at initialization via
TemplateRegistryParams.registrationTemplateParameters and removalTemplateParameters. You must provide both, and they must be consistent with your policy document.
Item Submission
Add Item
_item: JSON string matching the registry’s column schema (see Item Data Format above)
itemID: keccak256 hash of the item string
Calculate Submission Cost
Submission Example
Item Removal
Remove Item
_itemID: Hash of the item to remove_evidence: JSON evidence string supporting removal
Removal Example
Challenging Requests
Challenge Request
_itemID: Item with pending request_evidence: JSON evidence supporting challenge
Challenge Example
Executing Requests
Execute Request
Execution Example
Query Functions
Get Item Info
Get Request Info
View Contract Functions
The CurateView contract provides enhanced batch queries:View Contract Example
Governor Functions
Configuration Updates
Direct Item Management
Events
Item Lifecycle Events
Dispute Events
Configuration Events
Access Control
Governor Modifier
Relayer Modifier
Combined Access
Security Considerations
Reentrancy Protection
Reentrancy Protection
- Uses
.send()with 2300 gas limit for refunds - State updates occur before external calls
- No direct
.call()usage for ETH transfers
Integer Overflow
Integer Overflow
- Solidity 0.8.24 has built-in overflow protection
uint24 arbitrationParamsIndexallows 16,777,215 changes
Timestamp Manipulation
Timestamp Manipulation
- Challenge periods use
block.timestamp - Can be manipulated ±15 seconds by miners
- Use sufficiently long periods (hours/days minimum)