Markets
Market Registry
How a transaction’s market is derived from the executing MarketContext and canonicalized against the protocol MarketRegistry.
Markets are defined as execution contexts. A transaction’s market is derived from the MarketContext contract/router that emitted an InteractionRecord, not from user-provided metadata.
Markets are derived from execution
- MarketContext: an on-chain contract (or router) that emits canonical
InteractionRecords for a commercial context. - Market (
m): a policy + accounting container bound to one MarketContext. marketId: a registry-assigned identifier derived from the executed MarketContext.
MarketRegistry (canonicalization)
The protocol maintains a canonical MarketRegistry:
marketContext → (marketId, vault, feeRouter, flags)
where:
marketId: uint32: registry-assigned market identifier (unique; not user-chosen)vault: Address: MarketVault for this market (MAY be0x0if unused)feeRouter: Address: where protocol fees for this market are routedflags: uint32: e.g. ACTIVE / DEPRECATED
InteractionRecords
An InteractionRecord is emitted by a registered MarketContext during execution and is included in an SDL. Minimal sketch:
marketId: uint32marketContext: Addressbuyer: Addressprovider: Addressamount: uint128fee: uint128edgeDeltaand/or other protocol-defined graph/attribute deltasproofRefs: bytes32[]disputeRefs: bytes32[](if applicable)
Validity rule (critical)
An interaction record (and any resulting commerce edges) is valid only if:
MarketRegistry[marketContext].marketId == marketIdat that block height- the market is ACTIVE
Security note
The security-critical requirement is that users cannot choose a favorable market label. By deriving marketId from the executed marketContext via a canonical registry mapping, market-scoped caps, seeds, and accounting can be enforced deterministically.Related work (context, not requirements)
- Authenticated commitments: binding MarketRegistry into a snapshot artifact so verifiers can check market attribution via short openings is a standard authenticated-data pattern (Merkle trees: Merkle, 1987).