The Price Oracle is a set of Ethereum smart contracts for storing and providing on-chain prices for various assets. The contract supports Time Weighted Average Prices (TWAPs) for Uni-v2 pairs, Uni-v2 LP tokens and Curve's LP tokens.
To run Price Oracle, pull the repository from GitHub and install its dependencies. You will need npm installed.
git clone https://github.com/agoradefi/price-oracle
cd price-oracle
npm ci
To deploy a new oracle instance you will first need to setup
.env
file- the configuration parameters in the file
./scripts/config/{network}.js
Then you can run the deployment scripts in the order
- scripts/deploy-oracle.js
- scripts/setup-oracle-config.js
- scripts/setup-ctoken-configs.js
Scripts can be run using the command
npm run hh -- --network {network-name} {script-path}
Currently deployed contracts can be found in deployments directory.
For any concerns, open an issue or visit us at https://agoradefi.io/.