Long time lurker, first time poster. Was wondering if there was any intention to update the Read Me for this script:
Digging into incentives before making a proposal and I would love to give the script a try, but could use some documentation to ensure I set it up correctly.
Looking forward to seeing this project grow
My name is Jake and I am one of the primary developers for Interest Protocol.
The folder you linked there has a number of separate scripts we use to calculate the weekly LM rewards.
The goal is to produce valid parameters to feed to the Merkle Redeem contract each week, which allows people to redeem their IPT rewards based on their participation in our Liquidity program.
q1_data and q2_data define the block ranges and reward amounts for each week.
borrow_balance calculates the rewards for borrowers from IP and outputs to a file.
The week number on like 88 refers to the week in q2_data, which tells the script which block numbers to look in.
uni_v2 does the same but with liquidity providers in our Uniswap V2 Pool and the week number is on line 33.
The other two scripts are not in use, as I generally generate the Merkle root as I test the rewards each week, see this example.
If you are interested in running the scripts, you can clone the repo and run setup
npm run setup. Then you should be able to just run the scripts via
npx ts-node ./scripts/liquidity_mining/uni_v2.ts
Be warned, the borrow balance script can take more than 5 hours to complete
Feel free to let me know if you have any other questions, and I’ll see about getting that readme up to date.