Coder Social home page Coder Social logo

buffer-keepers's Introduction

Buffer Keepers

Keepers are bots that fetch the desired price feeds for a specific asset at a specific timestamp for opening and closing option trades.

How it works

We have 2 keepers - one for opening the option trades queued by the users and second to unlock/exercise the options that have expired. These keepers keep running endlessly at an interval specified in WAIT_TIME.

In every iteration, the keeper calls a datasource to fetch the options which are to be opened or closed at the moment. This datasource is theGraph's subgraph where we store all our blockchain data. For every option that needs to be executed the subgraph returns its asset pair and timestamp. The keeper sends a list of [{asset_pair, timestamp}] to the publisher endpoints which returns the corresponding price with a signature. The keeper sends a transaction to the blockchain with all this data and the signature is what helps in verifying that the price has come from a trusted publisher.

Chart

How to run

Make a copy of .env.sample, name it as .env and add the desired config. Run the following command

./run_docker.sh

buffer-keepers's People

Contributors

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