Skip to content

Commit

Permalink
update pumpbtc DefiLlama#12379
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Nov 21, 2024
1 parent 2e88ca1 commit fbae322
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 16 additions & 1 deletion projects/helper/tokenMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,22 @@ const fixBalancesTokens = {
},
shido: {
'0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: "shido-2", decimals: 18 } // WSHIDO
}
},
ethereum: {
'0x777B2913b1BB171A83cA3cdf79CB40523Ac76fDb': { coingeckoId: "ignition-fbtc", decimals: 8 },
},
arbitrum: {
'0xbbeb34F9d50e0BABe1bd03Fd4120296354510529': { coingeckoId: "ignition-fbtc", decimals: 8 },
},
bsc: {
'0x2B25f4F134a56054b2b6388C2750F1eA3877e02b': { coingeckoId: "ignition-fbtc", decimals: 8 },
},
mantle: {
'0x93C6afA1882ea5E5bF403cA8fcb5aF87409EeCd0': { coingeckoId: "ignition-fbtc", decimals: 8 },
},
bob: {
'0xd681C5574b7F4E387B608ed9AF5F5Fc88662b37c': { coingeckoId: "ignition-fbtc", decimals: 8 },
},
}

ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) })
Expand Down
4 changes: 2 additions & 2 deletions projects/pumpbtc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { sumTokens } = require('../helper/sumTokens');
const utils = require('../helper/utils');
const { getConfig } = require('../helper/cache');
const bitcoinBook = require('../helper/bitcoin-book');
const { sumTokens2 } = require('../helper/unwrapLPs');

module.exports = {
methodology: 'TVL for pumpBTC is calculated based on the total value of WBTC, FBTC, BTCB held in the contract that were utilized in the minting process of pumpBTC.',
Expand All @@ -11,7 +12,6 @@ async function getStakingAddresses() {
let res = await utils.fetchURL('https://dashboard.pumpbtc.xyz/api/dashboard/asset/tokenowners')

const btcAddresses = res.data.data || {}
//console.log('>>', btcAddresses.length)
return btcAddresses
}

Expand All @@ -28,7 +28,7 @@ async function otherTvl(api) {
}

const { owners, tokens } = addresses[api.chain]
return api.sumTokens({ owners, tokens })
return sumTokens2({ api, owners, tokens })
}

module.exports.isHeavyProtocol = true;
Expand Down

0 comments on commit fbae322

Please sign in to comment.