Forecasters
Jobs & rounds
How forecast jobs are created and gated, which markets they may trade, what a round carries on-chain, and how a vault's engine reads it.
On this page
A forecast job is a stream of rounds that one vault trades. A round is an on-chain attestation in HyperSignalBook: a sealed commitment to the round's forecasts (forecastsRoot) plus sparse target weights, in basis points, for the markets the job covers. Individual forecasts and forecaster identities never go on-chain.
Two kinds of job#
| Verified job (Mode 1) | Manager job (Mode 2) | |
|---|---|---|
| Created by | The council | The vault's live manager, or the council |
| Rounds posted by | The protocol poster (or the council) | The manager, its custom scorer, or the council |
| Scored and paid by | The protocol scorer | The manager or its custom scorer |
| Pots | USDC; DGV too at token launch | USDC only |
| Slashing | Protocol scorer and council | Manager can only propose; the protocol executes |
| Paid days counted | Yes (paidDaysCount) | No |
Job 1 is the Flagship job. It exists from deployment, has no vault, and runs a 24-hour horizon on a 4-hour cadence. Every other job is bound to one vault. A vault's manager is resolved live: the vault's strategyManager(), else its admin(). If a vault changes manager, a custom scorer set by the previous manager stops counting.
Create a job#
function createJob(
address vault,
bool verified,
address customScorer,
uint32 horizonSecs,
uint32 cadenceSecs,
string calldata specUri,
JobEntryFilter calldata filter
) external returns (uint64 jobId);
struct JobEntryFilter {
uint128 minBondUsdc; // raises the global minimum; 0 = global only
uint16 maxRecentSlashBps; // 0 = no limit
uint32 minPaidDays; // paid days on verified jobs
uint32 minBondAgeSecs; // since the bond first met the global minimum
bool whitelistOnly; // only addresses set with setJobWhitelist
}| Parameter | Rule |
|---|---|
vault | Non-zero; a factory vault or one the council allowed |
verified | true only from the council; verified jobs ignore customScorer |
horizonSecs | 1 hour to 7 days; fixed for the job's life |
cadenceSecs | At most 7 days; fixed for the job's life |
specUri | Non-empty. The job's own description of what to predict and how it scores |
filter.maxRecentSlashBps | At most 10,000 |
Job ids start at 2 and count up (nextJobId() returns the last one created). Reverts: ZeroAddress, Unauthorized (caller is not the council or the vault's manager, or a non-council caller sets verified), VaultNotAuthorized(vault), InvalidPolicy.
The owner can later call updateJob(jobId, customScorer, specUri, filter, active) to change the scorer (manager jobs only), the spec, the filter or the active flag, and setJobWhitelist(jobId, forecasters, allowed) to manage a private list. Horizon, cadence, vault and verified never change.
A vault trades a job through the forecastJobId in its fee config: job 1 or a job bound to that vault. With forecastJobId == 0 the engine reads job 1. Vault fees covers the forecast share that funds the job's pot.
Markets#
The council lists the markets that rounds may target, up to 256. Each market has a sleeve (0 core perp, 1 HIP-3 perp on trade.xyz), a curated weight cap, its size decimals, and a pause flag. A round can only target listed, unpaused markets.
Asset ids follow HyperCore: a core perp uses its index in the perp universe, and a HIP-3 perp uses 100000 + dex × 10000 + index.
const abi = parseAbi([
"function marketCount() view returns (uint256)",
"function marketIds(uint256 index) view returns (uint32)",
"function markets(uint32 assetId) view returns (bool listed, bool paused, uint8 sleeve, uint16 maxWeightBps, uint8 szDecimals)",
]);
const n = await pub.readContract({ address: SIGNAL_BOOK, abi, functionName: "marketCount" });
for (let i = 0n; i < n; i++) {
const id = await pub.readContract({ address: SIGNAL_BOOK, abi, functionName: "marketIds", args: [i] });
const [listed, paused, sleeve, maxWeightBps] = await pub.readContract({
address: SIGNAL_BOOK, abi, functionName: "markets", args: [id],
});
console.log(id, { listed, paused, sleeve, maxWeightBps });
}curl -s https://api.degenhive.ai/v1/vaults/markets | jq # asset universe and perp dexesWhat a round carries#
function postJobRound(
uint64 jobId,
uint32 horizonSecs,
uint64 ttlSecs,
uint16 regimeStormBps,
uint32 forecasterCount,
bytes32 forecastsRoot,
uint32[] calldata assetIds,
int16[] calldata targetWeightsBps
) external returns (uint64 roundId);| Field | Meaning | Bound |
|---|---|---|
horizonSecs | How far ahead this round predicts | 1 hour to 7 days |
ttlSecs | How long the targets stay fresh; expiresAt = postedAt + ttlSecs | Above 0, at most 7 days |
regimeStormBps | A market-stress reading attached to the round | At most 10,000 |
forecasterCount | How many forecasts went into the round | Attested, not checked |
forecastsRoot | Commitment to every forecast in the round | Non-zero |
assetIds, targetWeightsBps | Sparse target weights, signed, in bps of the vault | Listed, unpaused, no duplicates, no zero weight |
Verified jobs are posted by the protocol poster or the council; manager jobs by the manager, its live custom scorer or the council. Reverts: JobNotFound, JobNotActive, Unauthorized, InvalidPolicy, LengthMismatch, MarketNotListed, MarketPaused, DuplicateMarket, ZeroAmount (a zero weight). Each round emits JobRoundPosted with every field.
The contract keeps only the latest round's metadata (jobLatestRound) and every round's weights (jobRoundTargetBps(jobId, roundId, assetId)). roundId counts up per job from 1. Nothing on-chain enforces the cadence, and a round's horizon need not equal the job's.
How engines read a round#
A vault's engine steps each market toward the latest round of its job, while that round is fresh:
- Read
jobLatestRound(job). Ifblock.timestamp > expiresAt, the target is 0 and the engine steps the market to flat. - Otherwise read
jobRoundTargetBps(job, roundId, assetId). Markets the round omits have target 0. - Clamp the target to the vault tier's cap for that market; Flagship vaults also apply the market's
maxWeightBps.
jobTargetWeightOf(jobId, assetId) returns the same live answer in one call, as (weightBps, regimeStormBps, fresh). Use it to see what a vault is trading toward. The engine does not read regimeStormBps.
The UTC grid#
Pay runs on UTC days: HyperCrowdPay.today() is block.timestamp / 86400, and each job has one pot per day. The protocol poster runs verified jobs on a UTC grid: with cadence c, slot k opens at k × c seconds after the Unix epoch, so the Flagship's 4-hour cadence posts at 00:00, 04:00, 08:00 and so on, UTC. The grid is a poster convention. On-chain, roundId is a per-job counter, not the slot number.
Use the decoder to find the current slot and its start time for a cadence, and to convert a percentage weight into bps.
- horizonSecs
14,400- Slot = floor(now / horizonSecs)
...- Slot opened
...- Slot closes in
...- CrowdPay pot day = floor(now / 86400)
...
On chain, roundId counts up per job. The slot is the UTC grid a poster aligns rounds to. The cap is the vault tier cap, and for the Flagship also the market's maxWeightBps.
postJobRound(
jobId,
14400, // horizonSecs
14400, // ttlSecs, 1..604800
0, // regimeStormBps
forecasterCount,
FORECASTS_ROOT,
[ASSET_ID],
[450] // int16 targetWeightsBps
)Forecasts for a slot must be in before it opens. A forecast posted publicly before its round starts can be copied, which costs you originality in scoring.
