Glassbox

HashKey Chain Horizon Hackathon · AI track

The agent has to earn the right to trade

Glassbox is an AI trading agent that writes every prediction to HSK Chain before the outcome is known. The chain scores it. Until its public record passes a fixed test, the contract refuses to switch live trading on, even for the owner.

RiskGuard 0x9414c8E3aE3cB696A5Eb29D6600289001D9a96D0

How it works, in three steps

The agent cannot quietly drop its bad calls, and nobody can turn it loose before the record is in.

Step 1 commit prediction on-chain, step 2 chain scores it after 24 hours, step 3 live trading unlocks only when the gate passes 01 Commit before the outcome Agent writes its decision hash and its chance of "price up" to RiskGuard. Timestamped, cannot be edited or deleted. 02 Scored on-chain 24 hours later the real HSKSwap pool price settles it. Brier score: 0 is perfect, 0.25 is a coin flip. Late answers score worst. 03 Gate decides live trading setLive(true) reverts unless 10+ predictions are scored, none open, average Brier ≤ 0.20. Three steps: commit, score, gate 01 Commit before the outcome Decision hash + chance of "up" written to RiskGuard. No edits. 02 Scored on-chain Real pool price, 24 hours later. Brier: 0 perfect, 0.25 coin flip. 03 Gate decides live trading 10+ scored, none open, average Brier ≤ 0.20.
  1. Paper trades are priced from the live HSKSwap V3 WHSK/USDT pool on mainnet, not a mock.
  2. Owner and operator are separate keys: the operator runs the agent, only the owner can ask for live mode, and the contract still says no until the gate passes.
  3. If the agent crashes, its trade ledger is checked against a hash stored on-chain before it runs again. A mismatch halts it for a human. A price older than 20 seconds also halts it.

What is different from the look-alikes

Other AI trading entries on HSK Chain either trade first and hope, or keep a record that nothing reads. Glassbox makes the record the key.

QuestionChat + vault agents (Keel, SayTrade)Record-only (HSKHorizon)Glassbox
When can it trade real money?From day one, inside spending capsNot its jobOnly after its on-chain record passes the gate
Is the track record checked?No record before going liveRecorded, never enforcedScored by the contract, enforced by setLive
Do they trade real pools?Yes, live, with no record behind itDoes not tradePaper trades on the live HSKSwap V3 pool until the gate passes
Shows what happens when it breaks?NoNoYes: crash-restart and stale-price halts, on video
Chat?The headline-A side panel; the gate is the product

Live public scorecard

Rebuilt from RiskGuard events on HSK mainnet, then cross-checked against the contract's own counters. Anyone can rerun the recount: npx hardhat run scripts/scorecard.js.

Committed

-

Scored

-

Still open

-

Voided (tiny move)

-

Average Brier (≤ 0.20 needed)

-

Live-trading gate

-

#Chance of upStatusBrierCommit tx
Loading…

Loading the scorecard…

Crash, then restart. The agent is killed mid-run. On restart it checks its ledger against the hash on-chain before doing anything.
Stale price, then halt. The pool quote goes older than 20 seconds. The agent stops instead of trading on old data.

Paper only. Live trading is off.

  • The contract reports live = false, and the gate has not passed yet. You can check both on the explorer.
  • Every trade shown is a paper trade, priced from the real pool, with a 30 bps fee assumed. No funds move.
  • No profit is claimed or promised. A good forecast score is not a promise of returns.

Roadmap

  1. DoneRiskGuard deployed and verified on HSK mainnet; HSKSwap V3 price adapter; crash-safe ledger; stale-price halt; 52 passing tests.
  2. Next weeksCommit a 24-hour call about every 6.6 hours (27 in all) until 10+ predictions are scored, in public, whatever the result. Moves under 0.1% are voided, not scored.
  3. After the gateSmall live trades only, behind the existing hourly cap, with the same scoring kept on.
  4. LaterA gate any agent can plug into, so other HSK agents can earn their leash the same way. Legal review for Korea (EFTA, VAUPA, PIPA) before any real users.

Code

Contracts, agent, tests and the scorecard recount are in one repository.

Repository link: added at submission