Skip to content

Commit 4564827

Browse files
authored
Merge branch 'DefiLlama:main' into main
2 parents dcc4cc3 + e97c189 commit 4564827

File tree

95 files changed

+1743
-1104
lines changed

Some content is hidden

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

95 files changed

+1743
-1104
lines changed

pnpm-lock.yaml

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

projects/aarna/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ const { generateAtvExport } = require('../helper/atv-helper');
33

44
// Configuration for all Aarna ATV vaults across chains
55
const AARNA_CONFIG = {
6-
methodology: 'TVL is calculated using direct on-chain storage contract queries via calculatePoolInUsd function for each âtv vault. This includes âtv802 (quant AI), âtv808 (asymmetric alpha), and âtv111 (multi layer yield) vaults deployed across Ethereum, Arbitrum, and Sonic chains.',
6+
methodology: `TVL: Total value of all coins held in the smart contracts of the protocol
7+
Fees: 1% deposit and 10% profit sharing (whereever applicable) fees from the vaults`,
78

89
// Vault addresses by chain and type
910
vaults: {
1011
ethereum: {
1112
'ATV-802': "0xb68e430c56ed9e548e864a68a60f9d41f993b32c",
1213
'ATV-808': "0x60697825812ecC1Fff07f41E2d3f5cf314674Fa6",
13-
'ATV-111': "0x72ec8447074dc0bfbedfb516cc250b525f3a4aba"
14+
'ATV-111': "0x72ec8447074dc0bfbedfb516cc250b525f3a4aba",
15+
'ATVPTMAX': "0xb9C1344105FaA4681bc7FFd68c5c526DA61F2AE8"
1416
},
1517
arbitrum: {
1618
'ATV-111': "0xe1a6bda42fbafae38607598386a1050613c1a64b"

projects/aave-horizon/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const { aaveV3Export } = require("../helper/aave");
2+
3+
const CONFIG = {
4+
ethereum: ['0x53519c32f73fE1797d10210c4950fFeBa3b21504'],
5+
6+
};
7+
8+
module.exports = aaveV3Export(CONFIG)

projects/aave-v3/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { aaveV3Export } = require("../helper/aave");
22

33
// https://aave.com/docs/resources/addresses
44
const CONFIG = {
5-
ethereum: ['0x41393e5e337606dc3821075Af65AeE84D7688CBD', '0x08795CFE08C7a81dCDFf482BbAAF474B240f31cD', '0xE7d490885A68f00d9886508DF281D67263ed5758', '0x53519c32f73fE1797d10210c4950fFeBa3b21504'],
5+
ethereum: ['0x41393e5e337606dc3821075Af65AeE84D7688CBD', '0x08795CFE08C7a81dCDFf482BbAAF474B240f31cD', '0xE7d490885A68f00d9886508DF281D67263ed5758'],
66
polygon: ['0x7F23D86Ee20D869112572136221e173428DD740B'],
77
avax: ['0x7F23D86Ee20D869112572136221e173428DD740B'],
88
arbitrum: ['0x7F23D86Ee20D869112572136221e173428DD740B'],

projects/allora/index.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const { queryV1Beta1 } = require('../helper/chain/cosmos');
2+
3+
async function getCosmosStaking() {
4+
const pool = await queryV1Beta1({
5+
chain: 'allora',
6+
url: 'staking/v1beta1/pool'
7+
});
8+
9+
return pool.pool.bonded_tokens || '0';
10+
}
11+
12+
async function getReputationalStaking() {
13+
// Reputational staking endpoint not yet available
14+
return '0';
15+
}
16+
17+
async function tvl(api) {
18+
// Staking is tracked separately
19+
}
20+
21+
async function staking() {
22+
const validatorStaking = await getCosmosStaking();
23+
const reputationalStaking = await getReputationalStaking();
24+
25+
const totalStakedUallo = BigInt(validatorStaking) + BigInt(reputationalStaking);
26+
const totalStakedAllo = totalStakedUallo / BigInt(1e18); // 18 decimals
27+
28+
return {
29+
'allora': Number(totalStakedAllo)
30+
};
31+
}
32+
33+
module.exports = {
34+
methodology: 'Tracks validator staking on Allora Chain via Cosmos SDK staking module. Reputational staking (workers/reputers) will be added when REST endpoint becomes available.',
35+
36+
timetravel: false,
37+
38+
allora: {
39+
tvl,
40+
staking
41+
},
42+
43+
hallmarks: [
44+
[1731283200, "Mainnet Launch"],
45+
],
46+
};

projects/alphafi/index.js

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,24 @@ const ALPHAFI_BUCKET_TVL_IDS = [
515515
},
516516

517517
]
518+
const ALPHAFI_SLUSH_TVL_IDS = [
519+
{
520+
poolID: "0x15a537db45889267354a2576e1cf24e84ea7674a4e5691e71dd4c4592c9a8ce9",
521+
tokenType: ADDRESSES.sui.USDC,
522+
},
523+
{
524+
poolID: "0x18db5470cc2da4f74b1b957891f274d896764d08c56c3941788cef84d2a1362e",
525+
tokenType: ADDRESSES.sui.SUI,
526+
},
527+
{
528+
poolID: "0xcb8b3311b50c89edc2a0e51a0ffc591a651f8c8819ad000aa46f5974a619378d",
529+
tokenType: ADDRESSES.sui.WAL,
530+
},
531+
{
532+
poolID: "0xed4302b0db5a1eabc2f8404222572892c0bf7c81004935b23e4f22808b52a0af",
533+
tokenType: ADDRESSES.sui.DEEP,
534+
},
535+
]
518536
const ALPHAFI_POOL2_IDS = [{
519537
poolID: "0x594f13b8f287003fd48e4264e7056e274b84709ada31e3657f00eeedc1547e37",
520538
parentPoolID: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720",
@@ -545,7 +563,7 @@ const ALPHAFI_POOL2_IDS = [{
545563
},
546564
]
547565

548-
const ALPHA_POOL_ID = "0x6ee8f60226edf48772f81e5986994745dae249c2605a5b12de6602ef1b05b0c1"
566+
const ALPHA_POOL_ID = "0x06a4922346ae433e9a2fff4db900d760e0cbfdef748f48385f430ef4d042a6f8"
549567
const ALPHA_COIN_TYPE = "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA"
550568

551569
function asIntN(int, bits = 32) {
@@ -605,9 +623,9 @@ async function addPoolTVL3(api, alphafiNaviLoopPools){
605623
}
606624
}
607625

608-
async function addPoolTVL4(api, alphafiBucketPools){
626+
async function addPoolTVL4(api, alphafiBucketPools, alphafiSlushPools){
609627

610-
for (const { poolID, tokenType } of alphafiBucketPools){
628+
for (const { poolID, tokenType } of [...alphafiBucketPools, ...alphafiSlushPools]){
611629
let poolObject = await sui.getObject(poolID);
612630
let tokensInvested = poolObject.fields.tokensInvested;
613631
api.add(tokenType, tokensInvested);
@@ -616,7 +634,7 @@ async function addPoolTVL4(api, alphafiBucketPools){
616634

617635
async function tvl(api) {
618636

619-
await Promise.all([addPoolTVL(api, ALPHAFI_CETUS_TVL_IDS), addPoolTVL2(api, ALPHAFI_NAVI_TVL_IDS), addPoolTVL3(api, ALPHAFI_NAVI_LOOP_TVL_IDS), addPoolTVL4(api, ALPHAFI_BUCKET_TVL_IDS), addPoolTVL(api, ALPHAFI_BLUEFIN_TVL_IDS), addPoolTVL(api, ALPHAFI_BLUEFIN_AUTOBALANCE_TVL_IDS)]);
637+
await Promise.all([addPoolTVL(api, ALPHAFI_CETUS_TVL_IDS), addPoolTVL2(api, ALPHAFI_NAVI_TVL_IDS), addPoolTVL3(api, ALPHAFI_NAVI_LOOP_TVL_IDS), addPoolTVL4(api, ALPHAFI_BUCKET_TVL_IDS, ALPHAFI_SLUSH_TVL_IDS), addPoolTVL(api, ALPHAFI_BLUEFIN_TVL_IDS), addPoolTVL(api, ALPHAFI_BLUEFIN_AUTOBALANCE_TVL_IDS)]);
620638

621639
}
622640
async function pool2(api) {
@@ -628,7 +646,7 @@ async function pool2(api) {
628646

629647
async function staking(api) {
630648
let alphaPoolObject = await sui.getObject(ALPHA_POOL_ID)
631-
api.addToken(ALPHA_COIN_TYPE, BigInt(alphaPoolObject.fields.alpha_bal))
649+
api.addToken(ALPHA_COIN_TYPE, BigInt(alphaPoolObject.fields.tokensInvested))
632650
}
633651

634652
module.exports = {

projects/appchain/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const { sumTokens2 } = require("../helper/unwrapLPs");
2+
3+
module.exports = {
4+
ethereum: {
5+
tvl: (api) =>
6+
sumTokens2({
7+
api,
8+
owners: [
9+
"0x19df42E085e2c3fC4497172E412057F54D9f013E", // Bridge
10+
"0x1c71201B43B45ACdF9AfD6A72817C0469F0dD274", // Standard Gateway
11+
"0xCdbbaC12527d6aB4d94bc524849c001574D88f65", // Custom Gateway
12+
"0xcE586d7e3920cAddf1dd2e5b5c94B2Cfe6118e1c", // WETH Gateway
13+
"0x8045B2aa6b823CbA8f99ef3D3404F711619d3473", // Sequencer Inbox
14+
],
15+
fetchCoValentTokens: true,
16+
permitFailure: true,
17+
}),
18+
},
19+
};

projects/arcade-xyz/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const { LOAN_CORE, LOAN_CORE_V3, START_BLOCKS, VAULT_FACTORY_A, ARCD_WETH_LP, ST
1414
// are currently in escrow.
1515

1616
async function tvl(api) {
17-
const block = await api.getBlock();
17+
const block = (await api.getBlock()) - 500
1818

1919
// Get list of all vaults
2020
const vaults = await fetchVaults(block)
@@ -48,7 +48,7 @@ async function tvl(api) {
4848

4949
// Fetches all active loans, their payable curency and amount borrowed then sums it up.
5050
async function borrowed(api) {
51-
const loans = await fetchLoans(await api.getBlock());
51+
const loans = await fetchLoans((await api.getBlock()) - 500);
5252

5353
// Iterate over each loan to sum up principal by currency
5454
for (const loan of loans) {

projects/beamable-network/index.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const { sumTokens2 } = require('../helper/solana');
2+
3+
// BMB Token Mint Address
4+
const BMB_TOKEN = 'BMBtwz6LFDJVJd2aZvL5F64fdvWP3RPn4NP5q9Xe15UD';
5+
6+
// Core Anchorage wallets with locked BMB
7+
const CORE_WALLETS = [
8+
'7xQVXzXC5fz4LEq5PsHjKkFaQsenEp8KBLfsU8vXHixT', // Core Team
9+
'GkqBtacaEuCGr5KortDHUF7WNT6bSasCsRSEpoBbgPKH', // Investors
10+
'9zx2QN7DwGdDdU81SjKFve31F8Midg8RHs7wgrE7KguR', // Advisors
11+
];
12+
13+
// Beamable Network Program Vaults
14+
const PROGRAM_VAULTS = [
15+
'SiuEivQxySKyoSLgq2HaRSp68TEU85uRAfz56kk6T45', // depin: flexlock vault
16+
'6pZERJjcMpNjPZ6ovnXWC6LzwkXLAYgAR1URAEs63cWC', // worker_stake: collected emissions
17+
'2zMVb81qUwusaT4EbK8gvpyJBHdJ8uPwMcrefSkLMU6Z', // worker_stake: community stake
18+
'HBjL14QGKnfVtdxVRQRong1WHnYb89gyjBBQtwLQSLVi', // worker_stake: worker's stake
19+
];
20+
21+
async function staking(api) {
22+
const allOwners = [...CORE_WALLETS, ...PROGRAM_VAULTS];
23+
24+
return sumTokens2({
25+
api,
26+
tokens: [BMB_TOKEN],
27+
owners: allOwners,
28+
});
29+
}
30+
31+
module.exports = {
32+
timetravel: false,
33+
methodology: "Counts the number of BMB tokens locked across Core Anchorage wallets and Beamable Network program vaults.",
34+
solana: {
35+
tvl: () => ({}),
36+
staking,
37+
},
38+
};

projects/blend/index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@ const configs = {
1515
scroll: {
1616
erc4626: [
1717
'0xd39df22a3cd1C91B22d5E748Cc62b03eD3e8A8aD',
18-
'0xd56d212777d25cb3923B515fe0D12E3fd10081AD'
18+
'0xec5906675a92e4113a39d719c5c65a62a0995d59'
19+
],
20+
nestedVaults: [
21+
'0x8a23d825467860edb4ACA0909f29D0a6A8e3a0a7',
22+
]
23+
},
24+
arbitrum: {
25+
erc4626: [
26+
'0xa47c5203d22ae173788a9d9be0f2beecc97f4df9',
27+
'0xE3637cA4D1D6dD756dE0ecd527c40077029eCE6e',
28+
'0x75E9d4FEa6c408097eE4F3C63359D0dc617AcB4F',
29+
'0x567c1B5c2E58C66f84B80dff4C97b084B23B4E87',
30+
'0x9cE8A73296704d4689586347eF6e2087c2128F45'
1931
],
2032
}
2133
}

0 commit comments

Comments
 (0)