Skip to content

Commit

Permalink
Merge branch 'main' into firoza
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki authored Aug 12, 2024
2 parents 30eb741 + 964ca72 commit 532f709
Show file tree
Hide file tree
Showing 111 changed files with 826 additions and 1,175 deletions.
13 changes: 13 additions & 0 deletions projects/Astra/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { getUniTVL } = require('../helper/unknownTokens')

const FACTORY = "0x2b6852CeDEF193ece9814Ee99BE4A4Df7F463557" // This factory is on AirDAO Mainnet (Chain Id: 16718)

const dexTVL = getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true, fetchBalances: true, })

module.exports = {
misrepresentedTokens: true,
methodology: `Uses factory(${FACTORY}) address to find and price Liquidity Pool pairs.`,
airdao: {
tvl: dexTVL
}
};
2 changes: 1 addition & 1 deletion projects/aark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function tvl(api) {
return api.sumTokens({ owner: VAULT_CONTRACT_ADDRESS, tokens: [
ADDRESSES.arbitrum.WETH,
ADDRESSES.arbitrum.USDC,
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', //FRAX
ADDRESSES.arbitrum.FRAX, //FRAX
ADDRESSES.arbitrum.USDC_CIRCLE,
ADDRESSES.arbitrum.WSTETH,
ADDRESSES.arbitrum.DAI,
Expand Down
8 changes: 4 additions & 4 deletions projects/airpuff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ module.exports = {
tvl: async (api) => {
const KUSDC = {
vault: "0x4c18E80b801AA24066D8B1C6E65ee245497Cb741",
token: "0xa415021bC5c4C3b5B989116DC35Ae95D9C962c8D",
token: ADDRESSES.karak.USDC,
};

const KWETH = {
vault: "0x9a9631F7BEcE5C6E0aBA1f73f0e5796c534dc4db",
token: "0x4200000000000000000000000000000000000006",
token: ADDRESSES.optimism.WETH_1,
};

const wethLending = {
vault: "0xd6034F9147CF7528e857403Dea93bc45743295eb",
token: "0x4200000000000000000000000000000000000006",
token: ADDRESSES.optimism.WETH_1,
};

const usdcLending = {
vault: "0x475820E4bCE0E3d233Ad7f6A8c9DD1f66974c5d6",
token: "0xa415021bC5c4C3b5B989116DC35Ae95D9C962c8D",
token: ADDRESSES.karak.USDC,
};

const KarakUSDCBal = await api.call({ target: KUSDC.vault, abi: contractAbis.getTotalSupply });
Expand Down
20 changes: 7 additions & 13 deletions projects/akronswap/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
const { getUniTVL } = require('../helper/unknownTokens');


const tvl = getUniTVL({ factory: '0xAf39606bec181887951Ab6912Ac7EA216Bd6E4B4', useDefaultCoreAssets: true, fetchBalances: true, })

module.exports = {
misrepresentedTokens: true,
ethereum:{
tvl: getUniTVL({ factory: '0x6624Ac5F9abFA36174511607860e81C8dB9e84E9', useDefaultCoreAssets: true, fetchBalances: true, }),
},
arbitrum:{
tvl: getUniTVL({ factory: '0x40Cbdf84475f8Dd7C9a9c665eDE551EeaaF21F8d', useDefaultCoreAssets: true, fetchBalances: true, }),
},
base:{
tvl: getUniTVL({ factory: '0xD2156Bb9ed200FE88705443BfFcA788BA8b205f6', useDefaultCoreAssets: true, fetchBalances: true, }),
},
bsc:{
tvl: getUniTVL({ factory: '0x40Cbdf84475f8Dd7C9a9c665eDE551EeaaF21F8d', useDefaultCoreAssets: true, fetchBalances: true, }),
},
ethereum: { tvl, },
arbitrum: { tvl, },
base: { tvl, },
bsc: { tvl, },
}
26 changes: 26 additions & 0 deletions projects/alienworlds/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { get_account_tvl } = require("../helper/chain/eos");

const accounts = ["nftmt.worlds", "stake.worlds", "lore.worlds", "arena.worlds", "boost.worlds"]

// AlienWorlds
// https://alienworlds.io/
async function wax() {
const tokens = [
["eosio.token", "WAX", "wax"],
];
return await get_account_tvl(accounts, tokens, "wax");
}
async function staking() {
const tokens = [
["alien.worlds", "TLM", "alien-worlds"],
];
return await get_account_tvl(accounts, tokens, "wax");
}

module.exports = {
methodology: `AlienWorlds TVL is achieved by querying token balances from Staking, Voting & Gaming smart contract(s).`,
wax: {
tvl: wax,
staking,
},
}
29 changes: 29 additions & 0 deletions projects/alphaX-protocol/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const ADDRESSES = require('../helper/coreAssets.json');
const { sumTokensExport } = require('../helper/unwrapLPs');

const tokens = [
ADDRESSES.ethereum.USDT,
];

const walletAddresses = {
ethereum: ['0xA61a6E696B7C566DA42B80dA27d96e7104bcec99'],
arbitrum: ['0x552E7A55802f3350C707a243E402aa50Eda9D286']

};

const tokenAddress = {
ethereum: [ADDRESSES.ethereum.USDT],
arbitrum: [ADDRESSES.arbitrum.USDT],


}

module.exports = {
ethereum: {
tvl: sumTokensExport({ owners: walletAddresses.ethereum, tokens: tokenAddress.ethereum }),
},
arbitrum: {
tvl: sumTokensExport({ owners: walletAddresses.arbitrum, tokens: tokenAddress.arbitrum }),
},

};
35 changes: 18 additions & 17 deletions projects/alphafi/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const ADDRESSES = require('../helper/coreAssets.json')
const sui = require("../helper/chain/sui")
const { addUniV3LikePosition } = require("../helper/unwrapLPs")

Expand All @@ -7,58 +8,58 @@ const ALPHAFI_CETUS_TVL_IDS = [
poolID: "0x30066d9879374276dc01177fbd239a9377b497bcd347c82811d75fcda35b18e5",
cetusPoolID: "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20",
investorID: "0x87a76889bf4ed211276b16eb482bf6df8d4e27749ebecd13017d19a63f75a6d5",
token0Type: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN",
token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN"
token0Type: ADDRESSES.sui.USDT,
token1Type: ADDRESSES.sui.USDC
},
{
poolID: "0xa7239a0c727c40ee3a139689b16b281acfd0682a06c23531b184a61721ece437",
cetusPoolID: "0x0e809689d04d87f4bd4e660cd1b84bf5448c5a7997e3d22fc480e7e5e0b3f58d",
investorID: "0x1b923520f19660d4eb013242c6d03c84fdea034b8f784cfd71173ef72ece50e1",
token0Type: "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY",
token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN"
token1Type: ADDRESSES.sui.USDC
},
{
poolID: "0xee6f6392cbd9e1997f6e4cf71db0c1ae1611f1f5f7f23f90ad2c64b8f23cceab",
cetusPoolID: "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630",
investorID: "0xb6ca8aba0fb26ed264a3ae3d9c1461ac7c96cdcbeabb01e71086e9a8340b9c55",
token0Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
token1Type: "0x2::sui::SUI"
token0Type: ADDRESSES.sui.USDC,
token1Type: ADDRESSES.sui.SUI
},
{
poolID: "0x676fc5cad79f51f6a7d03bfa3474ecd3c695d322380fc68e3d4f61819da3bf8a",
cetusPoolID: "0xaa57c66ba6ee8f2219376659f727f2b13d49ead66435aa99f57bb008a64a8042",
investorID: "0x9ae0e56aa0ebc27f9d8a17b5a9118d368ba262118d878977b6194a10a671bbbc",
token0Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
token1Type: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN"
token0Type: ADDRESSES.sui.USDC,
token1Type: ADDRESSES.sui.WBTC
},
{
poolID: "0xbdf4f673b34274f36be284bca3f765083380fefb29141f971db289294bf679c6",
cetusPoolID: "0x5b0b24c27ccf6d0e98f3a8704d2e577de83fa574d3a9060eb8945eeb82b3e2df",
investorID: "0x05fa099d1df7b5bfb2e420d5ee2d63508db17c40ce7c4e0ca0305cd5df974e43",
token0Type: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN",
token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN"
token0Type: ADDRESSES.sui.WETH,
token1Type: ADDRESSES.sui.USDC
},
{
poolID: "0x045e4e3ccd383bedeb8fda54c39a7a1b1a6ed6a9f66aec4998984373558f96a0",
cetusPoolID: "0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703",
investorID: "0xdd9018247d579bd7adfdbced4ed39c28821c6019461d37dbdf32f0d409959b1c",
token0Type: "0xa99b8952d4f7d947ea77fe0ecdcc9e5fc0bcab2841d6e2a5aa00c3044e5544b5::navx::NAVX",
token1Type: "0x2::sui::SUI"
token1Type: ADDRESSES.sui.SUI
},
{
poolID: "0x59ff9c5df31bfd0a59ac8393cf6f8db1373252e845958953e6199952d194dae4",
cetusPoolID: "0x81fe26939ed676dd766358a60445341a06cea407ca6f3671ef30f162c84126d5",
investorID: "0x8051a9ce43f9c21e58331b1ba2b1925e4ae4c001b1400459236d86d5d3d2888b",
token0Type: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK",
token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN"
token0Type: ADDRESSES.sui.BUCK,
token1Type: ADDRESSES.sui.USDC
},

]

const ALPHAFI_NAVI_TVL_IDS = [
{
poolID: "0x643f84e0a33b19e2b511be46232610c6eb38e772931f582f019b8bbfb893ddb3",
tokenType: "0x2::sui::SUI",
tokenType: ADDRESSES.sui.SUI,
expo: 9
},
{
Expand All @@ -68,17 +69,17 @@ const ALPHAFI_NAVI_TVL_IDS = [
},
{
poolID: "0xc696ca5b8f21a1f8fcd62cff16bbe5a396a4bed6f67909cfec8269eb16e60757",
tokenType: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN",
tokenType: ADDRESSES.sui.USDT,
expo: 6,
},
{
poolID: "0x01493446093dfcdcfc6c16dc31ffe40ba9ac2e99a3f6c16a0d285bff861944ae",
tokenType: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
tokenType: ADDRESSES.sui.USDC,
expo: 6
},
{
poolID: "0xe4eef7d4d8cafa3ef90ea486ff7d1eec347718375e63f1f778005ae646439aad",
tokenType: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN",
tokenType: ADDRESSES.sui.WETH,
expo: 8
},
]
Expand All @@ -88,7 +89,7 @@ const ALPHAFI_POOL2_IDS = [{
cetusPoolID: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720",
investorID: "0x46d901d5e1dba34103038bd2ba789b775861ea0bf4d6566afd5029cf466a3d88",
token0Type: "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA",
token1Type: "0x2::sui::SUI"
token1Type: ADDRESSES.sui.SUI
},
]

Expand Down
10 changes: 5 additions & 5 deletions projects/angle/addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const TreasuryTokenAddresses = {
ADDRESSES.ethereum.CVX,
'0x875773784Af8135eA0ef43b5a374AaD105c5D39e',
'0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
'0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0',
ADDRESSES.ethereum.FXS,
'0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F',
'0x4da27a545c0c5B758a6BA100e3a049001de870f5',
ADDRESSES.ethereum.USDC,
Expand Down Expand Up @@ -122,7 +122,7 @@ const chains = [
const tokens = {
ethereum: {
EURA: '0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8',
stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23',
stEUR: ADDRESSES.celo.STEUR,
USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274',
stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776',
bC3M: '0x2F123cF3F37CE3328CC9B5b8415f9EC5109b45e7',
Expand All @@ -133,7 +133,7 @@ const tokens = {
},
arbitrum: {
EURA: '0xFA5Ed56A203466CbBC2430a43c66b9D8723528E7',
stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23',
stEUR: ADDRESSES.celo.STEUR,
USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274',
stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776',
},
Expand All @@ -154,7 +154,7 @@ const tokens = {
},
xdai: {
EURA: '0x4b1E2c2762667331Bc91648052F646d1b0d35984',
stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23',
stEUR: ADDRESSES.celo.STEUR,
USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274',
stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776',
},
Expand All @@ -165,7 +165,7 @@ const tokens = {
},
celo: {
EURA: '0xC16B81Af351BA9e64C1a069E3Ab18c244A1E3049',
stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23',
stEUR: ADDRESSES.celo.STEUR,
USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274',
stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776',
},
Expand Down
1 change: 1 addition & 0 deletions projects/aura-finance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const config = {
xdai: { factory: '0x83E443EF4f9963C77bd860f94500075556668cb8', fromBlock: 27088527, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' },
polygon_zkevm: { factory: '0x2498A2B0d6462d2260EAC50aE1C3e03F4829BA95', fromBlock: 203652, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' },
avax: { factory: '0xf23b4DB826DbA14c0e857029dfF076b1c0264843', fromBlock: 32558551, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' },
fraxtal: { factory: '0xc3ccacE87f6d3A81724075ADcb5ddd85a8A1bB68', fromBlock: 4712390, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' },
}

module.exports = {
Expand Down
16 changes: 16 additions & 0 deletions projects/avalance-btc/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const sdk = require('@defillama/sdk');
const { sumTokensExport } = require('../helper/sumTokens');

//https://support.avax.network/en/articles/6349640-how-does-the-avalanche-bridge-work
const owners = [
'bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', // https://prnt.sc/unrBvLvw3z1t
]

module.exports = {
methodology: 'BTC wallets on bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90',
bitcoin: {
tvl: sdk.util.sumChainTvls([
sumTokensExport({ owners }),
]),
},
};
14 changes: 14 additions & 0 deletions projects/balus/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const ADDRESSES = require("../helper/coreAssets.json")
const { sumTokensExport } = require("../helper/chain/ton")
const CONTRACT = "EQDswKn606G8kwS8RuUJg9baJbgAhixb6bYJC6VmIPU873uq"

module.exports = {
methodology: "Counts all TON balance in the smart contract as the TVL",
timetravel: false,
ton: {
tvl: sumTokensExport({
owners: [CONTRACT],
tokens: ADDRESSES.ton.TON,
})
},
};
2 changes: 1 addition & 1 deletion projects/bifi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const chainPools = {
UnifiedDAI: { pool: '0x2168dAb12A6A93181bbAD9C9dc769307C36fB45C', token: ADDRESSES.bfc.UnifiedDAI },
UnifiedWBTC: { pool: '0xEa3b4a2dA5DbE8379AD4c60aaD5184df69D7C9AD', token: ADDRESSES.bfc.WBTC},
UnifiedBTCB: { pool: '0x0B31FeE8bF53bFe2f5F7083B73A4c9C8B517E32F', token: ADDRESSES.bfc.BTCB},
BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: '0x6906Ccda405926FC3f04240187dd4fAd5DF6d555' }
BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: ADDRESSES.bfc.BitcoinUSD }
},
}

Expand Down
13 changes: 13 additions & 0 deletions projects/bitdrome/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
async function tvl(api) {
const TwoPoolFactory = '0x634FB7F07BDb77281c64a57F69E1EB19583E727a'
const pools = await api.fetchList({ lengthAbi: 'pool_count', itemAbi: 'pool_list', target: TwoPoolFactory })
const tokens = await api.multiCall({ target: TwoPoolFactory, calls: pools, abi: 'function get_coins(address _pool) view returns (address[2])' })
const ownerTokens = tokens.map((v, i) => [v, pools[i]])
return api.sumTokens({ ownerTokens })
}

module.exports = {
bevm: {
tvl
}
}
3 changes: 2 additions & 1 deletion projects/blasterswap-vaults/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const ADDRESSES = require('../helper/coreAssets.json')
const { staking } = require("../helper/staking.js");

const vaults = ['0xC52fb7E613e401a0195C2fdB369618580D58C91D', '0x013249266842e078999088807033D80531A84260'];
const tokens = ['0xd43D8aDAC6A4C7d9Aeece7c3151FcA8f23752cf8', '0x5ffd9EbD27f2fcAB044c0f0a26A45Cb62fa29c06'];

module.exports = {
blast: {
tvl: staking('0x0464a36beCf9967111D2dCAb57CAf4a2376f6E3F', '0xb1a5700fa2358173fe465e6ea4ff52e36e88e2ad'),
tvl: staking('0x0464a36beCf9967111D2dCAb57CAf4a2376f6E3F', ADDRESSES.blast.BLAST),
staking: staking(vaults, tokens)
},
}
2 changes: 1 addition & 1 deletion projects/bracket-fi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const config = {
"0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8",
"0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe",
"0x4186BFC76E2E237523CBC30FD220FE055156b41F",
"0x2416092f143378750bb29b79eD961ab195CcEea5"
ADDRESSES.blast.ezETH
]
},
}
Expand Down
2 changes: 1 addition & 1 deletion projects/bridgers-ai/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const tokensConf = {
TON: ADDRESSES.ton.TON,
USDT: ADDRESSES.ton.USDT,
USDC: ADDRESSES.ton.USDC,
NOT: 'EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT',
NOT: ADDRESSES.ton.NOT,
},
era: {
ETH: nullAddress,
Expand Down
Loading

0 comments on commit 532f709

Please sign in to comment.