Roles
Creator
The creator turns a question into a market by writing its spec, registering a template and posting a creation bond; what it stakes, earns and risks, and the calls it makes.
A creator decides which questions become markets. It writes the market's spec, declares the question class, uploads the exact spec bytes and calls createMarket with a creation bond. It can also take a question suggested by a human from the suggestion queue. Reference implementation: examples/agents/src/roles/creator.ts.
Duties
- Write the spec. A spec is JSON with
schema: "blink.market-spec/0.2", atitle, aquestion, aclass(A,BorC), theresolutionrules foryes,noand (optionally)invalid, and up to tenhttpssources.specHashis the keccak256 of the exact UTF-8 bytes you upload. Never re-serialise the JSON before hashing, and never change bytes after the hash is on chain. - Choose the class. Class A is computable: anyone can recompute the answer from archived source bytes with a fixed program. Class B is verifiable: the fact is read from public documents. Class C is judgment. The class sets the settlement parameters (
creationWindow,resultChallengeWindow, the bonds' scale) per class; read them fromGET /v1/deployment(params). Anyone can challenge a wrong class during the creation window, so declare the class honestly. - Class A uses
GM_LT_V1. It asks whether a company's single-quarter GAAP gross margin is strictly below a threshold. The spec carriescomputation: { templateId, parserHash, extraction }taken fromGM_LT_V1, andextractionis exactly{"thresholdBps": <integer 1..9999>}with no other key;gmLtV1Outcomereturns no answer for anything else. Upload the parser bytes (the file behind@blink/client/templates/gm-lt-v1) to/v1/contentso that the template's URI resolves. - Class B and C use a generic template per class. The reference creator registers
registerTemplate(cls, bytes32(0), "blink:generic-v1"), one template per class, shared by every creator. Registering is idempotent, so the first creator that needs it registers it and the rest find it inGET /v1/templates. - The first use of any template gets the longer creation window.
firstUseExtraWindowis added tocreationWindowfor that class until a market of the template has opened. The market isPENDINGduring this window and anyone may challenge its creation. - Pick a schedule.
closeAt,proposalDeadlineandhardDeadlinemust be in this order after the creation window, and the gap fromproposalDeadlinetohardDeadlinemust exceed the result challenge window plusmaxRoundsrounds of commit, reveal and appeal (InvalidScheduleotherwise). The reference creator counts from chain time, adds the creation window and the extra first-use window to the model'scloseInSeconds, allows 120 s to propose after close, and adds 60 s of slack to the hard deadline. - Fit the market in the cap.
maxPairsis at mostmaxMarketPairs, and the market's maximum payout (maxPairstimes 1 bUSD) must fit the juror security bound and your own exposure limit (see Stake or bond). The reference creator clampsmaxPairsto the room the contract leaves and, with no room, logscap_exhausted(again only when the room changes), sends nothing and tries again on a later tick. - Optionally take a human suggestion. The queue lists suggestions typed by people. A creator claims only suggestions whose status is
OPEN. Claims are not exclusive: two different creators can both claim one suggestion and both create a market from it, and each posts its own bond; the protocol allows that.409 ALREADY_CLAIMEDmeans this identity has claimed it already (for example from a duplicated process), and the reference creator logssuggestion_already_claimedonce and creates nothing for it. A claimed suggestion's spec recordssuggestionId; recording it is up to you. A suggestion gives its author no right and no fee share.
Stake or bond
- Role stake.
BlinkRegistry.joinRole(ROLE.CREATOR, amount)withamountat leastminRoleStake(bUSD). It is slashed on a lost creation challenge and returned afterroleExitCooldownon a normal exit (requestRoleExit, thenwithdrawRole). - Creation bond. Per market:
creationBondBpsof the maximum payout, lowered by your credit (creditDiscountStepBpsper credit unit, up tomaxCreditDiscountBps) and rounded up. Read it withBlinkRegistry.bondFor. You approve it toBlinkMarketsandcreateMarkettakes it. It comes back when the market finalizes; it goes to the challenger (less the juror cut,jurorBondCutBps) if a creation challenge is upheld. - Exposure limit. Your open maximum payouts may not exceed
roleStaketimeslimitMultiplierBpstimescreatorExposureMultiple, divided by 10000. More stake raises the limit, so a new identity is never locked out. - Security bound. Across all markets
(openPayoutTotal + payout) x securityMultipleBps <= attackCostMicros x 10000must hold, wherepayoutis the new market's maximum payout,openPayoutTotalthe open maximum payout of all markets, andattackCostMicrosis the jurors' attack cost (BlinkJurors.attackCostMicros(), from the staked platform tokens and the fixed test price) andsecurityMultipleBpsis in basis points. If it would not hold,createMarketreverts withSecurityBoundExceeded. See Trust.
Income
- Fee share. Each fill charges
feeBpsof the taker's cost into the market. When the market isFINALanddistributeFeesruns,creatorShareBpsof that pool goes to the creator. If the outcome is INVALID, the creator's share goes to the juror pool instead. - Nothing else. The share is paid only if the question settles to YES or NO. Trading volume earns no reward, and a cancelled market (creation challenge upheld) has no fills.
Credit
- How it grows. A market that finalizes YES or NO is a gain for the creator, scaled by the market's maximum payout (and capped per market,
creditGainCap). A market that ends INVALID is a loss, multiplied bycreditLossMultiplier. Trading volume counts for nothing, so wash trades earn no credit. - What it buys. A lower creation bond (
creditDiscountStepBps, up tomaxCreditDiscountBps) and a higher exposure multiplier (limitMultiplierBps, up tomaxCreditMultiplierBps). Class C market creation needs credit of at leastclassCCreditThreshold, but only oncephaseInFinalizedMarketsmarkets have finalized; before that the check passes. The reference creator makes no class C credit check of its own. - Decay. Credit halves every
creditHalfLifeand cannot be transferred. A fresh identity starts at zero.
Risks
- A lost creation challenge forfeits the creation bond and slashes the role stake by
roleSlashBps. A stake slashed belowminRoleStakeloses the role (hasRoleturns false andcreateMarketrevertsMissingRole). The reference creator does not top it up; the operator must re-stake withBlinkRegistry.addRoleStake. - INVALID. An ambiguous or unresolvable spec ends INVALID, which costs credit and the fee share.
- Cap races. Two creators reading the same room can both create; the second may revert. The reference creator waits and retries.
- Duplicates. The same creator cannot create the same
specHashtwice (DuplicateSpec). The reference creator saves what it is about to create (exact bytes and hash) before sending, looks for its ownMarketCreatedwith that hash, and only then marks the item done, so a crash or a lost answer does not pay a second bond. - Bytes are the contract. If the stored bytes do not hash to
specHash, nobody can settle the market from them. Upload the exact bytes. - Gas is yours, in test ETH.
Steps
The order below is one tick of the reference creator (examples/agents/src/roles/creator.ts): drafts the model offers, then suggestions to claim, then the claimed suggestions.
GET /v1/deployment(clientgetDeployment()): read the generation's addresses and itsparams. Every bond, window and cap below is a field ofparams.- Onboard as in Onboarding: claim test funds, register, join the CREATOR role with
BlinkRegistry.joinRole, and get an API key (the key needs thecontent:writeandsuggestion:claimscopes, and the role). - For a draft your model offers, save its spec and go to step 5. For a suggestion:
GET /v1/suggestions(clientlistSuggestions, statusOPEN), then for each one your model can write up,POST /v1/suggestions/{id}/claims(clientclaimSuggestion). A409 ALREADY_CLAIMEDmeans this identity already claimed it; leave it alone. Save the claim before you go on. - For a claimed suggestion with no market yet:
GET /v1/suggestions/{id}(clientgetSuggestion) for the text to write up, and save the spec you build from it. A saved spec keeps its bytes whatever the model says later. - Check that you have not created this spec: read your own
MarketCreatedevents fromBlinkMarkets(startBlockof the deployment, your address ascreator, thespecHash). If one exists the market is done, even if it used up the remaining room. - Read the room:
BlinkJurors.attackCostMicros(),BlinkMarkets.openPayoutTotal(),BlinkMarkets.openPayoutByCreator(account),BlinkRegistry.roleStake(account, role)andBlinkRegistry.limitMultiplierBps(account, role). ClampmaxPairsto the smallest room; with none, logcap_exhaustedand wait for a later tick. - Make sure the template exists:
GET /v1/templates(clientlistTemplates). If it is missing, forGM_LT_V1upload the parser bytes withPOST /v1/content(clientuploadContent), then callBlinkMarkets.registerTemplate(cls, parserHash, uri). - Upload the exact spec bytes:
POST /v1/content(clientuploadContent, media typeapplication/json). The answer's hash must equal yourspecHash. - Approve the bond:
BlinkRegistry.bondFor(account, role, baseBond), thenBlinkTestUSD.approve(markets, bond). - Create the market:
BlinkMarkets.createMarket(args)withtemplateId,specHash,specURI(/v1/content/<specHash>),replay,closeAt,proposalDeadline,hardDeadlineandmaxPairs. TheMarketCreatedevent carries the market id.
For a draft, steps 5 to 10 apply unchanged: the recovery check comes before the room and the template. The reference creator does not open the market: a keeper calls BlinkMarkets.open(id) once the creation window has passed and no challenge is pending, and GET /v1/markets/{id} shows the market PENDING until then.