Giter VIP home page Giter VIP logo

bal-mining-scripts's Introduction

BAL Mining

Set of scripts to calculate weekly BAL liquidity mining distributions

Historical Runs

Week Start Block End Block
1 10176690 10221761
2 10221761 10267003
3 10267003 10312236
4 10312236 10357402
5 10357402 10402520
6 10402520 10447836
7 10447836 10493044
8 10493044 10538187
9 10538187 10583488
10 10583488 10628811
11 10628811 10674230

Requirements

An archive node is needed to run the scripts because historical balance snapshots are needed. A "starting-point" archive node can also be used that will only archive at x block onwards. Note this still probably requires 750G+ of disk space.

Usage

node index.js --week 1 --startBlock 10176690 --endBlock 10221761
node index.js --week 2 --startBlock 10221761 --endBlock 10267003

This will run run all historical calculations by block. Using an infura endpoint this may take upwards of 18 hours. For a local archive node, the sync time is roughly 10 minutes. Progress bars with estimates are shown during the sync. Reports will be saved in the folder for the given week specified

node sum.js --week 1 --startBlock 10176690 --endBlock 10221761

After all reports are generated, sum.js will create a final tally of user address to BAL received. This is stored in the report week folder at _totals.json

Weekly distributions

145,000 BAL will be distributed directly to addresses on a weekly basis. Due to block gas limits, the tx's to batch transfer BAL will need to be split up across blocks. In order to prevent favoring certain accounts, the block hash of the endBlock will be the starting point and addresses will be ordered alphabetically for distributions.

BAL Redirections

In case smart contracts which cannot receive BAL tokens are specified, owners of those smart contracts can choose to redirect BAL tokens to a new address. In order to submit a redirection request, submit a pull request to update redirect.json using "fromAddress" : "toAddress" along with some sort of ownership proof. Please reach out to the Balancer team if you need assistance.

bal-mining-scripts's People

Contributors

alsco77 avatar bonustrack avatar dmvt avatar fernandomartinelli avatar gtaschuk avatar jin10086 avatar jondevx avatar kaiynne avatar mikemcdonald avatar rabmarut avatar

Watchers

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