lidofinance/lido-oracle

Stateful daemon

Closed this issue · 1 comments

To be able to enforce more intelligent and granular sanity checks the oracle should be stateful. This means it should keep the persistent database that contains useful metadata: keys, states, balances and other useful interim data.

This will need injecting ORM (a-la SQLAlchemy or tortoise) and need to specify volume in docker-compose to let it persist.

Since

  • the contract will make all required sanity checks (see lido-dao#39)
  • oracle daemon also makes checks regarding reported numbers correctness (see #91, #100)
  • deviations can be covered and signalled by Grafana + Prometheus + Exporter (see Monitoring approach for NOPs)
  • other useful states and interesting data can be fetched from the contract via extended getter (see lido-dao#230)

... so the oracle daemon can and SHOULD be kept as tiny and stateless as possible