mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
27 lines
1002 B
JavaScript
27 lines
1002 B
JavaScript
const { sumTokens } = require('../helper/chain/bitcoin');
|
|
const bitcoinAddressBook = require('../helper/bitcoin-book/index.js');
|
|
const { getConfig } = require('../helper/cache.js');
|
|
|
|
async function tvl() {
|
|
return sumTokens({ owners: await bitcoinAddressBook.solvBTCLST() })
|
|
}
|
|
|
|
const solvbtclstListUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solvbtc-lst.json';
|
|
|
|
async function evmTVL(api) {
|
|
let solvbtclst = await getConfig('solv-protocol/solv-btc-lst-evm', solvbtclstListUrl)
|
|
let { depositAddress: owners, tokens } = solvbtclst[api.chain]?.otherDeposit ?? {}
|
|
return api.sumTokens({ owners, tokens })
|
|
}
|
|
|
|
module.exports = {
|
|
methodology: 'Staked tokens via Babylon and Core are counted towards TVL, as they represent the underlying BTC assets securing their respective networks.',
|
|
doublecounted: true,
|
|
timetravel: false,
|
|
bitcoin: { tvl }
|
|
}
|
|
|
|
const chains = ['ethereum']
|
|
chains.forEach(chain => {
|
|
module.exports[chain] = { tvl: evmTVL }
|
|
}) |