chronicleprotocol / aggor

Oracle aggregator distributing trust among different oracle providers
Other
5 stars 0 forks source link

Aggor V2 with hardcoded oracle logic #21

Closed pmerkleplant closed 10 months ago

pmerkleplant commented 11 months ago

This PR is a refactor of #20. Its custom made for the Spark deployment, using Chronicle and Chainlink as oracle providers and Uniswap as possible TWAP provider.

Logic is inlined as much as possible, ie sorting is based on hard-coded logic, and variable usage kept as low as possible, ie most configurations are immutable.

Testsuite not sufficient yet, but integration tests for Ethereum ETH/USD seem to work.

Current gas costs (default foundry output) for Ethereum ETH/USD ~40k.

pmerkleplant commented 11 months ago

Some TODOs: