-
Notifications
You must be signed in to change notification settings - Fork 7
Infinifi monitoring and adding Cap Money Msig #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
spalen0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
|
|
||
| 2. **Deployer Address**: | ||
| - `0xdecaDAc8778D088A30eE811b8Cc4eE72cED9Bf22` | ||
| - Alerts on any transaction sent from this address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.