Git Product home page Git Product logo

votium-py's Introduction

Votium-py

These are a set of scripts to help pull data from Snapshot and Votium v2 for Convex Finance incentives.

There are three primary scripts, intended to be run in listed order:

snapshot.py - Gets the proposal and voting data from Snapshot.

incentives.py - Gets incentives from Votium v1 and v2.

price.py - Merges and prices the Snapshot and incentives data.

Each script works be creating a CSV in the output directory. The CSVs are used by other scripts, but are also the primary useful output from these scripts.

The price.py script actually calls all other scripts so in reality, if you are interested only in the final product, you can just run price.py.

More Details

All of the scripts do cache their data to reduce API calls. If you are fiddling with the scripts and need to rewrite data, be sure to delete the file(s) from the cache directory.

snapshot.py

Snapshot pulls data from Snapshot API using graphql. I avoid using any libs because the the call is simple.

incentives.py

Incentives pulls data directly from the blockchain so you will need to set an environment variable (or create a .env file) for WEB3_HTTP_PROVIDER.

price.py

Price gets the data from the excellent DefiLlama API. Don't abuse it.

votium-py's People

Contributors

iamllanero avatar

Stargazers

 avatar

Watchers

 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.