HIP-4 deployer actions
Testnet-only
Overview
To ensure markets are high quality and well-defined, validators vote on outcome templates, which HIP-4 deployers use as the basis for permissionless deployments. Templates fix the structure of the specification's display text, side names, and the set of typed keywords.
Deploying has no gas cost. Capacity is instead bounded by per-deployer limits (see Limits).
Action format
The following actions are involved in deployment:
{ "type": "activateOutcomeDeployer", "activate": { "venueName": <venue> } }
{ "type": "activateOutcomeDeployer", "deactivate": null }
{ "type": "spotDeploy", "outcome": { "<variant>": { ...variant fields... } } }Outcomes and questions are referenced by the numeric index assigned at creation, e.g.
"outcome": 7.Venue name: 2–4 lowercase ASCII letters, subject to the same rules as HIP-3 perp DEX names. The name must be unique across the venue names of all deployers — including deactivated ones, whose names stay reserved — and must not match an existing perp DEX name (nor
spot). Conversely, a registered venue name cannot be claimed by a later perp DEX deployment.As with HIP-3, all lists of tuples should be lexographically sorted before signing
keywordToValueis a sorted list of tuples mapping each template keyword to its value. For example,[["expiry","20260801-0600"],["target","100"],["underlying","ABC"]].Name-and-description values are two-element arrays:
["<name>", "<description>"].sideNamesarrays are["<YES side name>", "<NO side name>"].Amounts and settlement fractions are decimal strings (
"1","0.25").
Activation
Staking requirement: active deployers must maintain the staking requirement for as long as it remains an outcome deployer. Requirements stack with the deployer's other staking requirements. For example, stake that counts towards HIP-3 deployment does not double-count towards outcome deployment.
Deployers must use Standard account abstraction.
Deactivate with "isDeactivate": true. Deactivation requires that the minimum deployer staking duration (183 days, restarted on re-activation) has elapsed and that the deployer has no active outcomes.
Templates
Every deployer-created market comes from a template. A template has one of three roles:
Standalone outcome: deploys a single YES/NO market; the template fixes the side names.
Question: deploys a question (the container).
Question outcome: deploys one named outcome of a question; each question-outcome template declares its parent question template, and instantiations are only accepted under that parent.
A template fixes display name and description text containing {keyword} placeholders (e.g., "{underlying} above {target} at {expiry}") together with a typed hint per keyword. An instantiation supplies exactly one value per keyword.
Keyword value formats by hint type:
dateTime
%Y%m%d-%H%M, e.g. "20260712-1830"; must be within the next year
date
YYYYMMDD, e.g. "20260712" (end of day); must be within the next year
string
free text
hlPerp
coin name of an existing perp, e.g. "ABC" or "test:ABC"
uInt
nonnegative integer that fits in a u64, e.g. "250" (no sign or leading zeros)
uDecimal
nonnegative decimal, e.g. "0.5" or "250" (no sign, exponent, or leading/trailing zeros)
Values are at most 100 characters and cannot contain {, }, or | (: is allowed, e.g. for HIP-3 coin names).
The onchain outcome descriptions are derived from the instantiation:
Name:
template:<template_id>, e.g.template:aaa. Thetemplate:prefix is reserved. Only template deployments can produce it.Description: the keyword-value pairs sorted by keyword and joined as
keyword:value|keyword:value, e.g.expiry:20260801-0600|target:100|underlying:BTC.Side names: for standalone outcomes,
template:plus the template's side names (e.g.template:Over/template:Under); question named outcomes use the defaultsYes/No.Question fallback: named
template fallbackwith descriptionotherand side namesYes/No.
Action reference
The outcome family of spotDeploy has four deployer variants.
registerStandaloneOutcomeFromTemplate
Deploys a standalone YES/NO market from a standalone outcome template.
registerQuestionFromTemplate
Deploys a question and its named outcomes in one action.
Each named outcome template must declare the question template as its parent. The same named outcome template may be instantiated multiple times with different values.
A question with N named outcomes registers N + 1 outcomes (the fallback is created automatically). All count toward the deployer's active-outcome cap.
The named outcome set is fixed at creation. A future upgrade will support adding outcomes to a live question. Bounded to at most 100 named outcomes per question.
settleOutcome
Settles one outcome of the deployer.
nameAndDescriptionandsideNamesmust exactly match the outcome being settled.settleFractionis a decimal in[0, 1]. Standalone outcomes may settle to any fraction (e.g."0.66"for scalar payouts); outcomes that belong to a question must settle to exactly"0"or"1".detailsmust be empty.For question outcomes, settlement is sequential: named outcomes may settle to
"0"in any order. A single outcome settles to"1"after it is the last active named outcome, which automatically settles the fallback to 0 and settles the question.
settleQuestion2
Settles all remaining named outcomes of a question in one action. Note: The original settleQuestion variant is discontinued.
outcomeSettlementsmust cover exactly the question's remaining active named outcomes, with exactly one settling to"1"and all others to"0". The fallback settles to 0 automatically.
Read API
{"type": "outcomeMeta"}info request includes non-null outcome deployers.{"type": "outcomeTemplates"}info request returns all templates.
Limits
At most
Nactive outcomes per deployer (N=10 on testnet). Settling outcomes frees capacity.A deployer can deploy
Moutcomes per day (M=50 on testnet).
Last updated