Skip to content

Commit da35e75

Browse files
committed
Merge branch 'affluent-tvl-update' of github.com:factorial-finance/DefiLlama-Adapters into affluent-tvl-update
* 'affluent-tvl-update' of github.com:factorial-finance/DefiLlama-Adapters: (46 commits) update steam finance bad debt tempfix: 8lends update factory ramses-hl-cl (DefiLlama#17029) move env to sdk debug chore: update CU url (DefiLlama#17026) AImstrong: Added ZetaChain (DefiLlama#17025) Added vyUSD on saga chain (DefiLlama#17016) updated to add Doge & cleanup RosenBridge File (DefiLlama#17015) feat: add Valdora Finance (DefiLlama#17014) add ramses hyperliquid cl and legacy (DefiLlama#17013) Add v2 support for Dusa Protocol (DefiLlama#17012) Add new asset tracking for TVL calculation (DefiLlama#17011) Remove API Endpoint Dependency (DefiLlama#16999) Etherfuse listing (DefiLlama#16997) update @defillama/sdk version Feat: add gate-btc (DefiLlama#17024) track dz-sol tvl (DefiLlama#17023) Fix: Superform (DefiLlama#17022) add luna.fun treasury ...
2 parents 1efde85 + acc0226 commit da35e75

File tree

51 files changed

+757
-312
lines changed

Some content is hidden

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

51 files changed

+757
-312
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/8lends/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async function borrowed(api) {
3434

3535
const tvlApi = new sdk.ChainApi({ chain: api.chain, block: api.block });
3636
await sumTokens2({ api: tvlApi, owner: FUNDRAISING_CONTRACT, tokens });
37-
api.getBalancesV2().subtract(tvlApi.getBalancesV2());
37+
api.getBalancesV2().subtract(tvlApi.getBalances());
3838
}
3939

4040
module.exports = {

projects/Corepilot/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
core: {
3+
tvl: async function tvl(api) {
4+
const totalStaked = await api.call({
5+
target: "0xF7B977d23Fc47736D767fB6AF0595102007a5433",
6+
abi: 'uint256:totalStaked',
7+
});
8+
api.addGasToken(totalStaked);
9+
}
10+
},
11+
12+
}

projects/LiquidOps/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { post } = require("../helper/http.js")
22
const methodologies = require('../helper/methodologies');
33

44

5-
const endpoint = 'https://cu.ao-testnet.xyz'
5+
const endpoint = 'https://cu.ardrive.io'
66
const controllerId = 'SmmMv0rJwfIDVM3RvY2-P729JFYwhdGSeGo2deynbfY'
77
const geckoTickerTransformations = {
88
'wAR': 'arweave',

projects/aerostrategy/index.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const { unwrapSolidlyVeNft } = require('../helper/unwrapLPs');
2+
3+
const AERO = '0x940181a94A35A4569E4529A3CDfB74e38FD98631';
4+
const veAERO = '0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4';
5+
const AEROSTRATEGY_BUYER = '0x047f7B059743EC2552f44F94A901a190b836d99B';
6+
const AUTOPILOT = '0xA7c68a960bA0F6726C4b7446004FE64969E2b4d4';
7+
const AEROSTRATEGY_veNFT_HOLDER = '0xE839A0356bA10957F9441bf52034Cc6D95FEAf83';
8+
9+
10+
async function tvl(api) {
11+
await api.sumTokens({ owner: AEROSTRATEGY_BUYER, token: AERO });
12+
const totalNftsLocked = await api.call({
13+
target: AUTOPILOT,
14+
abi: 'function getUserLocksCount(address user) view returns (uint256)',
15+
params: AEROSTRATEGY_veNFT_HOLDER
16+
});
17+
18+
const lockedVeNfts = await api.call({
19+
target: AUTOPILOT,
20+
abi: 'function getUserLocks(address user,uint256 offset, uint256 limit) view returns(tuple(uint256 lock_id,uint256 start_snapshot_id,uint256 rewards_snapshot_id, uint256 voting_power,uint256 postponed_rewards)[])',
21+
params: [AEROSTRATEGY_veNFT_HOLDER, 0, +totalNftsLocked]
22+
});
23+
24+
lockedVeNfts.forEach(nft => api.add(AERO, nft.voting_power));
25+
26+
await unwrapSolidlyVeNft({ api, baseToken: AERO, veNft: veAERO, owner: AEROSTRATEGY_veNFT_HOLDER });
27+
}
28+
29+
module.exports = {
30+
base: { tvl },
31+
doublecounted: true,
32+
methodology: `TVL includes aerostrategy's veAero locked in autopilot, unlocked veAero and the AERO yet to be allocated to veAero.`,
33+
};

projects/aimstrong/index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ const CONFIG = {
1111
};
1212

1313
async function tvl(api) {
14+
if (api.chain === "zeta") {
15+
const treasury = "0x18351419aE86F3DD3128943ec01b873b4f35801D";
16+
const tokens = [
17+
"0x1de70f3e971B62A0707dA18100392af14f7fB677",
18+
"0xA614Aebf7924A3Eb4D066aDCA5595E4980407f1d",
19+
"0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb",
20+
];
21+
const tokensAndOwners = tokens.map((t) => [t, treasury]);
22+
return api.sumTokens({ tokensAndOwners });
23+
}
24+
1425
const pool = CONFIG[api.chain];
1526
const reserves = await api.call({ target: pool, abi: abi.getReservesList });
1627
const datas = await api.multiCall({
@@ -48,4 +59,5 @@ module.exports = {
4859
arbitrum: { tvl, borrowed },
4960
base: { tvl, borrowed },
5061
bsc: { tvl, borrowed },
51-
};
62+
zeta: { tvl },
63+
};

projects/alpha-homora/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ module.exports = {
3030
hallmarks: [
3131
[1613178000, "37M exploit"], // Feb 13, 2021
3232
[1626220800, "Upgrade to V2 on ETH"], // July 14, 2021 00:00 UTC
33-
]
33+
],
34+
deadFrom: '2025-10-11', // website is down
3435
};

projects/bitget/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ const config = {
183183
owners: [
184184
"r3AEihLNr81VYUf5PdfH5wLPqtJJyJs6yY",
185185
"rGDreBvnHrX1get7na3J4oowN19ny4GzFn",
186+
"rwTTsHVUDF8Ub2nzV2oAeWxfJzUvobXLEf",
186187
],
187188
},
188189
solana: {

projects/coinbase-btc/index.js

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const sdk = require('@defillama/sdk');
22
const { sumTokensExport } = require('../helper/sumTokens');
33
const { sumTokens } = require('../helper/chain/bitcoin.js');
4+
const { getConfig } = require('../helper/cache');
45
const bitcoinAddressBook = require('../helper/bitcoin-book/index.js')
56

67

@@ -24,38 +25,12 @@ const DOGE_ADDRESSES = [
2425
];
2526

2627
async function btcTvl(api) {
27-
const response = await fetch("https://www.coinbase.com/cbbtc/proof-of-reserves.json", {
28-
"headers": {
29-
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8",
30-
"accept-language": "en-US,en;q=0.5",
31-
"cache-control": "no-cache",
32-
"pragma": "no-cache",
33-
"priority": "u=0, i",
34-
"sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Brave\";v=\"138\"",
35-
"sec-ch-ua-arch": "\"x86\"",
36-
"sec-ch-ua-bitness": "\"64\"",
37-
"sec-ch-ua-full-version-list": "\"Not)A;Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"138.0.0.0\", \"Brave\";v=\"138.0.0.0\"",
38-
"sec-ch-ua-mobile": "?0",
39-
"sec-ch-ua-model": "\"\"",
40-
"sec-ch-ua-platform": "\"Linux\"",
41-
"sec-ch-ua-platform-version": "\"6.2.0\"",
42-
"sec-fetch-dest": "document",
43-
"sec-fetch-mode": "navigate",
44-
"sec-fetch-site": "none",
45-
"sec-fetch-user": "?1",
46-
"sec-gpc": "1",
47-
"upgrade-insecure-requests": "1",
48-
},
49-
"body": null,
50-
"method": "GET"
51-
});
52-
53-
const res = await response.json();
54-
55-
const bitcoinWallets = res.reserveAddresses.map(item => item.address)
56-
57-
return sumTokens({ timestamp: api.timestamp, owners: bitcoinWallets })
58-
}
28+
const config = await getConfig('coinbase-cbbtc-proof-of-reserves', 'https://www.coinbase.com/cbbtc/proof-of-reserves.json')
29+
30+
const bitcoinWallets = config.reserveAddresses.map(item => item.address)
31+
32+
return sumTokens({ timestamp: api.timestamp, owners: bitcoinWallets })
33+
}
5934

6035

6136

projects/csigma-finance/config.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ const instituitionalContractAddress = {
1010
base: {
1111
address: '0x07D7bf6dCc4A2f03E82E3da52eBfBAe871443322',
1212
startBlock: 23596015
13+
},
14+
hedera: {
15+
address: '0xF80bA51189763B7AC484A23f7d7695345B1149C9',
16+
startBlock: 84085356
1317
}
1418
};
1519

@@ -25,6 +29,10 @@ const edgeContractAddress = {
2529
base: {
2630
address: '0xe76C20761BFCD471196bB61f68250DAf3dA3568B',
2731
startBlock: 23604031
32+
},
33+
hedera: {
34+
address: '0x78B17FbE17925622139382FE7809A9D687C5e7Bd',
35+
startBlock: 84093455
2836
}
2937
};
3038

@@ -33,6 +41,54 @@ const pdnContractAddress = {
3341
startBlock: 218221531
3442
};
3543

44+
// csUSD multi-asset vault configuration per chain
45+
// Supports multiple vaults per chain
46+
const csUSDVaults = {
47+
ethereum: [
48+
{
49+
vault: '0xd5d097f278a735d0a3c609deee71234cac14b47e', // USDC vault (csUSD)
50+
startBlock: 23251807,
51+
underlyings: [
52+
'USDC',
53+
],
54+
},
55+
{
56+
vault: '0xbd3f0befa86794b999b29a91d201124d8fbdf777', // USDT vault (csUSD)
57+
startBlock: 23251807,
58+
underlyings: [
59+
'USDT',
60+
],
61+
},
62+
],
63+
hedera: [
64+
{
65+
vault: '0x4896a087f78E1DcB44B9231f9a6f35EA2aA0c8AC', // USDC vault (csUSDh)
66+
startBlock: 85080753,
67+
underlyings: [
68+
'USDC',
69+
],
70+
},
71+
],
72+
};
73+
74+
const csLYDVaults = {
75+
ethereum: [
76+
{
77+
vault: '0xead9190db1a6a5f4262572845cf75c31e474fd4c',
78+
startBlock: 23645911,
79+
underlyings: [
80+
'USDC',
81+
],
82+
},
83+
{
84+
vault: '0x1922d16cc88cd60499906915b30ec891ceb6e151',
85+
startBlock: 23645923,
86+
underlyings: [
87+
'USDT',
88+
],
89+
},
90+
],
91+
};
3692

3793
const invalidPDNPaymentIds = [
3894
"0x99460d3affdd3d92b7947811ee9d3081c9c2f0a9d0ee9b30af2d842f4423dd83",
@@ -49,5 +105,7 @@ module.exports = {
49105
instituitionalContractAddress,
50106
edgeContractAddress,
51107
pdnContractAddress,
108+
csUSDVaults,
109+
csLYDVaults,
52110
invalidPDNPaymentIds
53111
};

0 commit comments

Comments
 (0)