Files
DefiLlama-Adapters/projects/sovryn.js
2022-05-03 23:39:28 +05:30

12 lines
391 B
JavaScript

const retry = require('async-retry')
const axios = require("axios");
async function fetch() {
let tvl_feed = await retry(async bail => await axios.get('https://backend.sovryn.app/tvl'))
let tvl = tvl_feed.data.tvlLending.totalUsd + tvl_feed.data.tvlAmm.totalUsd + tvl_feed.data.tvlProtocol.totalUsd + tvl_feed.data.tvlSubprotocols.totalUsd;
return tvl;
}
module.exports = {
fetch
}