Infinifi monitoring and adding Cap Money Msig #124
Infinifi monitoring and adding Cap Money Msig #124ctmotox2 wants to merge 6 commits intoyearn:mainfrom
Conversation
spalen0
left a comment
There was a problem hiding this comment.
This PR is clearly not ready. Next time create it as Draft PR when there is still work to do.
| current_block = client.eth.block_number | ||
| print(f"Current block: {current_block}") | ||
|
|
||
| check_timelocks(client, current_block) |
There was a problem hiding this comment.
Lets not use scanning events, that will kill our RPCs. From watching timelock addresses, we use Tenderly. Just list addresses in readme and I'll add create tenderly alerts.
| cache_key_reserves = f"{PROTOCOL}_liquid_reserves" | ||
| last_reserves = float(get_last_value_for_key_from_file(cache_filename, cache_key_reserves)) | ||
|
|
||
| threshold = 30_000_000 |
There was a problem hiding this comment.
Define thershold as constant at the top so it is easier to find and update.
| try: | ||
| # --- 1. iUSD Supply --- | ||
| # Dynamically get decimals | ||
| iusd_decimals = iusd_contract.functions.decimals().call() |
There was a problem hiding this comment.
Use batching for blockchain calls when possible. Example for batching calls: https://github.com/yearn/monitoring-scripts-py/blob/main/morpho/governance.py#L110
| ] | ||
|
|
||
|
|
||
| def fetch_api_data(endpoint): |
There was a problem hiding this comment.
If there is only one endpoint, no need to define it as param, just use inside function.
| from utils.telegram import send_telegram_message | ||
| from utils.web3_wrapper import ChainManager | ||
|
|
||
| load_dotenv() |
|
|
||
| 2. **Deployer Address**: | ||
| - `0xdecaDAc8778D088A30eE811b8Cc4eE72cED9Bf22` | ||
| - Alerts on any transaction sent from this address. |
There was a problem hiding this comment.
I see that the deployer creates different strategies/vaults. We don't need alerts for that, it will only be spam. We should only get alerts when new strategies are added to protocol, when iUSD funds are deposited there. This actions probably goes to Timelock?
Infinifi reserve tracking and governance monitoring is added.
Cap money Msig address is added to safe monitoring.