Forta detection bots generate alerts from defined onchain conditions

Updated ยท

Forta detection bots generate alerts when their monitoring logic detects defined transaction patterns or specified state changes in a smart contract. Scan nodes run those scripts against blockchain data and publish the findings they produce. The condition can describe a threat, an anomaly or a noteworthy operational event, so an alert's meaning comes from its particular rule. The decision is whether that rule covers the activity you need to understand. A published finding, a notification reaching its destination and a protective action taking effect are different outcomes. Forta Firewall's transaction-screening capabilities belong to a separate integration.

What triggers a Forta detection bot alert?

An alert starts with a condition that the bot's code recognises in the blockchain data it processes.

Transaction characteristics and contract events

Some rules examine transaction characteristics; others watch events emitted by specified contracts. Event monitoring can include an additional expression that filters event parameters. Selecting an event therefore need not mean reporting every occurrence.

State changes and combined conditions

A bot can also examine contract state, including an account balance falling below a defined threshold. More complex detection logic combines several factors. The rule's implementation determines which combination produces a finding, so a general label such as anomaly detection does not reveal the complete trigger.

A rule configured for selected contracts does not automatically cover other contracts. Chain support and bot configuration belong beside the trigger when interpreting its output.

The bot defines the test and the scan node executes it

Detection bots contain the monitoring logic, while scan nodes provide blockchain data and the computing environment that runs it. Nodes execute the scripts against each block of transactions and publish their findings. A rule can be appropriate for a task even when an execution problem prevents it from producing the expected output.

Visual summary: Forta detection bots: The bot defines the test and the scan node executes it

View image file

The finding sets the meaning of the alert

A finding reports the condition that a particular bot detected. Its description and classification explain why the activity was selected. In the event-monitoring template, the configured finding type and severity classify the output. Choosing those labels does not by itself establish that an attack happened.

Diagram: Forta detection bots: The finding sets the meaning of the alert

View image file

Operational monitoring includes changes that warrant attention without proving malicious intent. A finding about an account balance reports the condition applied to that balance. Establishing a successful exploit requires evidence beyond the threshold crossing. Read the stated condition before treating the severity label as a verdict.

Alert publication and notification delivery are separate

With a subscription covering the selected bot or feed, an application can retrieve findings through Forta's GraphQL API. Forta App notification subscriptions can target a bot identifier or a contract address, allowing readers to follow relevant output.

An alert record can exist even when a particular notification channel contains no message. The missing message does not by itself establish that the bot found nothing.

A notification destination does not control the matching condition inside the script. Changes to subscriptions affect which outputs someone follows; code or configuration changes affect what the bot detects. Confusing those settings can turn a delivery problem into an unintended change in monitoring coverage.

Does a quiet alert feed mean that a contract is safe?

A quiet feed cannot establish a contract's safety because its meaning depends on the bot's coverage and execution.

During blocks that a bot actually processed, no matching finding is evidence limited to that bot's detection conditions. It does not address threats outside its logic or activity outside its configured scope.

Scan nodes are required to produce a proof of scan for each block. Those records support checks on execution, a different question from whether the detection rule was sufficiently broad. The network also uses multiple scan nodes to reduce reliance on one execution environment. Continued scanning supplies context for silence; it does not expand what the script knows how to detect.

Choosing existing detection logic or a custom rule

An existing bot fits a task when its trigger covers the relevant activity. Custom logic becomes useful when the required contract, event or condition falls outside that scope.

Using a published bot

The bot's description should identify what it monitors and how it reports a finding. A narrowly defined rule can suit a narrowly defined event. Broader threat detection may require logic that combines signals.

Configuring event monitoring

The Forta Detection Bot Wizard provides templates for creating simple bots without writing code. Its event-monitoring template uses a selected supported chain, contract definition and event signature, with an optional conditional expression. The Forta software development kit (SDK) supports writing custom detection logic. Running either kind of bot on the public network requires the minimum FORT stake per bot. Forta's Getting started guide specifies 100 FORT per bot; bots below that minimum remain inactive.

Forta detection bots: Configuring event monitoring - illustration
Configuring event monitoring

View image file

Private dashboard settings do not make findings confidential

A bot marked private can have alerts omitted from the Forta App dashboard while its findings remain accessible through public GraphQL queries that specify its bot identifier. Dashboard visibility is therefore a poor measure of confidentiality.

Other monitoring arrangements have different boundaries. Bots can be written to encrypt findings. Private nodes operate independently of public bot assignment and public broadcasts of findings. These are separate choices from suppressing dashboard display.

Interpreting a contract event with an extra condition

Consider a bot configured to watch a selected contract event and apply an additional condition to its parameters. A matching event signature alone does not settle whether the complete rule matched. Use this short checklist to interpret an observed event:

  • Confirm that the event belongs to the configured contract on the selected supported chain.
  • Match the event signature, then evaluate the additional condition against the event's parameters.
  • Confirm that the bot processed the relevant block before interpreting an absent finding.
  • When the full rule matches, locate the corresponding bot alert and use its finding to decide what warrants investigation.
  • If the extra condition fails, no alert is expected from that event rule. If the rule matches without a visible finding, inspect execution and alert retrieval.

The published finding marks detection of the rule's condition. It does not establish that a protective response executed.

Bot alerts and Firewall intervention have different boundaries

A detection bot's finding supplies a monitoring signal. Forta Firewall places screening inside an integrated transaction flow, including before sequencing on integrated rollups. Raising an alert does not give an ordinary monitoring script control over transaction inclusion.

Firewall's censorship-resistance design delays transactions flagged as high risk, allowing time for a response instead of permanently blocking them. Pre-execution intervention requires an integrated screening path; a subscription to monitoring alerts does not supply that path.

Still wondering about Forta detection bots?

Do all detection bots use machine learning to trigger alerts?

A detection bot can trigger from a simple programmed condition without using machine learning. Other bots combine several factors or apply machine learning models. The implementation determines the method, so the existence of a bot alert does not imply that an AI model made the detection.

Can one event-monitoring bot watch several contracts?

The event-monitoring template supports configuring multiple contracts and selecting their events of interest. Each contract needs its own definition, including its address and application binary interface (ABI). A finding needs to be interpreted against the contract and event configuration that produced it.

Which unit belongs in a token event's threshold expression?

A threshold expression must use the unit of the event parameter that it compares. For a token amount encoded in base units, convert the intended token quantity using that token's decimals. Entering a displayed token amount directly can make the condition select different transactions from those intended.

Does hiding a bot's source code keep embedded API keys secret?

Hiding source code does not provide secure storage for credentials inside a publicly executed bot. Code obfuscation and encrypted findings address different exposure issues. The public bot execution model has no mechanism for keeping API keys secret, so a concealed source listing should not be treated as credential protection.

When does a bot alert confirm that an automated response has finished?

A bot alert confirms detection of its condition, without confirming completion of a separate response transaction. A system consuming alerts can initiate an onchain action. That action's execution needs its own confirmation; the original finding cannot establish response success simply because its trigger matched.

Are subscriptions to detection bot alerts always free?

Access to bot intelligence can require a paid network subscription. The General plan covers bots outside Premium Feeds, while Premium Feed owners set their own prices. The relevant cost follows the plan covering the selected bot or feed; it is separate from the conditions that trigger its alerts.