Skip to content

newmickymousse/bal-mining-scripts

 
 

Repository files navigation

BAL Mining

Set of scripts to calculate weekly BAL liquidity mining distributions.

On week 26, the process was ported over to Python with the blockchain-etl project on Google Bigquery as the source for state data, such as pools' balances, fees, liquidity providers etc. The legacy scripts used up to week 25 can be found in the js directory.

Starting on week 57 of the liquidity mining program (June 28th 2021), pools can be incentivized with multiple tokens. Each weekly report directory has the following structure:

  • __<network>_<token>.json files, containing a list of liquidity providers and the amount of <token> earned by each for providing liquidity in incentivized Balancer pools on <network>
  • _totalsLiquidityMining.json: for consistency with the reports provided in previous weeks, contains a list of liquidity providers and BAL earned across all networks
  • _gasResimbursement.json: results of the BAL for Gas program for the week
  • _totals.json: total amount of BAL to be claimed on Ethereum mainnet (__ethereum_0xba1... + _gasResimbursement.json)

Requirements

Setup

  • Install required packages: pip install -r requirements.txt
  • Configure environment variable:
    • GOOGLE_APPLICATION_CREDENTIALS: path to a JSON file that contains a service account key with read access to Google BigQuery

Usage

  1. Start Jupyter Notebook: jupyter notebook
  2. Open the bal-mining.ipynb notebook
  3. Run all cells
  4. Plots are displayed throughout the notebook. JSON reports are stored in the reports directory as described above.

Weekly distributions

145,000 BAL will be distributed on a weekly basis.
Liquidity providers must claim their BAL at app.balancer.fi, polygon.balancer.fi or arbitrum.balancer.fi.

BAL Redirections

In case smart contracts which cannot receive BAL tokens are liquidity providers (ie. hold the tokens that represent ownership of the pool), 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 44.3%
  • TypeScript 25.3%
  • Jupyter Notebook 15.8%
  • JavaScript 14.6%