What an order costs
Hedera charges a fixed fee to schedule a contract call: about $0.12 (ScheduleCreate with a ContractCall, $0.0099 + $0.09, plus the 20% system-contract surcharge). That is 89% of a check, whatever the gas limit or delay. So the vault saves money the only way it can, by running fewer sweeps: each one waits about as long as the price needs to reach the nearest trigger.
| Market | Checks at most every | at least every | assumed fastest move |
|---|---|---|---|
| HBAR / USDC | 5 min | 6 h | 2.5% an hour |
| DAI / USDC | 5 min | 6 h | 0.25% an hour |
| Cost, read from the vault (testnet rate, 1 HBAR = 7.7 ¢) | HBAR |
|---|---|
| One check, the only order in its market | 1.8977 |
| One check shared by 2 / 5 / 20 orders | 0.9849 / 0.4372 / 0.1634 |
| Reserve every order keeps for its fill and last check (HBAR sell / token sell) | 0.8768 / 1.2371 |
| Minimum budget | 12.2633 / 12.6236 |
A market with a single order costs 7.6 to 22.8 HBAR a day depending on how far the trigger is, instead of 546 HBAR a day when it checked every 5 minutes. The Trade page sizes the budget to cover the order until it expires and shows the price of each expiry. Orders in the same market split the fixed part. Unused budget is refunded. The full model, with the measured gas per segment, is in docs/ARCHITECTURE.md.
The trade-off: a price that moves faster than the assumed rate is noticed late. The fill is still priced from Chainlink at the moment it happens and still guarded, and anyone can call executeOrder(id) or sweep(market, 0) to check sooner at their own gas cost.
From README.md at v1.1 (6ddd9a3) · View source
The guard & oracle
A fill needs both Chainlink feeds to be fresh (maxOracleAge) and the pool's TWAP over twapWindow to sit within maxDeviationBps of the Chainlink price.
When checks stop
If a market has funded orders but no check is scheduled, the Trade page and the order page show Checks stopped with a Restart checks button, and…