Skip to Content
Notifications

Notifications

Keep your team informed about your protocol with reports and alerts delivered to Slack, Telegram or email.

Types of notification

TypeWhat it doesExample
ReportSends a table of figures on a schedule.Daily trading volume, fees and active wallets.
Activity alertSends a message each time something happens.A swap over $100k.
Condition alertOpens when a condition becomes true, and recovers when it clears.Available liquidity below $1M.

The Notifications page in the app lists every report and alert with its type, status and latest delivery.

Reports

Reports deliver tables of your protocol’s data on a schedule.

You can configure:

  • Schedule — Every few minutes or hours, daily at a chosen time, or weekly on a chosen day.
  • Scope — Your entire workspace, a group of contracts or an individual contract.
  • Lines — Transactions, active wallets, volume, existing metrics, or metrics made for the report alone.
  • Tables — Structured data, such as the largest swaps or top wallets by trading volume.

Reporting periods

By default, each figure is shown over the report’s own period: the last 24 hours for a daily report, the last 7 days for a weekly one.

You can choose other windows, such as 24 hours, 7 days and 30 days side by side, and add the change against the previous period.

Conditional reports

A report can send only when a condition holds. A run whose condition does not hold is skipped.

For example, a daily risk report could send only when one or more lending markets have breached their liquidity requirements.

Run on demand

A report can be run at any time, outside its schedule. It is sent to its destinations straight away.

Reports without a destination

A report needs no destination. It still runs on schedule, and each run is kept on the report’s page in the app. Once a destination is added, later runs are sent there.

Alerts

There are two categories of alert:

CategoryTriggered byState
Activity alertEach matching occurrenceNone. Each occurrence is independent.
Condition alertA condition becoming trueOpen until the condition clears, then recovered.

Activity alerts

Receive a message whenever matching on-chain activity occurs.

  • Events — A swap exceeding $100k or a new market being created.
  • Metric changes — A treasury balance or a contract’s total supply changing.
  • Group changes — A contract joining or leaving a group.
  • Table activity — A loan opening or a withdrawal request finishing.

Filter the activity that triggers an alert, and write the message it sends from the event’s fields. For example, a message only for swaps exceeding $100k, naming the trader, the pool and the amount.

Several matches in the same block are sent as one message. A message links to its transaction, or for several matches to the block, on the chain’s explorer.

Condition alerts

Watch an ongoing condition. For example:

  • Metric thresholds — Available liquidity falling below $1M.
  • Changes over time — TVL falling more than 20% against a day ago.
  • Activity thresholds — Hourly fees exceeding three times their usual level.
  • Missing activity — No deposits for six hours.
  • Transaction failures — More than half of the transactions to a contract failing over an hour.
  • Overdue activity — A withdrawal requested and not claimed within three days.
  • Table conditions — A loan’s health factor falling below 1.1.

Messages and recovery

WhenMessage
The condition becomes trueThe alert opens and a message is sent.
The condition stays trueNothing more is sent, unless hourly reminders are on.
The condition becomes falseThe alert recovers and a recovery message is sent.

Hourly reminders are off by default. Acknowledging an alert stops its reminders; the alert stays open until its condition clears, and the recovery message is still sent.

Overdue activity

An overdue alert pairs an opening event with the events that answer it, such as WithdrawalRequested and WithdrawalClaimed, matched on a shared field like the request id. It opens when an opening event goes unanswered for longer than the time you set. Only opening events after the alert is created count.

Table rows

A condition alert can apply to every active row of a state table. For example, alert whenever a loan’s health factor falls below 1.1.

  • A loan crossing the threshold opens its own alert.
  • When that loan recovers, its alert recovers without affecting other loans.
  • New loans are checked automatically. A finished loan’s alert closes.

Row alerts are sent to the destinations set on the rule, and have no reminders.

Create notifications

Reports and alerts are created and changed by your coding agent or the CLI. Describe what you want:

Send a daily report of fees, volume and active wallets to #analytics. Notify #trades whenever a swap exceeds $100k. Alert #risk if any market's available liquidity falls below $1M.

Your agent chooses the type of notification and configures its schedule, trigger or condition. Ask it to change an existing one in the same way. See Agent Integration.

From the CLI, use notify:

contract-dev notify add report "Daily" --row volumeInUsd --row activeWallets --columns 24h --at 9 --to "#analytics" contract-dev notify add alert "TVL low" --on metric:"TVL" --when "value < 1000000" --remind contract-dev notify run "Daily"

In the app, the Notifications page shows each report’s runs and each alert’s messages. From there you can pause, resume or delete a notification, run a report now and choose a report’s destinations. To stop an alert’s reminders, acknowledge it with contract-dev notify ack.

Destinations

Send reports and alerts to Slack, Telegram or email.

To connect a destination, open Settings → Message destinations in the contract.dev app.

Available destinations

  • Slack — Connect your Slack workspace and choose a channel to receive notifications.
  • Telegram — Connect a private chat or a Telegram group.
  • Email — Add an email address.

Slack and Telegram can also be connected from the CLI with channels add.

Using destinations

  • A report or alert can send to several destinations.
  • A destination can be shared by many reports and alerts.
  • A notification can be created without a destination. Its history is kept in the app.
Last updated on