Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/starlingvibes/oracle-aggregator-js
Oracle Aggregator for a DeFi application that pulls price feeds from at least two different oracle sources, calculate an average, and displays it on a simple user interface
https://github.com/starlingvibes/oracle-aggregator-js
Last synced: about 5 hours ago
JSON representation
Oracle Aggregator for a DeFi application that pulls price feeds from at least two different oracle sources, calculate an average, and displays it on a simple user interface
- Host: GitHub
- URL: https://github.com/starlingvibes/oracle-aggregator-js
- Owner: starlingvibes
- Created: 2024-07-14T22:50:54.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T08:54:31.000Z (4 months ago)
- Last Synced: 2024-07-17T00:17:06.395Z (4 months ago)
- Language: JavaScript
- Homepage: https://oracle-aggregator-js.vercel.app
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Oracle Aggregator (Pyth and Chainlink)
Design and develop an Oracle Aggregator for a DeFi application. The aggregator should pull price feeds from at least two different oracle sources, calculate an average, and display it on the frontend (FE). Note- for this bounty, you MUST use the new Pyth oracle model.
Requirements:
- Oracle Integration: Fetch price feeds from at least two different oracle providers.
- Data Aggregation: Compute the average of the fetched price feeds.
- Frontend Display: Present the aggregated data on the UI.
- Deployment: Ensure the application can be tested and deployed on Cloudflare or Vercel.
# Demo video
```
https://www.loom.com/share/c49360d5f8d848c79fb07dd51ec9dc3f
```# Live URL
```
https://oracle-aggregator-js.vercel.app/
```# Install dependencies
```shell
npm install
```# Configure environment variables
```shell
cp .env.sample .env
vim .env
```Set the values of the environment variables in the `.env` file.
# Running the project
Running the project is as simple as running
```sh
npm run dev
```This runs the `dev` script specified in our `package.json`, and will spawn off a server which reloads the page as we save our files.
Typically the server runs at `http://localhost:5173`# Creating a production build
When running the project with `npm run start`, we didn't end up with an optimized build.
Typically, we want the code we ship to users to be as fast and small as possible.
Certain optimizations like minification can accomplish this, but often take more time.
We call builds like this "production" builds (as opposed to development builds).To run a production build, just run
```sh
npm run build
```This will create an optimized build in the `./dist` directory
You won't need to run a production build most of the time,
but it is useful if you need to measure things like the final size of your app.