Skip to content

Commit df0611a

Browse files
Merge branch 'DefiLlama:main' into main
2 parents 5034e65 + 189aa04 commit df0611a

File tree

824 files changed

+16531
-6169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

824 files changed

+16531
-6169
lines changed

package-lock.json

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@solana/web3.js": "^1.87.6",
3030
"@solendprotocol/solend-sdk": "^0.4.3",
3131
"@supercharge/promise-pool": "^2.1.0",
32+
"async-retry": "^1.3.3",
3233
"axios": "^1.6.5",
3334
"bignumber.js": "^9.0.1",
3435
"blakejs": "^1.2.1",

projects/1776meme/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const ADDRESSES = require('../helper/coreAssets.json')
2+
const { sumTokensExport, nullAddress } = require('../helper/unwrapLPs')
3+
4+
const config = {
5+
ethereum: { contract: '0xDFcB2aB25b7978C112E9E08a2c70d52b035F1776', tokens: [nullAddress, ADDRESSES.ethereum.WETH, '0x8d0d000ee44948fc98c9b98a4fa4921476f08b0d'] }
6+
}
7+
8+
Object.keys(config).forEach(chain => {
9+
module.exports[chain] = {
10+
tvl: sumTokensExport({ owner: config[chain].contract, tokens: config[chain].tokens, })
11+
}
12+
})

projects/1dex/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ async function eos() {
88
["eosio.token", "EOS", "eos"],
99
["usdt.xsat", "USDT", "tether"],
1010
["btc.xsat", "BTC", "bitcoin"],
11+
["core.vaulta", "A", "vaulta"],
12+
["usdc.xsat", "USDC", "usd-coin"],
1113
];
1214
return await get_account_tvl(accounts, tokens, "eos");
1315
}

projects/1inch.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ const config = require("./1inch/config");
55

66
module.exports = {}
77

8+
const WETH = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
9+
const ETH_PLACEHOLDER = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';
10+
11+
function normalizeToken(address) {
12+
return address.toLowerCase() === ETH_PLACEHOLDER ? WETH : address;
13+
}
14+
815
Object.keys(config).forEach(chain => {
916
const { blacklistedTokens = [], factories } = config[chain]
1017
module.exports[chain] = {
@@ -19,9 +26,12 @@ Object.keys(config).forEach(chain => {
1926
onlyArgs: true,
2027
fromBlock,
2128
})
22-
logs.forEach(i => ownerTokens.push([[i.token1, i.token2], i.mooniswap]))
29+
30+
logs.forEach(({ token1, token2, mooniswap }) => {
31+
ownerTokens.push([[normalizeToken(token1), normalizeToken(token2)], mooniswap]);
32+
});
2333
}
24-
return sumTokens2({ api, ownerTokens, blacklistedTokens, sumChunkSize: 50, })
34+
return sumTokens2({ api, ownerTokens, blacklistedTokens, sumChunkSize: 1000, sumChunkSleep: 2000 })
2535
}
2636
}
2737
})

projects/1inch/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ module.exports = {
4242
'0x3fa729b4548becbad4eab6ef18413470e6d5324c',
4343
'0xcd62b1c403fa761baadfc74c525ce2b51780b184',
4444
'0x30dcf96a8a0c742aa1f534fac79e99d320c97901',
45-
'0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341'
45+
'0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341',
46+
'0x18acf236eb40c0d4824fb8f2582ebbecd325ef6a'
4647
]
4748
},
4849
}

projects/3xcalibur/index.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
const { uniTvlExport } = require("../helper/calculateUniTvl.js");
21

3-
module.exports = {
4-
misrepresentedTokens: true,
5-
start: '2022-11-06',
6-
arbitrum: {
7-
tvl: uniTvlExport("0xD158bd9E8b6efd3ca76830B66715Aa2b7Bad2218", "arbitrum", undefined, undefined, { hasStablePools: true, useDefaultCoreAssets: true, }),
8-
},
9-
hallmarks: [[1668038400, "Emissions started"]],
10-
};
2+
const { uniTvlExports } = require('../helper/unknownTokens')
3+
module.exports = uniTvlExports({
4+
'arbitrum': '0xD158bd9E8b6efd3ca76830B66715Aa2b7Bad2218'
5+
}, { hasStablePools: true, hallmarks: [[1668038400, "Emissions started"]], })

