Keeper · Hedera Schedule Service
Pull the plug. Hedera keeps the books.
Every 30 minutes Hedera calls this market by itself, from a schedule the previous run booked (HIP-1215). It charges funding, sweeps for underwater positions and books the next run. No one signs these transactions.
Reading the keeper on Hedera…
Reading the keeper on Hedera…
- Was booked for
- —
- Checks run
- …every …
- Last check
- …
- Booked schedule
- …Schedule Service
- Market contract
- …PerpMarket
- Can pay next run
- …
Fee reserve
The contract pays for its own scheduled runs from an HBAR balance. Before a run starts, Hedera must be able to charge its full gas limit; afterwards it keeps only what the run used.
- Held up front per run
- …
- Gas price
- …set at deploy, then recorded by every network run
- Refuels itself
- …pool USDC → HBAR on SaucerSwap
On testnet the refuel fails closed: SaucerSwap's testnet HBAR/USDC pool is far from the real price, so the swap would fill outside the oracle band and the contract refuses it. The reserve is topped up with fund() instead. Where SaucerSwap tracks the market price, the same swap goes through.
Keep it running
Anyone can do both. Neither gives you control of the market: the network still runs every check.
Revive the chain
If a booked check doesn't run, nothing books the one after it. revive() books a new check one interval from now. It opens once the chain is two intervals late.
Reading the keeper…
Prices the keeper trusts
Each check asks PriceGuard first. Chainlink is the price, Supra is the independent check, and the keeper only liquidates when both are fresh and close. Read live from PriceGuard on chain.
Chainlink
HBAR / USDSupra
HBAR / USDTPriceGuard
Reading…Reading PriceGuard on Hedera…
What the network did
Read from the Hedera mirror node, newest first. Rows marked with a teal dot were executed by the Schedule Service from a booking: no person or server signed them, and the contract paid the fee.
Audit log on HCS
Topic 0.0.10839050Every keeper event is also written to a Hedera Consensus Service topic, ordered and timestamped by the network. The keeper never depends on it: anyone can rebuild it from the mirror node with yarn custos:hcs-log:testnet, which only adds events the topic doesn't have yet.
Reading the topic from the mirror node…