# Quick Start

{% hint style="info" %}
**WatchTower is an in-situ security threat monitoring service for smart contracts to detect and alert security attacks in near real-time.**

**WatchTower deploys "bots" to extract and analyze real time on-chain data to screen suspicious transactions that may expose security risks or prelude hacks.**

**WatchTower is brought to you by Sec3, a security and research firm providing bespoke audits and cutting edge tools to Web3 projects.**
{% endhint %}

**WatchTower offers a number of features:**

* A user interface for users to add, customize, deploy, stop bots, and examine alerts in a dashboard.
* A set of built-in "bots", based on security analysis logic and domain knowledge to help detect specific signs of security risks, such as abnormal token transfers, abnormal payloads, etc.

## Getting Started

### 1. Create Project

On the sidebar of the dashboard, click "**WatchTower**".

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2FN2SFFC9xAaFTzodVyqJy%2FScreenshot%20from%202023-08-17%2020-15-29.png?alt=media&#x26;token=9f52cbac-d6f2-47f4-a1e8-22e125452442" alt=""><figcaption></figcaption></figure>

Click "**Add a new project**", and give your project a name.

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2FPvCoARgEr09z0ELpFHmd%2F1.png?alt=media&#x26;token=1051989d-523b-40a7-b9eb-35d851a4e403" alt=""><figcaption><p>Add a new project</p></figcaption></figure>

Click "**Add an address**"

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2FVusv16SGCb9fE2otgMrg%2F2.png?alt=media&#x26;token=07ed6606-8fdd-4dba-9911-2d7f9aa0e835" alt=""><figcaption><p>Add an address</p></figcaption></figure>

Then, add the address(es) of your smart contract.

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2F7niRCdKfVuvL2my7Nr6w%2F3.png?alt=media&#x26;token=2eef40d4-fbf0-459c-9961-f83753f8f950" alt=""><figcaption><p>Add an address</p></figcaption></figure>

### **2. Add bots**

After an address is added, the address will appear on the **Projects** sidebar.

To add a bot, click "**Add Bot**" in the address config menu or "**New Bot**" button on the dashboard

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2F3FBCy9NIf4Mu1IPmfw6J%2F4.png?alt=media&#x26;token=f606782a-9928-44fe-a1b0-455ec8e114a9" alt=""><figcaption><p>Add a bot</p></figcaption></figure>

Next, choose a bot from the list of bots, for example, solana\_abnormal\_transfer\_sol, which is designed to watch and alert abnormal size transactions in SOL.

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2FK9oy96Yjl4u4gF594ZGw%2F5.png?alt=media&#x26;token=4796bcf0-9e3f-4e60-aa44-7e004b0ecbec" alt=""><figcaption><p>Choose bot type</p></figcaption></figure>

Next, customize the bot:

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2F5szzdIA6lQaTYZNIxOUJ%2F6.png?alt=media&#x26;token=dbe913d4-b42c-4983-b8f0-ccd26508e3a3" alt=""><figcaption><p>Config the bot</p></figcaption></figure>

#### 1) Name the bot (mandatory)

A human-friendly name for the bot.

#### 2) Target Address(es) to be monitored (mandatory)

This is usually the address for a smart contract or an account.

#### 3) Severity level (mandatory)

Each bot has a default severity level (*medium* in this case), but the user can configure a different severity level.

#### 4) Alert destinations (optional)

Select the ways you wish the alert to be sent. For details about setting up alert destinations, see

{% content-ref url="alert-destinations" %}
[alert-destinations](https://doc.sec3.dev/sec3-watchtower/alert-destinations)
{% endcontent-ref %}

#### 5) Bot specific parameters (optional)

In this case, an alert threshold for the transfer (optional, default 100 for the solana\_abnormal\_transfer\_sol bot).

For the complete list of bot types and their parameters, see&#x20;

{% content-ref url="bots" %}
[bots](https://doc.sec3.dev/sec3-watchtower/bots)
{% endcontent-ref %}

After the setup is completed, click "**Create bot**". Now the bot is created and running!

Note: If your bot continuously generates many alerts, it may be forced to stop. Too many alerts bring down the signal-to-noise ratio and make the monitoring less efficient. You will need to tune your bot parameters and try again.

### 3. View Alerts

On the **Alerts** tab in the dashboard, you can view the alerts generated by the bots. The detail of the alert can be expanded by clicking the alert.

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2FU19zYdZBzSCg7yehTRaL%2F7.png?alt=media&#x26;token=76407941-f734-4cf8-bda3-3dc38cb8f631" alt=""><figcaption><p>Alerts</p></figcaption></figure>

Clicking an alert will expand the alert's details.

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2FzC4OgLSvKMcZJpeRzg0u%2FScreenshot%202023-07-13%20at%2011.04.31%20AM.png?alt=media&#x26;token=91041cd1-b077-48ad-983d-3a0beb529846" alt=""><figcaption><p>Alert Details</p></figcaption></figure>

### 4. Manage Projects & Bots

To manage a project, click the [⚙️](https://prod.emojipedia.org/gear/) icon next to the project name. You can edit the project name, add address or delete the project. Managing an address is similar.

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2F7dfAWYdWihY8rv9We1nR%2F10.png?alt=media&#x26;token=19a90e92-fbd3-419f-ac92-80ad1086f952" alt=""><figcaption><p>Manage project</p></figcaption></figure>

To manage a bot, navigate to the Bots panel, where you can check and change the status of the bot. Clicking a bot opens the editing box.

<figure><img src="https://2586477326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMej1XIjZMe7uRcLdQG7n%2Fuploads%2F8DHlHhkKG0lGGFBNB89T%2F9.png?alt=media&#x26;token=3ec2be45-dbe2-46af-b6a9-90dc94e6bffb" alt=""><figcaption><p>Manage bots</p></figcaption></figure>