projects/40acres/helpers.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,26 @@ const { erc4626Abi, fortyAcresAbi } = require('./abi');
22

33
const vaultMapping = {
44
optimism: '0x08dCDBf7baDe91Ccd42CB2a4EA8e5D199d285957',
5-
base: '0xB99B6dF96d4d5448cC0a5B3e0ef7896df9507Cf5'
5+
base: '0xB99B6dF96d4d5448cC0a5B3e0ef7896df9507Cf5',
6+
avax: '0xbeD7C02887EfD6b5Eb9A547Ac1A4D5e582791647'
67
}
78

89
const fortyAcresMapping = {
910
optimism: '0xf132bD888897254521D13e2c401e109caABa06A7',
10-
base: '0x87f18b377e625b62c708D5f6EA96EC193558EFD0'
11+
base: '0x87f18b377e625b62c708D5f6EA96EC193558EFD0',
12+
avax: '0xf6A044c3b2a3373eF2909E2474f3229f23279B5F'
1113
}
1214

1315
const baseTokenMapping = {
1416
optimism: '0x3c8B650257cFb5f272f799F5e2b4e65093a11a05', // VELO
1517
base: '0x940181a94A35A4569E4529A3CDfB74e38FD98631', // AERO
18+
avax: '0xaaab9d12a30504559b0c5a9a5977fee4a6081c6b' // PHAR
1619
}
1720

1821
const veNftMapping = {
1922
optimism: '0xFAf8FD17D9840595845582fCB047DF13f006787d', // veVELO
2023
base: '0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4', // veAERO
24+
avax: '0xAAAEa1fB9f3DE3F70E89f37B69Ab11B47eb9Ce6F' // vePHAR
2125
}
2226

2327
// get the underlying asset of each erc4626 vault

projects/40acres/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { unwrapSolidlyVeNft } = require('../helper/unwrapLPs');
44

55

66
async function getLockedVeNFTBalance(api) {
7-
await unwrapSolidlyVeNft({ api, baseToken: baseTokenMapping[api.chain], veNft: veNftMapping[api.chain], owner: fortyAcresMapping[api.chain] })
7+
await unwrapSolidlyVeNft({ api, baseToken: baseTokenMapping[api.chain], veNft: veNftMapping[api.chain], owner: fortyAcresMapping[api.chain], isAltAbi: api.chain === 'avax' });
88
await api.sumTokens({ owner: fortyAcresMapping[api.chain], tokens: [baseTokenMapping[api.chain]] },)
99
}
1010

@@ -28,4 +28,5 @@ module.exports = {
2828
methodology: `TVL is comprised of tokens deposited to the protocol as collateral and tokens deposited to the vault for lending. Borrowed tokens are not counted towards TVL.`,
2929
base: { tvl: tvl, borrowed: borrowed },
3030
optimism: { tvl: tvl, borrowed: borrowed },
31+
avax : { tvl: tvl, borrowed: borrowed }
3132
}

projects/AIDApp/index.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1-
const sdk = require('@defillama/sdk')
1+
const { sumTokensExport, nullAddress } = require('../helper/unwrapLPs')
22

33
const CORE_POOL_ADDRESS = "0xC439be7A5623bA800E7450F2cb6eDBc5A1983685"
4-
const CORE_CHAIN = "core"
5-
6-
async function coreTvl(timestamp, block, chainBlocks) {
7-
const balances = {}
8-
const balance = await sdk.api.eth.getBalance({
9-
target: CORE_POOL_ADDRESS,
10-
block: chainBlocks[CORE_CHAIN],
11-
chain: CORE_CHAIN
12-
})
13-
sdk.util.sumSingleBalance(balances, "core:0x0000000000000000000000000000000000000000", balance.output)
14-
return balances
15-
}
164

175
module.exports = {
186
methodology: 'counts the number of NATIVE tokens in the Pool Bonding contract.',
19-
start: 24495957,
207
core: {
21-
tvl:coreTvl,
8+
tvl:sumTokensExport({ owner: CORE_POOL_ADDRESS, tokens: [nullAddress]}),
229
}
2310
}

0 commit comments

Comments
 (0)