Value Bot Monitoring
What is Value Bot Monitoring?
Value Bot Monitoring is a type of monitoring designed for tracking changes in numerical values. The main function is to monitor the value changes of a specific object, and when the changes reach a preset threshold, an alert will be triggered.
Typical Scenarios of Value Bot Monitoring
Monitoring Token balance changes
Monitoring the percentage change of stablecoins in Curve
Supported Data Sources
Data Source | Type | Stability |
---|---|---|
Ethereum | on chain | Very High |
BSC | on chain | High |
Avalanche | on chain | High |
Polygon Pos | on chain | High |
Arbitrum | on chain | High |
Optimism | on chain | High |
Polygon zkEVM | on chain | High |
ZkSync Era | on chain | High |
Base | on chain | High |
Scroll | on chain | High |
Manta | on chain | High |
ZKFair | on chain | High |
Blast | on chain | High |
Linea | on chain | High |
B2 | on chain | High |
Merlin | on chain | High |
How to Configure Value Bot Monitoring?
After logging into the ChainBot platform, go to the top right corner and click "Create Bot" -> "Value Monitor".
Info Explanation
Field Name | Description | Mandatory |
---|---|---|
Name | Bot Monitoring Name | Yes |
Chain | Selected Chain | Yes |
Contract | Selected Smart Contract Address | Yes |
Function | Selected Smart Contract Method | Yes |
Interval | Data polling interval, i.e., pull data from the configured source every interval | Yes |
Baseline Trigger | If checked, the trigger condition acts as a baseline. Once the value reaches the baseline, subsequent conditions that satisfy it will not repeatedly trigger. It will only trigger again when it leaves the baseline and returns. | Yes |
Fields | Field values to process | Yes |
Tags | Bot Monitoring tags, useful for searching | Yes |
Fields Explanation
Composed of multiple Field objects, where each Field includes a field and a formatter type. The formatter is a piece of JS code where the user needs to define the code for formatting the final value.
Built-in Functions
Function Name | Description |
---|---|
tokenPrice(symbol) | Get the USD-based price of a token, e.g., tokenPrice('weth') |
bot(botId) | Reference a specific Bot's content, e.g., bot('1') |
add(x,y) | x + y |
sub(x,y) | x - y |
mul(x,y) | x * y |
div(x,y) | x / y && y != 0 |
pow(x,y) | x^y |
Supported USD-Priced Tokens
Automatically retrieve token USD-based prices sourced from the highest liquidity pool on-chain. More tokens will be supported in the future.
Token | Pool |
---|---|
WBTC | |
WETH | |
WBNB | |
WMATIC | |
WAVAX | |
WFTM | |
CAKE |
Conditions Explanation
The parsing of fields in conditions is dynamic and will change with the configuration of Fields. The key of the condition in the configuration matches the name of the Field. The value in the condition is the threshold set by the user. During the final comparison, it will use the value formatted by the Field's formatter to compare with the value set in the condition. Hence, users must pay attention to unit conversions when configuring.
Template Variable Explanation
$subscription.name | Subscription name, usually the same as Bot Monitoring |
---|---|
$block.number | Block height |
$value.{} | Formatted value, parsed dynamically, e.g., $value.balance |
$condition | All condition content as a string |
$block.time | Block time |
Default Alert Template
Learn about Alert Notification Templates
Notification Message Example
[ENS Governance ETH Balance > 35000 ETH]
Block: 16046035
Balance: 35335.915888
Condition: (5m) balance last > 35000
Time: 2022-11-25T17:14:30+08:00
Created By ChainBot.io
Value Bot Monitoring Cases
Last updated