Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

ERC-721 floor sweep watch

Template: erc721-floor-sweep-watch ยท category: monitoring ยท risk: monitor_only

Indexes an ERC-721 collection's Transfer events and pages when a single wallet sweeps many of them in a short window โ€” a floor buy-up, a bulk dump, or a wash-trading burst. It uses a query: trigger over the indexed Transfer table (no external cron/API), edge-triggered so one sweep is one alert.

When to use it

  • get paged when a whale sweeps the floor of a collection you track
  • catch a bulk dump before the floor craters
  • feed a trading or governance workflow off collection flow

Generate it

rflow new --template erc721-floor-sweep-watch
 
# or add the workflow to an existing project
rflow add workflow erc721-floor-sweep-watch

Non-interactive (CI/agents):

rflow new --template erc721-floor-sweep-watch --yes --output ./sweep \
  --answer window="10 minutes" --answer sweep_threshold=5

Inputs

keytypedefault
project_namestringerc721-floor-sweep-watch
network / chain_id / rpc_env / rpc_urlnetwork / chain_id / env_var / stringethereum / 1 / ETH_RPC / a public RPC
collection_name / collection_addresscontract / addresscollection / zero placeholder (replace!)
windowstring (pg interval)10 minutes
sweep_thresholdint5
poll_everyduration1m
channelstringops

collection_name is lowercase and drives the indexed table name (rflow_indexer_rflow_idx_<collection_name>.transfer). Run rflow tables to see the live table and drill into who swept.

Required env vars

DATABASE_URL, the RPC env var (default ETH_RPC), TG_BOT_TOKEN, TG_CHAT_ID โ€” all listed in the generated .env.example.

Safety notes

Monitor-only: no signer: and no relayers:, so the relayer engine never boots. The contract is index-only (no event workflow triggers on it). The query runs read-only, and the workflow ends in on_failure: dead_letter. Give the indexer a moment to backfill the window before the first useful poll.

Run it locally

docker compose up -d     # postgres on localhost:5448
# fill .env, set collection_address
rflow validate
rflow start

Common modifications

  • lower sweep_threshold / tighten window for a hair-trigger
  • filter to mints ("from" = zero) by editing the query's WHERE
  • widen the query to group by "from" to catch bulk dumps by seller