Skip to content

Instantly share code, notes, and snippets.

Avatar
🗿

Guifel guifel

🗿
  • Zurich, Switzerland
View GitHub Profile
@guifel
guifel / subgraph-lp-minter-data.ts
Created Mar 7, 2021
Get RAI from LP token balances and debts
View subgraph-lp-minter-data.ts
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;
View cloudSettings
{"lastUpload":"2020-06-12T08:13:10.360Z","extensionVersion":"v3.4.3"}