mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
32 lines
709 B
JavaScript
32 lines
709 B
JavaScript
const retry = require('./helper/retry')
|
|
const axios = require("axios");
|
|
|
|
async function fetch() {
|
|
var response = await retry(async bail => await axios.get('http://solyard.finance/tvl'))
|
|
|
|
return response.data.total - response.data['YARDv1'] - response.data['YARDv1-USDC'];
|
|
}
|
|
|
|
async function staking() {
|
|
var response = await retry(async bail => await axios.get('http://solyard.finance/tvl'))
|
|
|
|
return response.data['YARDv1'];
|
|
}
|
|
|
|
async function pool2() {
|
|
var response = await retry(async bail => await axios.get('http://solyard.finance/tvl'))
|
|
|
|
return response.data['YARDv1-USDC'];
|
|
}
|
|
|
|
module.exports = {
|
|
timetravel: false,
|
|
staking:{
|
|
fetch:staking
|
|
},
|
|
pool2:{
|
|
fetch: pool2
|
|
},
|
|
fetch
|
|
}
|