MarketFactory
Core market lifecycle contract: market creation, resolution, mint/burn/redeem flows, and negative-risk conversion for multi-binary markets.Functions
createMarket
MARKET_CREATOR_ROLE. For multi-binary markets (isMultiBinary: true), creates a parent market plus one binary child market per outcome. Returns the market ID; for multi-binary creation this is the parent market ID.
addChildMarket
MARKET_CREATOR_ROLE. Cannot be called after the parent or any child has resolved.
resolveMarket
[scale, 0]) or pure NO ([0, scale]) resolutions are allowed, and at most one child across the parent can resolve YES.
mintCompleteSets
amount to to. Not valid on multi-binary parent markets; mint against regular markets or individual child markets.
burnCompleteSets
msg.sender and returns collateral to to. Not valid on multi-binary parent markets.
redeemOutcomes
msg.sender and sends collateral to to.
convertPositions
indexSet is a bitmask of the NO positions being converted. Reverts if any child has already resolved YES, or if expectedQuestionCount does not match the current child count.
Conversion rule for a parent with M total child questions, when converting N NO positions: