BalanceMonitor is a transaction detector that monitors the balance of accounts or contracts (native token and ERC20 tokens) on a blockchain network. It checks if the balance falls below a specified threshold and sends notifications when this occurs.
Functionality
- The
BalanceMonitoris a transaction detector that monitors the balance of accounts or contracts (native token and ERC20 tokens) on a blockchain network. It checks if the balance falls below a specified threshold and sends notifications when this occurs. The monitor automatically handles configuration changes and incoming transactions. This tool is especially useful for applications where maintaining a minimum balance is critical, such as payment systems, staking wallets, or operational accounts - The Balance Monitor has the following key features:
- Monitor the balance of accounts or contracts (native token and ERC20 tokens)
- Set a balance threshold for native token and ERC20 tokens
- Set a severity level for notifications
- Automatically handle configuration changes and incoming transactions
- Send notifications when the balance falls below the specified threshold
- The Balance Monitor supports the following address types:
- Native Token
- ERC20 Token
- The following parameters are available for the native token:
- Balance Threshold: The minimum balance required for the account or contract
- Decimals: The number of decimal for the native token
- The following parameters are available for the ERC20 token:
- Address: The ERC20 token address
- Balance Threshold: The minimum balance required for the ERC20 token
- Decimals: The number of decimal for the ERC20 token
- Symbol: The symbol of the ERC20 token
- The
BalanceMonitoroperates in real-time, actively monitoring transactions and blockchain events to ensure timely detection of balance changes. It processes native token transfers as well as ERC20 token transactions. - Native Token, for transactions involving native tokens:
- The monitor checks the current balance of the relevant address.
- If the balance falls below the configured threshold, a notification is triggered. ERC20 Token, for detected TRANSFER events of ERC20 tokens: - The monitor examines the from and to addresses to check if they are in the monitoring list.
- If an address is found, the monitor queries the balance of the specific ERC20 token for that address.
- If the token balance is below the threshold, a notification is sent.
Configuration
- Threshold (
balance_threshold, default:200000000000000000): Balance Threshold - Decimals (
decimals, default:18): Decimals - ERC20 Tokens (
erc20_tokens, default:None): ERC20 Token - Severity (
severity, default:-1.0): Severity See common configuration.
Supported networks: evm.