Skip to content

Instantly share code, notes, and snippets.

@thowar2
thowar2 / bal_redistribution.ts
Created March 30, 2021 04:30 — forked from kevinzhangTO/bal_redistribution.ts
Rough calculation of balancer reward redistribution
import { ethers } from "ethers";
import { parseUnits } from "ethers/lib/utils";
import fs from "fs";
import fetch from "node-fetch";
import path from "path";
const START_BLOCK = 11905930;
const END_BLOCK = 12111455;
const SNAPSHOT_BLOCK_DELTA = 240; // 240 blocks; Rougly 1 hr between snapshots