Skip to Content
Reports

Reports

A report is a table of figures sent on a schedule to Slack, Telegram or email: volume, fees and new wallets every morning, a group of users’ week every Monday, a risk figure every ten minutes.

What goes in a report

A report holds only what you give it: up to 12 lines, and up to 3 tables and groups of users together.

Lines

Each line is one figure:

  • A metric — Any metric in the workspace.
  • A metric for the report alone — A figure the workspace does not track yet, made with the report. It stays off the Metrics page and is deleted with the report when nothing else uses it.
  • A formula — A value worked out from contract reads, added up over the contracts the report covers. See Formulas.
  • A built-in count — One of these:
LineWhat it counts
TransactionsTransactions that reached the report’s contracts
RevertedThe share of those transactions that reverted
New walletsWallets whose first transaction to the report’s contracts falls in the window
Active walletsWallets that sent a transaction to the report’s contracts
Volume in · Volume outTokens and the chain’s own coin moved into or out of the report’s contracts, in dollars at current prices. Not a protocol’s own trading volume
Alerts openedCondition alerts that opened
An event’s name, such as SwapHow many times the event was emitted

Tables

A report can send the top rows of a table under its lines: the 5 largest swaps of the day, the top 10 wallets by volume this week. Each run reads the table again, sorted, filtered and cut to its top rows, up to 25.

Groups of users

A report can send a group of users’ week: its new users and how many came back (for holders, still hold); which of its largest accounts went quiet or are slowing (for holders, withdrew or are shrinking); and which are new and already large, with up to five accounts each. It covers the last 7 days, so it belongs on a weekly report. To hear about each account as it happens, use Alerts on users.

Windows and the change

Every line prints over the windows you choose: 24h alone, or 24h, 7d and 30d side by side. A window can be any length from a minute.

A report can add the change against the window before, beside the first window. A dash means the figure is unknown; 0 is a measured zero.

Schedule and scope

  • Daily — At an hour in your time zone, 09:00 unless you say.
  • Weekly — On a day of the week, at an hour.
  • Every interval — From every minute to every 7 days.

A report’s lines add up over the whole workspace, a group of contracts or one contract. A built-in line or a formula can take its own scope, so one report can show transactions across the workspace and for the pools alone.

A report can send only when a condition over its lines holds: an hourly risk report can stay silent until {Breached markets} > 0. A run that does not send is kept on the report’s page as Skipped.

In the app

The Reports page in the contract.dev app lists every report. Open one to see its runs, each as it was sent, and to:

  • Run now — Run it outside its schedule.
  • Pause and Resume — A paused report sends nothing. Runs missed while paused are not sent.
  • Destinations — Choose where it sends.
  • Delete — Remove the report and its runs.
RunMeaning
SentEvery destination got it
Partly sentSome destinations got it; the others failed
FailedIt could not be built or sent. The run says why
SkippedIts condition did not hold, so it was not sent
Indexing…A metric or table it reads is still reading its history. It runs once that is done

A report needs no destination: without one it still runs on schedule and keeps its runs on its page. A new report’s first table shows on its page within a minute; the first message goes out at its first scheduled time. To connect Slack, Telegram or email, see Destinations.

Ask your agent

Reports are created and changed by your coding agent, the Slack/Telegram assistant or the CLI. Ask for a daily or weekly report and your agent builds it from your workspace’s brief: the key figures with their change, the largest events as a table, new wallets, a group of users’ week. It names each line before saving, so you can add or strike lines, and asks where and when to send it. See Agent Integration.

Send #analytics a daily report of swap volume, fees and new wallets, with the change on the day before.
Every Monday, send #growth a report on our traders and LPs.
Every hour, send #risk the number of breached markets, but only when there is at least one.

From the CLI

contract-dev report create "Daily" --row metric:"Swap volume" --row metric:"Swap fees" --row newWallets \ --table "Swaps | sort {Amount} | top 5 | days 1" --columns 24h,7d --compare --to "#analytics" contract-dev report create "Weekly users" --users Traders,LPs --day monday --to "#growth" contract-dev report run "Daily"

See report for every flag.

Last updated on