Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multibit #11644

Merged
merged 3 commits into from
Sep 24, 2024
Merged

Multibit #11644

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions projects/multibit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ const BRIDGE_TOKENS = "https://api.multibit.exchange/support/token";

const config = {
// https://app.multibit.exchange/staking
ethereum: { stakingPool: "0x2EDfFbc62C3dfFD2a8FbAE3cd83A986B5bbB5495", tokens: [ADDRESSES.null, ADDRESSES.ethereum.USDT] },
ethereum: { stakingPool: "0x2EDfFbc62C3dfFD2a8FbAE3cd83A986B5bbB5495", tokens: [ADDRESSES.null, ADDRESSES.ethereum.USDT], chainKey: 'eth' },
bsc: {},
polygon: {},
bouncebit: { chainKey: 'bb'},
}
module.exports = {
methodology: `Tokens bridged via MultiBit are counted as TVL`,
Expand All @@ -20,18 +21,17 @@ module.exports = {
'bc1pyyms2ssr0hagy5j50r5n689e6ye0626v3c98j5fw0jk6tz3vrgts7nt56g', // cold wallet
'bc1qmcrpqanjnrw58y0fvq08fqchgxv5aylctew7vxlkalfns3rpedxsx4hxpu', // cold wallet
],
blacklistedTokens: ['MUBI', 'BSSB']
blacklistedTokens: ['MUBI', 'BSSB', 'savm'] // more SAVM is bridged than circulating supply according to coingecko & etherscan
}),

},
}
Object.keys(config).forEach(chain => {
const { stakingPool, tokens = [ADDRESSES.null] } = config[chain]
const { stakingPool, tokens = [ADDRESSES.null], chainKey = chain } = config[chain]
module.exports[chain] = {
tvl: async (api) => {
const data = await getConfig('multibit', BRIDGE_TOKENS)
const key = chain === 'ethereum' ? 'eth': chain
const owner = data.find(v => v.chain === key)?.real?.contract
const owner = data.find(v => v.chain === chainKey)?.real?.contract
if (!owner) return {}
return api.sumTokens({ owner, tokens, })
}
Expand Down
Loading