From 3337adb2f6af1a706b46266797913d627cd3e4bc Mon Sep 17 00:00:00 2001 From: chuyan Date: Wed, 3 Dec 2025 14:06:49 +0800 Subject: [PATCH] Add LVT vault TVL for Zoo Finance --- projects/zoofi-io/index.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/projects/zoofi-io/index.js b/projects/zoofi-io/index.js index 27760c9e467..1125952eec3 100644 --- a/projects/zoofi-io/index.js +++ b/projects/zoofi-io/index.js @@ -60,8 +60,35 @@ async function tvlLNT(api) { } } +const lvts = { + bsc: [ + { + // Filecoin LvtVault + asset: '0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153', + vt: '0x24ef95c39dfaa8f9a5adf58edf76c5b22c34ef46', + vtHook: '0xed202a7050ee856ba9f0d3cd5eabcab6b8a23a88', + } + ], +} + +async function tvlLVT(api) { + const lvtConfigs = lvts[api.chain] || [] + for (const lvt of lvtConfigs) { + const decimals = await api.call({ abi: 'erc20:decimals', target: lvt.vt }) + const oneVT = BigNumber(10).pow(decimals).toString() + + const [totalSupply, unitPrice] = await api.batchCall([ + { abi: 'erc20:totalSupply', target: lvt.vt }, + { abi: 'function getAmountOutVTforT(uint256) view returns (uint256)', target: lvt.vtHook, params: [oneVT] } + ]) + + api.add(lvt.asset, BigNumber(totalSupply).times(unitPrice).div(oneVT).toFixed(0)) + } +} + module.exports = { doublecounted: true, berachain: { tvl }, - arbitrum: { tvl: tvlLNT } + arbitrum: { tvl: tvlLNT }, + bsc: { tvl: tvlLVT } } \ No newline at end of file