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 andBAL
earned across all networks_gasResimbursement.json
: results of the BAL for Gas program for the week_totals.json
: total amount ofBAL
to be claimed on Ethereum mainnet (__ethereum_0xba1...
+_gasResimbursement.json
)
- Python 3 + Jupyter Notebook
- A service account key with read access to Google BigQuery
- 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
- Start Jupyter Notebook:
jupyter notebook
- Open the
bal-mining.ipynb
notebook - Run all cells
- Plots are displayed throughout the notebook. JSON reports are stored in the
reports
directory as described above.
145,000 BAL will be distributed on a weekly basis.
Ethereum mainnet liquidity providers must claim their BAL at claim.balancer.finance.
Polygon liquidity providers will have their BAL sent directly to their wallet by Wednesday.
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.