Suggestion: Scaling / ops - OZ Defender

Hey there guys !

I was just starting to think about implementing OZ Defender for a well-known project, but I'm realizing that maybe using defender via UI its cool - but it does not scale well for some stuff.

There are two cases that come into mind:

  1. I want to setup a Sentinel that alerts me when a job in Keep3r network is being griefed. For this, I'd have to setup a condition that checks on the calls of my job contract, and I'd want to configure something like: 'if this function has been called with parameter P an X amount of times within Y interval do Z'.

The thing is ... I want P to be diff. parameters, so in order to achieve this, I have to do this manually, for like 50 parameters.

  1. I want to be able to setup all of this, and have some version control / share with my peers / reuse setups / etc. for this, ofc, github is a must.

My take
I think that if OZ Defender had some kind of CLI/API to create / modify sentinels (and then scale to autotasks, etc.) with an easy-to-understand configuration format (YML/JSON/etc.). It would allow a lot of cool stuff and implementations for big projects, also, it would allow CI integrations (deployment, testing, etc.)

Also, if it would be manageable to create a local OZ defender ecosystem (with a docker image?), one could also do some integration testing of sentinels and autotasks with mainnet forks.

It would be the holy grail of chaotic / stress testing for triage teams.

2 Likes

Hi @alejoamiras!

Thanks for reaching out to us! While not exactly the same thing as what you’re suggesting, I’ll mention there is one fairly recent feature called Autotask Conditions that might help here. With the defender client, one can programmatically update that Autotask code (via CI systems).

To use this approach, one would not use “conditions” aside from just selecting the functions you’re interested in, then put whatever desired logic in the Autotask condition.

More information on Autotask Conditions can be found here: Autotask Conditions
The Defender Autotask Client can be found here: Defender Autotask Client

I like the idea about hosting the ecosystem locally; it isn’t something that we’ve focused on quite yet. This is super valuable feedback as we create our roadmap. Let us know if you need any help or have any questions!

Thanks!
Steven

2 Likes

Thanks @steven ! Will definetely look into it.

Quick Q: Have you guys thought about adding the possibility of sentinels monitoring a contract state ? For example: To monitor a share price of vaults.