-
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
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.
infinifi/README.md
Outdated
|
|
||
| 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?
74fecd7 to
4fbd6c0
Compare
4fbd6c0 to
06fabc2
Compare
infinifi/main.py
Outdated
| # Extract Total Backing (TVL) | ||
| if "asset" in stats and "totalTVLAssetNormalized" in stats["asset"]: | ||
| total_backing = float(stats["asset"]["totalTVLAssetNormalized"]) | ||
| else: |
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.
We could return early from the function if there is no data
infinifi/main.py
Outdated
| if "asset" in stats and "totalLiquidAssetNormalized" in stats["asset"]: | ||
| liquid_reserves = float(stats["asset"]["totalLiquidAssetNormalized"]) | ||
|
|
||
| # Extract Total Backing (TVL) | ||
| if "asset" in stats and "totalTVLAssetNormalized" in stats["asset"]: | ||
| total_backing = float(stats["asset"]["totalTVLAssetNormalized"]) |
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.
you can fetch stats["asset"] only once and verify it is not none, it will simplify code
infinifi/main.py
Outdated
| iusd_decimals = batch_results[0] | ||
| iusd_supply_raw = batch_results[1] |
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 would cast these values to int from start.
infinifi/main.py
Outdated
| # Constants | ||
| PROTOCOL = "infinifi" | ||
| IUSD_ADDRESS = Web3.to_checksum_address("0x48f9e38f3070AD8945DFEae3FA70987722E3D89c") | ||
| LIQUID_RESERVES_THRESHOLD = 25_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.
You can set it to 15m
Infinifi reserve tracking and governance monitoring is added.
Cap money Msig address is added to safe monitoring.