Skip to content

Commit a637ddf

Browse files
fix StakeStone BeraVault TVL calculation: add Boyco deployed amount (DefiLlama#12880)
Co-authored-by: g1nt0ki <[email protected]>
1 parent 4c25824 commit a637ddf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

projects/stakestone-berastone/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1+
const ADDRESSES = require('../helper/coreAssets.json')
2+
13
const vaultABI = {
2-
"getUnderlyings": "function getUnderlyings() external view returns (address[])"
4+
"getUnderlyings": "function getUnderlyings() external view returns (address[])",
5+
"assetsBorrowed": "function assetsBorrowed() external view returns (uint256)"
36
}
47

58
const Vault = '0x8f88aE3798E8fF3D0e0DE7465A0863C9bbB577f0';
69

710
const Tvl = async (api) => {
11+
const usedTVL = await api.call({ abi: vaultABI.assetsBorrowed, target: Vault })
12+
api.add(ADDRESSES.ethereum.WETH, usedTVL);
13+
814
const underlyings = await api.call({ abi: vaultABI.getUnderlyings, target: Vault })
915
return api.sumTokens({ owner: Vault, tokens: underlyings })
1016
}
1117

1218
module.exports = {
19+
doublecounted: true,
1320
ethereum: {
1421
tvl: Tvl,
1522
}

0 commit comments

Comments
 (0)