InverseFinance / DeFi-Pulse-Adapters

DeFi Pulse Adapters - Official Repository so DeFi projects can keep their metrics up to date on DeFi Pulse
https://defipulse.com/
GNU Affero General Public License v3.0
0 stars 1 forks source link

Add INV adapter #3

Closed Slokh closed 3 years ago

Slokh commented 3 years ago

fixes #1

Latest report:

{
  "ethCallCount": 10,
  "timestamp": 1618862400,
  "block": 12272528,
  "output": {
    "WETH": {
      "balance": "5487.921142",
      "cmcId": 1027,
      "coingeckoId": "weth"
    },
    "WBTC": {
      "balance": "13.472673",
      "cmcId": 1,
      "coingeckoId": "wrapped-bitcoin"
    },
    "USDC": {
      "balance": "362867.602122",
      "cmcId": 3408,
      "coingeckoId": "usd-coin"
    },
    "DAI": {
      "balance": "6070483.111508",
      "cmcId": 4943,
      "coingeckoId": "dai"
    },
    "xsushi": {
      "balance": "117104.642497",
      "coingeckoId": "xsushi"
    },
    "yfi": {
      "balance": "103.865631",
      "coingeckoId": "yearn-finance"
    }
  }
}

The only thing I'm unsure about is the stabilizer calculation. Right now, I'm just using the DOLA supply in DAI.

I also need us to confirm what is the start time we should use, for now I just picked the first anchor tx.

Attached is a zip of various reports. The CSV generation doesn't work. tvl.zip

Slokh commented 3 years ago

Updated the stabilizer TVL calculation to use Stabilizer.supply() and changed category to assets

New TVL files are attached. tvl.zip

Slokh commented 3 years ago

Set start to vaults launch. Added logic to only include anchor TVL after anchor launch block #.

New TVL files tvl.zip

ghost commented 3 years ago

Merged upstream