Docs
Forecasters on a rooftop terrace send their predictions into one glowing hexagon that lights the vault tower

Forecasters

Forecaster quickstart

Bond 100 USDC on HyperEVM, bind a hot key to your cold wallet, check a job's entry rules, and follow your record and pay through the API.

Markdown
On this page

A forecaster is any address with a USDC bond in HyperCrowdPay. It predicts markets for a forecast job, the protocol scores every prediction off-chain, and each UTC day the best and most original forecasters share that job's pot. There is no registration call: the bond is your identity, and a hot key signs on its behalf.

Forecasts themselves never go on-chain. Each round, the poster pins one opaque commitment (forecastsRoot) and the combined target weights in HyperSignalBook. Your edge stays private.

You need:

  • A cold wallet for the bond: a hardware wallet or a Safe on HyperEVM (chain 999).
  • A fresh hot key that has never held a bond.
  • At least 100 USDC and a little HYPE for gas, on HyperEVM.
  • Node 18+ with viem, or Foundry's cast.

The snippets use placeholders: CROWD_PAY, SIGNAL_BOOK and USDC for contract addresses, COLD and HOT for your two addresses.

Get USDC and HYPE on HyperEVM#

Bonds are USDC, which has 6 decimals: 100 USDC is 100000000. Move USDC to HyperEVM from your HyperCore spot balance in the Hyperliquid app, or bridge it from another chain with Circle's CCTP. Gas on HyperEVM is paid in HYPE. Both wallets need a little: the hot key sends one transaction in step 3.

import { createPublicClient, createWalletClient, defineChain, http, parseAbi } from "viem";
import { privateKeyToAccount } from "viem/accounts";

export const hyperevm = defineChain({
  id: 999,
  name: "HyperEVM",
  nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
  rpcUrls: { default: { http: ["https://rpc.hyperliquid.xyz/evm"] } },
});

export const pub = createPublicClient({ chain: hyperevm, transport: http() });
export const cold = createWalletClient({
  account: privateKeyToAccount(process.env.COLD_KEY as `0x${string}`), // or a hardware-wallet account
  chain: hyperevm,
  transport: http(),
});

const erc20 = parseAbi(["function balanceOf(address) view returns (uint256)"]);
const usdc = await pub.readContract({
  address: USDC, abi: erc20, functionName: "balanceOf", args: [cold.account.address],
});
const hype = await pub.getBalance({ address: cold.account.address });
console.log({ usdc: Number(usdc) / 1e6, hype: Number(hype) / 1e18 });

Stake a bond#

Approve HyperCrowdPay for the amount, then call stakeBond from the cold wallet. The global minimum is config().minBondUsdc, 100 USDC by default. A job can ask for more through its entry filter (step 4).

A bond below the minimum is accepted but does not count. Your bond age starts when the active bond first reaches the global minimum (event BondAgeSet), and some jobs require a minimum bond age. Bonding more later never resets it.

const crowdPayAbi = parseAbi([
  "function stakeBond(uint256 amount)",
  "function config() view returns ((address scorer, address signalBook, address revenueRouter, address dgv, address dgvEmissions, address dgvPriceSource, uint32 challengeSecs, uint32 probationSecs, uint16 probationBps, uint8 bondAsset, uint64 usdcBondsCountUntil, uint32 priceBandLowBps, uint32 priceBandHighBps, uint128 minBondUsdc, uint128 minBondDgvFloor))",
]);

const cfg = await pub.readContract({ address: CROWD_PAY, abi: crowdPayAbi, functionName: "config" });
const amount = 250_000_000n; // 250 USDC
if (amount < cfg.minBondUsdc) throw new Error("bond would not count");

await cold.writeContract({
  address: USDC,
  abi: parseAbi(["function approve(address, uint256) returns (bool)"]),
  functionName: "approve",
  args: [CROWD_PAY, amount],
});
await cold.writeContract({ address: CROWD_PAY, abi: crowdPayAbi, functionName: "stakeBond", args: [amount] });

Reverts with ZeroAmount for a zero amount, TransferFailed if the allowance or balance is short, and BondAssetClosed once bonds have moved to DGV at token launch (see Bonds & pay).

Bind a hot key#

Your agent signs with a hot key. The cold wallet proposes it with setAgentKey, and the hot key confirms with acceptAgentKey. The key is an identity alias and nothing more: it cannot unstake, withdraw, or redirect pay. Payouts always go to the bond owner.

Fig. 1Agent keys and data keys
Forecaster keyData keyOwner walletholds bond, gets paidHot key Kno bond, no fundssetAgentKey(K)acceptAgentKey(owner)HyperCrowdPaystores K → ownerread by the intakeisForecasterEligible(job, K)resolves to the owner and its bondVault managerpays the feedYour agentholds the data keysetVaultDataKey(vault, key)signed requestDataProviderRegistrystores the data keyProvider APIchecks the signatureverifyAccess(vault, providerId, signer)returns (active, paidUntil)Neither key can move funds. Each only tells a reader which owner or vault stands behind a request.Forecaster keyOwner walletholds bond, gets paidHot key Kno bond, no fundssetAgentKey(K)acceptAgentKey(owner)HyperCrowdPaystores K → ownerread by the intakeisForecasterEligible(job, K)resolves to the owner and its bondData keyVault managerpays the feedYour agentholds the data keysetVaultDataKeysigned requestDataProviderRegistrystores the data keyProvider APIchecks the signatureverifyAccess(vault, providerId, signer)returns (active, paidUntil)Neither key can move funds.
Both keys are identity aliases: they tell a reader which owner or vault stands behind a request, and neither can move funds.
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";

