Cookbook
Copyable recipes for real onchain jobs. Each page says what it does, when to use it, the YAML, the env vars/secrets it needs, a risk label, and safety notes — and links to a runnable template or example where one exists.
Most recipes are backed by a bundled template: scaffold a whole project
with rflow new --template <id> or drop the workflow into an existing project
with rflow add workflow <id> (see the templates guide). Three
recipes have no template — they inline a complete, validated rflow.yaml
you copy directly:
hot wallet refill,
stablecoin pause / blacklist monitor and
cross-chain settlement saga.
Risk labels
Every recipe carries one, so you know what it can do before you run it:
| Label | Meaning |
|---|---|
monitor_only | Reads and notifies. No signer:, no relayers: — the relayer engine never boots and it cannot move funds. |
prepares_tx | Validates/decides/dedupes and prepares a transaction, but never signs or sends. |
money_moving | Signs and broadcasts transactions. Every one shows simulation, gas caps, a recheck and an approval or budget — no exceptions. |
Use-case matrix
Find the closest recipe fast: match your job → risk → trigger → the recipe.
| Use case | Risk | Trigger | Scaffold / runnable |
|---|---|---|---|
| Large transfer alert | monitor_only | event | rflow new --template large-transfer-alert |
| Large approval alert | monitor_only | event | rflow new --template community/large-approval-alert (community) |
| Chainlink oracle staleness | monitor_only | read (poll) | rflow new --template chainlink-oracle-staleness |
| Workflow error pager | monitor_only | workflow_error | rflow new --template workflow-error-pager |
| Relayer low-balance alert | monitor_only | read (poll) | rflow new --template relayer-low-balance-alert |
| Bridge message watch | monitor_only | event | rflow new --template bridge-message-watch |
| Price alert stream | monitor_only | stream (WS) | rflow new --template price-alert-stream |
| Security advisory watch | monitor_only | web (HTTP poll) | rflow new --template security-advisory-watch |
| Chainlink deviation alert | monitor_only | cron | rflow new --template chainlink-deviation-alert |
| ERC-4626 vault monitor | monitor_only | event + read | rflow new --template erc4626-vault-monitor |
| Uniswap v3 LP monitor | monitor_only | event + read | rflow new --template uniswap-v3-lp-monitor |
| ERC-721 floor sweep watch | monitor_only | query (poll) | rflow new --template erc721-floor-sweep-watch |
| Solver PnL report | monitor_only | cron | rflow new --template solver-pnl-report |
| Uniswap v2 price alert | monitor_only | event | rflow new --template community/uniswap-v2-price-alert (community) |
| ERC-20 supply watch | monitor_only | event | rflow new --template community/erc20-supply-watch (community) |
| WETH wrap monitor | monitor_only | event | rflow new --template community/weth-wrap-monitor (community) |
| Safe multisig monitor | monitor_only | event | rflow new --template safe-monitor |
| Safe owner change alert | monitor_only | event | rflow new --template safe-owner-change-alert |
| Proxy upgrade alert | monitor_only | event | rflow new --template proxy-upgrade-alert |
| Timelock monitor | monitor_only | event | rflow new --template timelock-monitor |
| Stablecoin pause / blacklist monitor | monitor_only | event + read | copy recipe (no template) |
| Cron HTTP report | monitor_only | cron | rflow new --template cron-http-report |
| Native spend report | monitor_only | cron | rflow new --template native-spend-report |
| Command decision | monitor_only | cron | rflow new --template command-decision · example |
| Webhook idempotent handler | prepares_tx | webhook | rflow new --template webhook-idempotent-handler |
| Treasury sweep with approval | money_moving | cron | rflow new --template treasury-sweep-approval · example |
| Hot wallet refill | money_moving | read (poll) | copy recipe (no template) |
| Token deposit relay | money_moving | event | rflow new --template token-deposit-relay · example |
| Liquidation keeper | money_moving | read (poll) | rflow new --template liquidation-keeper · example |
| Aave v3 health guardian | money_moving | read (poll) | rflow new --template aave-health-guardian |
| Solver inventory rebalance | money_moving | read (poll) | rflow new --template solver-inventory-rebalance |
| ERC-7683 intent solver | money_moving | event | rflow new --template erc7683-solver · example |
| Cross-chain settlement saga | money_moving | event + wait_for | copy recipe (no template) |
| Command trade prep | money_moving | event | rflow new --template command-trade-prep · example |
By category
Security & governance
- Safe multisig monitor —
safe-monitor·monitor_only - Proxy upgrade alert —
proxy-upgrade-alert·monitor_only - Timelock monitor —
timelock-monitor·monitor_only - Stablecoin pause / blacklist monitor — recipe ·
monitor_only - Safe owner change alert —
safe-owner-change-alert·monitor_only - Security advisory watch —
security-advisory-watch·monitor_only - Large approval alert —
community/large-approval-alert·monitor_only· community
Monitoring & alerting
- Large transfer alert —
large-transfer-alert·monitor_only - Chainlink oracle staleness —
chainlink-oracle-staleness·monitor_only - Chainlink deviation alert —
chainlink-deviation-alert·monitor_only - Workflow error pager —
workflow-error-pager·monitor_only - Relayer low balance alert —
relayer-low-balance-alert·monitor_only - Bridge message watch —
bridge-message-watch·monitor_only - Price alert stream —
price-alert-stream·monitor_only - ERC-4626 vault monitor —
erc4626-vault-monitor·monitor_only - Uniswap v3 LP monitor —
uniswap-v3-lp-monitor·monitor_only - ERC-721 floor sweep watch —
erc721-floor-sweep-watch·monitor_only - Uniswap v2 price alert —
community/uniswap-v2-price-alert·monitor_only· community - ERC-20 supply watch —
community/erc20-supply-watch·monitor_only· community - WETH wrap monitor —
community/weth-wrap-monitor·monitor_only· community
Treasury
- Treasury sweep with approval —
treasury-sweep-approval·money_moving - Hot wallet refill — recipe ·
money_moving - Native spend report —
native-spend-report·monitor_only
Relaying, keepers & intents
- Token deposit relay —
token-deposit-relay·money_moving - Liquidation keeper —
liquidation-keeper·money_moving - Aave v3 health guardian —
aave-health-guardian·money_moving - ERC-7683 intent solver —
erc7683-solver·money_moving - Solver inventory rebalance —
solver-inventory-rebalance·money_moving - Solver PnL report —
solver-pnl-report·monitor_only - Cross-chain settlement saga — recipe ·
money_moving - Command trade prep —
command-trade-prep·money_moving
Off-chain & custom logic
- Cron HTTP report —
cron-http-report·monitor_only - Webhook idempotent handler —
webhook-idempotent-handler·prepares_tx - Command decision —
command-decision·monitor_only
Every full recipe validates
The cookbook's full configs are not decoration — they are checked in CI.
documentation/scripts/check-recipes.mjs extracts every complete rflow.yaml
from these pages and runs the real rflow validate over each in a throwaway
project (ABIs stubbed, env vars stubbed). Yaml blocks are classified by a
first-line marker:
# recipe: full— a completerflow.yaml; the validator asserts it passes.# recipe: partial— a fragment (one trigger/step/section) shown for teaching; skipped.
An unmarked yaml block in a cookbook page fails the check, so nothing escapes
classification. Run it locally with node scripts/check-recipes.mjs from
documentation/ (it builds rflow if needed).