Giter Site home page Giter Site logo

open-oracle's Introduction

Open Oracle

The Open Oracle is a standard and SDK allowing reporters to sign key-value pairs (e.g. a price feed) that interested users can post to the blockchain. The system has a built-in view system that allows clients to easily share data and build aggregates (e.g. the median price from several sources).

Contracts

First, you will need solc 0.6.6 installed. Additionally for testing, you will need TypeScript installed and will need to build the open-oracle-reporter project by running cd sdk/javascript && yarn.

To fetch dependencies run:

yarn install

To compile everything run:

yarn run compile

To deploy contracts locally, you can run:

yarn run deploy --network development OpenOraclePriceData

Note: you will need to be running an Ethereum node locally in order for this to work. E.g., start ganache-cli in another shell.

You can add a view in MyView.sol and run (default is network=development):

yarn run deploy MyView arg1 arg2 ...

To run tests:

yarn run test

To track deployed contracts in a saddle console:

yarn run console

Reporter SDK

This repository contains a set of SDKs for reporters to easily sign "reporter" data in any supported languages. We currently support the following languages:

Poster

The poster is a simple application that reads from a given feed (or set of feeds) and posts...

Contributing

Note: all code contributed to this repository must be licensed under each of 1. MIT, 2. BSD-3, and 3. GPLv3. By contributing code to this repository, you accept that your code is allowed to be released under any or all of these licenses or licenses in substantially similar form to these listed above.

Please submit an issue (or create a pull request) for any issues or contributions to the project. Make sure that all test cases pass, including the integration tests in the root of this project.

open-oracle's People

Contributors

coburncoburn avatar hayesgm avatar jflatow avatar rickierao avatar themandalore avatar toninorair avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-oracle's Issues

The UniswapAnchoredView returns price for Zero address (0x00).

Issue

The current oracle implementation that the Compound Protocol uses which is deployed at 0x4007B71e01424b2314c020fB0344b03A7C499E1A returns a price value from getUnderlyingPrice() function when the zero address (0x00) is passed.

This issue however does not break any compound protocol functionality but still getting a price value for an invalid input is not ideal.

Cause

The reason for this issue seems to be due to the addition of TokenConfig for LINK, KNC and SNX tokens. These three configs were added without a cToken address value.

Resolution

The getUnderlyingPrice() function should check the validity of the input address variable (input should not be equal to 0x00).

Hello

Hello
I am familiar with React, Next.js,Vue.js in frontend and solidity, rust and web3.js.
I would like to be member for team.

ifs vs mappings in UniswapConfig.sol

Hi guys, great work, I am currently checking out the contracts code,

and wondering if it is better to have many if conditions like:

function getUnderlyingIndex(address underlying) internal view returns (uint) {
if (underlying == underlying00) return 0;
if (underlying == underlying01) return 1;
if (underlying == underlying02) return 2;
if (underlying == underlying03) return 3;
if (underlying == underlying04) return 4;
if (underlying == underlying05) return 5;
if (underlying == underlying06) return 6;
...

for underlying, symbols, cTokens
than having mappings like(pseudo-code here):

underlyingAddress => TokenConfig;
symbols => TokenConfig;
cTokenAddress => TokenConfig;

i mean using ifs means you will need to go through 0 - 5 to get the 06 index every time right?

I'm just green in solidity coding, so hoping to get some insights here.

Many thanks.

Bulkfixed vulns

Bulk vulnerability fix - Lockfile fix
This pull request will update your transitive dependencies within the allowed version intervals provided by your direct dependencies.

Fixed vulnerabilities:
CVE–2019–20149 debricked

CVE–2020–15366 debricked

CVE–2020–8244 debricked

CVE–2020–7751 debricked

CVE–2020–7788 debricked

debricked–124

debricked–149662

CVE–2020–28503 debricked

CVE–2021–23362 debricked

CVE–2021–23369 debricked

CVE–2021–23383 debricked

CVE–2021–23343 debricked

CVE–2021–33502 debricked

CVE–2021–32804 debricked

CVE–2021–32803 debricked

CVE–2021–37713 debricked

CVE–2021–37712 debricked

CVE–2021–37701 debricked

CVE–2021–3777 debricked

CVE–2021–3807 debricked

CVE–2021–3918 debricked

CVE–2022–0355 debricked

CVE–2022–3517 debricked

CVE–2022–24999 debricked

CVE–2022–38900 debricked

CVE–2022–25901 debricked

CVE–2022–25881 debricked

CVE–2022–38778 debricked

CVE–2023–26115 debricked

philipjonsen#18

Remember to give a star or donate for my work :)

list of Reporters

Maybe you can create a list of Reporters somewhere on compound.finance? I don't see any motivation or incentives for reporters, but at least it could be a vanity metric like "look at me I'm providing price feeds for Compound!"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.