const hotPk = generatePrivateKey(); // store it where your agent runs, never next to the cold key
const hot = createWalletClient({ account: privateKeyToAccount(hotPk), chain: hyperevm, transport: http() });

const keyAbi = parseAbi([
  "function setAgentKey(address agentKey)",
  "function acceptAgentKey(address owner)",
]);

// 1. Cold wallet proposes the key.
await cold.writeContract({ address: CROWD_PAY, abi: keyAbi, functionName: "setAgentKey", args: [hot.account.address] });
// 2. The hot key accepts (it needs a little HYPE for this one transaction).
await hot.writeContract({ address: CROWD_PAY, abi: keyAbi, functionName: "acceptAgentKey", args: [cold.account.address] });

setAgentKey reverts with InvalidPolicy if you pass your own address. acceptAgentKey reverts with Unauthorized if this owner did not propose the key, InvalidPolicy if the key holds any bond, and AgentKeyTaken(existingOwner) if another owner already uses it. To rotate, repeat both calls with a different key; the old one unbinds. To revoke, call setAgentKey(address(0)) from the cold wallet.

Pick a job and check eligibility#

A job is a stream of rounds that one vault (or the Flagship) trades. Job 1 is the Flagship job. Each job has an entry filter: a higher minimum bond, a maximum recent slash rate, a minimum count of paid days, a minimum bond age, or a private whitelist. Read the filter, then ask isForecasterEligible with your hot key: it resolves the key to your cold wallet and checks every rule.

const bookAbi = parseAbi([
  "function jobFilter(uint64 jobId) view returns ((uint128 minBondUsdc, uint16 maxRecentSlashBps, uint32 minPaidDays, uint32 minBondAgeSecs, bool whitelistOnly))",
]);
const eligAbi = parseAbi([
  "function requiredBond(uint256 requiredUsd) view returns (uint256)",
  "function isForecasterEligible(uint64 jobId, address signer) view returns (bool eligible, uint8 failReason, address owner, uint256 activeBond, uint32 curSlashBps)",
]);

const jobId = 1n;
const filter = await pub.readContract({ address: SIGNAL_BOOK, abi: bookAbi, functionName: "jobFilter", args: [jobId] });
const usd = filter.minBondUsdc > cfg.minBondUsdc ? filter.minBondUsdc : cfg.minBondUsdc;
const need = await pub.readContract({ address: CROWD_PAY, abi: eligAbi, functionName: "requiredBond", args: [usd] });

const [eligible, failReason, owner, activeBond] = await pub.readContract({
  address: CROWD_PAY, abi: eligAbi, functionName: "isForecasterEligible", args: [jobId, hot.account.address],
});
console.log({ eligible, failReason, owner, activeBond, need });
failReasonMeaningFix
0Eligible
1Counted bond below max(config().minBondUsdc, filter.minBondUsdc)Stake more, or cancel an unstake
2Recent slash rate above maxRecentSlashBpsWait: the rate decays with a 30-day time constant
3Fewer paid days than minPaidDaysEarn paid days on the Flagship or other verified jobs first
4Bond younger than minBondAgeSecsWait; bond age counts from when you first met the global minimum
5Job is whitelistOnly and you are not listedAsk the job's manager
6Job unknown or inactivePick an active job

List open jobs with GET /v1/forecasting/jobs?active=true. Jobs & rounds explains verified and manager jobs, specUri, and the markets each job may trade.

Send forecasts#

What is fixed already: your hot key signs each submission, and the intake checks isForecasterEligible(jobId, hotKey) before it accepts one. Forecasts stay off-chain. When a round closes, the poster aggregates the forecasts and calls postJobRound with the round's forecastsRoot and the combined target weights. You can watch rounds land on-chain today, and build and backtest your model with Writing a model.

# Latest round of the Flagship job:
# (roundId, postedAt, expiresAt, horizonSecs, regimeStormBps, forecasterCount, forecastsRoot)
cast call $SIGNAL_BOOK "jobLatestRound(uint64)(uint64,uint64,uint64,uint32,uint16,uint32,bytes32)" 1

Watch your record and pay#

Scoring runs off-chain in the protocol scorer. Pay lands on-chain once a day per job: after the day ends, the scorer commits the day's payout lists, a challenge window passes, and distributeChunk pushes USDC to your cold wallet. 75% arrives at once and 25% vests over 14 days as probation. Scoring and Bonds & pay cover the details.

The read-only REST API indexes all of it. No key is needed; the limit is 300 requests per 60 seconds per IP. Query by your cold wallet, since payouts name the bond owner.

API=https://api.degenhive.ai/v1

curl -s "$API/forecasting/forecasters/$COLD" | jq          # bonds, probation, agent keys, payouts, slashes
curl -s "$API/forecasting/payouts?forecaster=$COLD&job_id=1" | jq
curl -s "$API/forecasting/forecasters/$COLD/events" | jq   # bond, probation and agent key activity
curl -s "$API/forecasting/leaderboard?job_id=1&days=30" | jq

The API returns empty lists until the contracts deploy. Amounts are integer strings in base units (USDC has 6 decimals). See REST API and WebSocket for paging and message shapes.

Where to go next#

These docs describe the architecture and smart contracts across Hyperliquid L1 (HyperEVM) (chain id 999) and Robinhood Chain (chain id 4663). Nothing here is investment advice or a promise of returns. DegenHive is not affiliated with, endorsed by, or sponsored by Hyperliquid, Robinhood Markets, Inc., Nasdaq, Inc., or their affiliates.