Skip to content

How the loop works ​

Here is the whole thing from the moment the market moves to the moment your vault is back on target. There are three steps and two chains, and the important part is that nobody has to be online for any of it.

  1. 1Base · the poolThe market movesa swap on the Uniswap V2 pair emits Sync
  2. 2Reactive Network · the brainreact() decidesband, pending, cooldown and dust gates, then a callback request
  3. 3Base · the vaultThe vault swapsrebalance() re-reads live reserves, sizes the trade and swaps on the pair
The vault's Holdings event flows back to the brain and clears the pending flag. Nobody runs a server in this loop. Leg times are the client-observed medians of 50 live testnet runs.

1. The market moves ​

Your vault holds two tokens against a real Uniswap V2 pair. Any swap on that pair, by anyone, emits a Sync event with the new reserves. On the testnet demo there is also a permissionless KairosSkewer.skew() that swings the price 8% past its anchor, so you can trigger a move yourself from the live site.

2. The Reactive contract decides ​

KairosReactive lives on the Reactive Network. When it was deployed, it subscribed to the pair's Sync and to the vault's own Holdings, RebalanceSkipped and PolicyUpdated events. Each time the pool moves, react() prices the vault's mirrored holdings at the new reserves and runs the policy. It checks whether the vault is outside its band, whether a request is already pending, whether the cooldown has passed and whether the trade would be too small to matter. Every decision, including "do nothing", is emitted on-chain as PolicyDecision(originTx, code, weightBps), so you can always see why it acted or didn't.

3. The vault swaps ​

When every gate passes, react() calls requestCallbackV_1_0 and the network calls the vault's rebalance() back on Base. The vault doesn't take the Reactive contract's word for anything. It checks that the call came from the callback proxy and that the injected sender is its own Reactive contract, then re-reads the live reserves, works out the trade that lands it on target after its own price impact, caps it, enforces a minimum output and swaps on the pair. Its new Holdings event flows back to the Reactive contract and clears the pending flag.

Who sets the policy ​

Anyone can deposit and withdraw. Deposits mint shares pro rata to the vault's current balances, so there is no price read that someone could game for extra shares, and withdrawals are never paused. The owner sets the target weight and the drift band through setTargetAndBand, within hard bounds of 10–90% and ±0.5–10 percentage points. The vault's PolicyUpdated event is mirrored by react(), so a single transaction on Base re-targets the brain on Reactive.

How fast it is ​

Across 50 live testnet loops, all 50 completed as real rebalances. Measured on-chain from the market move to the vault's swap, the median was 1,400 ms and the 95th percentile was 1,800 ms (Base Sepolia blocks are exactly 200 ms apart). Seen from a script polling public RPCs every 50 ms, the full loop took 1,775 ms at the median. Every hash of every run is in docs/data/bench-runs.csv.

Kairos vs a keeper bot ​

We ran the same market moves against two identical vaults on the same pair, one rebalanced by Kairos and one by a polling keeper bot. Honestly, a keeper on the same machine, polling every 200 ms, is faster: 400 ms on-chain at the median against Kairos's 1,400 ms. Real keepers poll slower and sometimes stop, and that is where Kairos earns its place.

Keeper setup (3 Dec 2026 batches)RunsKairos rebalancedKeeper rebalancedKeeper on-chain p50
Polling every 200 ms (18 Nov)505050400 ms
Polling every 1 s202020400 ms
Polling every 12 s2020205,600 ms
Keeper offline550never

With the keeper stopped, Kairos rebalanced its vault after all 5 market moves, while the keeper's vault sat at 5,389 bps against a 5,000 ± 150 target until the keeper was restarted. The case for Kairos is not that it beats a well-run keeper by milliseconds. It's that there is no keeper to run, fund or forget about.

Every number on these pages comes from the kairos repo and links to its receipt.