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.
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.