# Monitoring and detection

Initiate the creation of a monitoring profile by choosing the "<mark style="background-color:green;">**Create monitoring profile**</mark>" option.

<figure><img src="https://3525564716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6O8hzTCYYJcyzhLT0YBA%2Fuploads%2FOfvCQujPYdNEIWMjbV4A%2Fimage.png?alt=media&#x26;token=96fef45d-9adb-454a-ab45-92372a8f97a1" alt="" width="375"><figcaption></figcaption></figure>

Decide the type of activity you wish to monitor:

* "<mark style="background-color:red;">**Remove Liquidity**</mark>" to take actions (<mark style="color:red;">sell</mark>) before the total liquidity of a dex pair is withdrawn.
* "<mark style="background-color:red;">**Whale Sell**</mark>" to monitor significant selling activities and take the actions (<mark style="color:red;">sell</mark>) before.

<figure><img src="https://3525564716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6O8hzTCYYJcyzhLT0YBA%2Fuploads%2F9VSxo2JsxAh0sVlptmuR%2Fimage.png?alt=media&#x26;token=8785222e-4400-4965-a749-7159abdfbf71" alt="" width="375"><figcaption></figcaption></figure>

* Enter the address of the primary token you want to monitor.
* Enter the address of the quote token (usually <mark style="background-color:orange;">WBNB</mark>: <mark style="background-color:orange;">**0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c**</mark>), which is paired with the main token.
* Specify the minimum selling amount of the main token that will trigger the monitoring action.

<figure><img src="https://3525564716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6O8hzTCYYJcyzhLT0YBA%2Fuploads%2FO0GC8yna5Gv3Dbywr9Wg%2Fimage.png?alt=media&#x26;token=8eea3538-e908-4539-9be3-a24ced3c8afc" alt="" width="375"><figcaption></figcaption></figure>

4. **Managing Monitoring Profiles:**

* To view active monitoring profiles, select the "<mark style="background-color:green;">**View active profiles**</mark>" option.
* To modify account details or change the network, select "<mark style="background-color:green;">**View account details**</mark>" or "<mark style="background-color:green;">**Change network**</mark>" respectively.

## *<mark style="background-color:red;">**Example**</mark>*

**Objective:** Set up a monitoring profile to automatically sell CAKE tokens if someone sells 100 or more CAKE tokens.

**Steps:**

1. **Define the Trigger Condition:**
   * Navigating to the section 'Create Monitoring Profile'
   * Entering the condition: "100 CAKE tokens"

<figure><img src="https://3525564716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6O8hzTCYYJcyzhLT0YBA%2Fuploads%2F9Ydp2iNo8KGuEbTPziJK%2Fimage.png?alt=media&#x26;token=e38db172-6060-42b1-8868-9ec0f4cde788" alt="" width="375"><figcaption></figcaption></figure>

1. **Set the Response Action:**
   * Specifying the automatic response: "5 CAKE tokens"

<figure><img src="https://3525564716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6O8hzTCYYJcyzhLT0YBA%2Fuploads%2F559KHaFPPCJsEgax05In%2Fimage.png?alt=media&#x26;token=a7eff8cc-24a7-46f7-a909-61034e7e7fb4" alt="" width="375"><figcaption></figcaption></figure>

* Confirm the details

<figure><img src="https://3525564716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6O8hzTCYYJcyzhLT0YBA%2Fuploads%2FYugDtZ1bWhi4qKGsIebi%2Frpgscreen.png?alt=media&#x26;token=2a227ead-392b-468b-aa14-38a9dd43c0fb" alt=""><figcaption></figcaption></figure>

1. **Monitor and Act:**
   * The system continuously monitors the mempool for transactions.
   * Once a transaction selling 100 CAKE tokens (or any amount exceeding your set threshold of 100) is detected, the monitoring profile will trigger.
2. **Execute the Transaction:**
   * Upon triggering, the system will automatically prepare and send out the transaction to sell 5 CAKE tokens.
   * The system automatically selects the optimal strategy, either by setting a higher gas price to prioritize the transaction's inclusion in the blockchain ahead of others or by utilizing the private mining feature.
3. **Outcome:**
   * Monitor the transaction status. Once executed, the system has effectively responded to the market activity as configured in your monitoring profile, thus protecting your assets according to your predefined strategy.

Remember to review and confirm all settings before activation to ensure they meet your investment strategy and risk tolerance.
