Skip to content

Instantly share code, notes, and snippets.

View guifel's full-sized avatar
🗿

Guifel guifel

🗿
View GitHub Profile
{"lastUpload":"2020-06-12T08:13:10.360Z","extensionVersion":"v3.4.3"}
@guifel
guifel / subgraph-lp-minter-data.ts
Created March 7, 2021 11:49
Get RAI from LP token balances and debts
import Axios from "axios";
import * as fs from "fs";
const SUBGRAPH_URL =
"https://subgraph.reflexer.finance/subgraphs/name/reflexer-labs/rai";
const main = async () => {
// RAI reserve / LP total supply
const lpToRaiCoefficient = 28660219.789 / 1283759.973;
const accumulatedRate = 1.0009347896036;