Giter Club home page Giter Club logo

pragma-oracle's Introduction

Pragma

Pragma, Starknet's native provable oracle.

What's Pragma ?

Pragma is a decentralized oracle built natively on Starknet. It leverages cairo to make data feeds computation fully trustless.

  • Pragma is built from the ground up to remove any trust assumptions in current oracles' design. There isn't any off-chain infrastructure, raw-data is directly pushed on-chain by whitelisted data providers. Then the aggregation happens at the smart contract level.
  • Pragma offers a top-notch developer experience, reviewed by key actors of DeFi on Starknet. The goal is to make the life of DeFi protocols as easy as possible.

Overview

  • Account contract mostly use for testing purposes and as a reference.
  • Admin contract will be replaced by Argent's multisig as it gets released.
  • Entry & Data Structures defines data structures used within the protocol along with generic aggregations methods. It is designed from the ground up to ensure that adding new entry types is done seamlessly without involving any breaking changes.
  • Operations defines a few utilities libraries (time series, sorting, bits manipulation) that will be used for different aggregation methods and optimizing storage operations.
  • Oracle is the main entrypoint of the protocol. It is the contract that end developers will interact with to fetch any kind of data. It's been thought and built for retro-compatibility and heavily leverages unique aspects of Cairo, notably enums, traits and generics.
  • Publisher Registry handles the registration of different publishers along with the sources they are allowed to push data from.
  • Summary Stats acts as a proxy contract for more sophisticated kind of data aggregation such as volatility and mean.

Testing

  • Test suite, unit tests are provided under the functions' implementations directly whereas full flow integration tests lie within this test suite. It uses cairo-test for now and test thoroughly for any edge case.

A few key testing features are missing such as fuzzing and proper hooks, mocking cheatcodes. This will come as cairo tooling matures and improves.

Documentation

More extensive documentation can be found on our official website.

Deployment addresses

This repo will gradually replace the previous Pragma implementation in Cairo 0 which you can find here.

Starknet Testnet

  • Oracle Proxy : TODO
  • Publisher Registry : TODO
  • Summary Stats : TODO

Starknet Mainnet

๐Ÿ”œ

Local Deployment

TODO

Questions and feedback

For any question or feedback you can send an email to [email protected].

License

The code is under the GNU AFFERO GENERAL PUBLIC LICENSE v3.0, see LICENSE.

pragma-oracle's People

Contributors

evolveart avatar jordyro1 avatar

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.