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