Keepers
The on-chain program enforces the rules, but it can't act on its own. Keepers are permissionless off-chain workers that do the time-sensitive jobs a market needs: keeping fixtures funded and tradeable, and submitting the proof that settles a match once it ends.
One worker, two jobs#
In production a single worker process runs on an interval. Each pass does two things — seed new markets, then settle finished ones — and it exposes a health endpoint for uptime monitoring.
1. Seeding new markets
Fixtures go live throughout the day, and a market is only tradeable once it has been funded on-chain. So seeding runs continuously. On each pass the worker:
- Discovers live and upcoming World Cup fixtures from TxLINE.
- Creates a market for each (
create_market) and seeds liquidity at the real 1X2 odds (fund_market_weighted) so opening prices are realistic rather than a flat 33/33/33. - Skips markets that are already seeded, so it is safe to run repeatedly.
2. Settling finished matches
When a match ends, the keeper resolves it. This is where the trustless design matters — the keeper does the heavy lifting off-chain, but the program has the final say:
- It reads the final score from TxLINE's goal statistics and determines the winning outcome.
- It builds a Merkle-proof-backed
validateStatinstruction — a predicate that is true only if that outcome actually happened. - It calls
settle, which verifies the proof on-chain via a CPI into TxLINE. If it verifies, the market resolves; if not, nothing changes.
How it's configured#
The worker is tuned through environment variables. The most relevant:
Read how the proof is verified on the trustless contract page.