Files
DefiLlama-Adapters/projects/wrappedBNB.js
2022-02-04 06:44:18 +00:00

14 lines
399 B
JavaScript

const retry = require('./helper/retry')
const axios = require("axios");
async function tvl() {
const totals = (await retry(async bail =>
await axios.get('https://api.data.kava.io/bank/total'))).data.result.supply;
const bnb = (totals.filter(a => a.denom == 'bnb'))[0];
const supply = bnb.amount / 10 ** 8;
return { 'binancecoin': supply };
};
module.exports = {
tvl
};