Docs/Smart contracts/StateMarketFactory
StateMarketFactory
Permissionlessly create bonded markets from any compatible template, snapshot economics, and consume canonical factory-level events.
Create#
create accepts the state implementation, encoded initializer, future deadline, resolution mode, metadata URI, and names and symbols for the outcome tokens. It returns the new market and state clone addresses and transfers the snapshotted collateral bond into FeeVault. Template-fee attribution is always derived from the implementation's non-zero creator(); callers cannot override it.
Registry checks#
The registry does not gate create. The factory automatically assigns the canonical nonzero template ID when the supplied implementation is currently approved and records the zero template ID otherwise. It then clones the implementation, invokes the supplied initializer, and reverts the whole transaction if initialization fails.
Configuration#
| Setting | Control | Constraint |
|---|---|---|
| Treasury | FeeVault.setTreasury | Non-zero address; affects future protocol credits. |
| Economics defaults | setDefaultEconomics | Fee rate capped at 500 bps; shares total 10,000 bps; bounty cannot exceed bond. |
| Registry | setRegistry | Must be bound to the factory's immutable EventEmitter. |