From 9d8d2e3e9c52f91c627d8daf48d01f802da9882e Mon Sep 17 00:00:00 2001 From: g1ntoki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 16 Sep 2024 09:41:03 +0200 Subject: [PATCH] bitstable: track staking #11638 --- projects/bitstable-finance/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/projects/bitstable-finance/index.js b/projects/bitstable-finance/index.js index 39f2780ef949..55319ab1ef0d 100644 --- a/projects/bitstable-finance/index.js +++ b/projects/bitstable-finance/index.js @@ -3,12 +3,20 @@ const { sumTokensExport } = require("../helper/sumTokens"); const sdk = require('@defillama/sdk') const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); +const BB_STAKE_CONTRACT = '0x8816353DA8A4D45E81C509A54AdbA8E57908958f' +const BB_STAKE_ABI = 'function totalStakedAmount() view returns (uint256)' + const owner = "0x103dd1184599c7511a3016E0a383E11F84AE7173"; const tokens = { ethereum: [ADDRESS.ethereum.USDT], bsc: [ADDRESS.ethereum.FDUSD], }; +const bbInBouncebitStaking = async (api) => { + const staked = await api.call({ target: BB_STAKE_CONTRACT, abi: BB_STAKE_ABI }) + api.addCGToken('bouncebit', staked/1e18) +} + module.exports = { methodology: "Staking tokens via BitStable counts as TVL", bitcoin: { @@ -28,6 +36,9 @@ module.exports = { blacklistedTokens: ["DAII"], }), }, + bouncebit: { + staking: bbInBouncebitStaking, + }, }; Object.keys(tokens).map((chain) => {