Docs / Become an AZL Oracle Keeper
Become an AZL Oracle Keeper
Keep the AZL/WETH observation stream fresh on Base. Anyone can record the pool tick; no registration, stake, or privileged role is required.
What you do
Call record() on AzlV4ObservationOracle. The contract reads the current Uniswap V4 pool tick itself, stores a timestamped cumulative observation, and makes the observation available to the downstream TWAP safety checks.
| Property | Value |
|---|---|
| Network | Base mainnet (8453) |
| Observation oracle | 0x724c…7b9B |
| Action | record() — permissionless, no arguments |
| TWAP window | 2 hours |
| Maximum observation gap | 15 minutes |
| Suggested cadence | Every block when practical; always keep gaps below 15 minutes |
Why it matters
The USD oracle uses a delayed AZL/ETH reference and live pool validation gates before it quotes policy amounts. Without sufficiently recent observations, the TWAP source fails closed and value-increasing protocol actions that depend on a valid oracle quote cannot proceed.
Keepers do not submit a price. record() reads the immutable configured V4 pool from Base’s PoolManager, so the caller only pays gas to checkpoint the onchain observation.
Run it
export OBSERVATION_ORACLE=0x724c5cF1Cd1dc331BD5Bb314224ed38c41607b9B export BASE_RPC_URL=https://mainnet.base.org cast send "$OBSERVATION_ORACLE" "record()" \ --rpc-url "$BASE_RPC_URL" \ --private-key "$KEEPER_PRIVATE_KEY"
Use a dedicated keeper wallet with Base ETH for gas. Never put a private key in a browser, repository, or shared shell history.
cast call "$OBSERVATION_ORACLE" "latestObservation()(uint64,int24,int56)" \ --rpc-url "$BASE_RPC_URL" cast call "$OBSERVATION_ORACLE" "observationCount()(uint256)" \ --rpc-url "$BASE_RPC_URL"
Recommended setup: run the observation loop
The repository includes contracts/scripts/record-v2-observations-loop.ts, a resilient keeper loop that records immediately, then retries every 14 minutes. This interval stays under the deployed 15-minute maximum gap; use independent monitoring because one failed checkpoint can still begin a new observation epoch.
cd contracts # contracts/.env — use a dedicated, funded keeper wallet BASE_RPC_URL=https://mainnet.base.org KEEPER_PRIVATE_KEY=0x... npm install npm run deploy:base:v2:record-observations
The loop reads the active contracts/deployments/base-8453.json manifest; it does not depend on a candidate deployment artifact. Stop it cleanly with Ctrl+C or SIGTERM.
Keeper safety and limits
- Permissionless does not mean incentivized: the current contract pays no keeper reward. You pay Base gas voluntarily.
- One observation per block: calling twice in the same block reverts.
- Recover after gaps: a gap longer than 15 minutes starts a new observation epoch. The oracle is not ready again until the new epoch accumulates the full 2-hour window.
- No price authority: a keeper cannot provide a custom tick or directly set AZL/USD. The downstream adapter applies liquidity, spot-versus-TWAP, reference freshness, and deviation validation.
- Reference changes are not a keeper action: staging, activating, or rolling the delayed reference is governance-only. Do not represent
record()as authority to update the reference price.
Automate responsibly
A minimal keeper watches the latest observation timestamp, waits for a new block, and sends record() before the maximum gap. Monitor failed transactions and the oracle’s readiness independently; a successful transaction alone does not guarantee the downstream pricing graph is valid.
Relevant contracts: contract reference · AzlV4ObservationOracle source · TWAP adapter source.