Skip to content

Conversation

@ctmotox2
Copy link
Contributor

Infinifi reserve tracking and governance monitoring is added.
Cap money Msig address is added to safe monitoring.

Copy link
Collaborator

@spalen0 spalen0 left a 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)
Copy link
Collaborator

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
Copy link
Collaborator

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()
Copy link
Collaborator

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):
Copy link
Collaborator

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()
Copy link
Collaborator

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.
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants