Skip to content

Commit d33d1da

Browse files
Add PumpSpace adapter (Avalanche) with V2 + V3 TVL and token mapping support (#16805)
Co-authored-by: g1nt0ki <[email protected]>
1 parent b032d0f commit d33d1da

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

projects/aquabank/index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// projects/aquabank/index.js
2+
const sdk = require('@defillama/sdk')
3+
4+
const bUSDt = '0x3C594084dC7AB1864AC69DFd01AB77E8f65B83B7'
5+
6+
const BENQI_RECEIPT = '0xd8fcDa6ec4Bdc547C0827B8804e89aCd817d56EF'
7+
const EULER_RECEIPT = '0xa446938b0204Aa4055cdFEd68Ddf0E0d1BAB3E9E'
8+
9+
const VAULTS = [
10+
'0x7D336B49879a173626E51BFF780686D88b8081ec', // Benqi vault
11+
'0x61E8f77eD693d3edeCBCc2dd9c55c1d987c47775', // Euler vault
12+
]
13+
14+
const tvl = async (api) => {
15+
// export raw balances of receipt tokens held by our vaults (priced server-side)
16+
const tokens = [BENQI_RECEIPT, EULER_RECEIPT]
17+
const owners = VAULTS
18+
await api.sumTokens({ tokens, owners })
19+
}
20+
21+
module.exports = {
22+
methodology:
23+
'TVL is calculated based on the total supply of bUSDT, which is fully backed by USDt deposited into Benqi and Euler vaults. Each bUSDT represents 1 USDt of collateralized liquidity.',
24+
avax: {
25+
tvl,
26+
},
27+
}

projects/pumpspace/index.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// projects/pumpspace/index.js
2+
const ADDRESSES = require('../helper/coreAssets.json')
3+
const { staking } = require('../helper/staking')
4+
const { getUniTVL } = require('../helper/unknownTokens');
5+
const { getTridentTVL } = require('../helper/sushi-trident')
6+
const sdk = require('@defillama/sdk')
7+
8+
const CHAIN = 'avax'
9+
10+
// --- FACTORIES / CONTRACTS ---
11+
const PUMP_FACTORY = '0x26B42c208D8a9d8737A2E5c9C57F4481484d4616' // V2
12+
const PUMP_V3 = '0xE749c1cA2EA4f930d1283ad780AdE28625037CeD' // V3/Trident
13+
14+
// If you later expose staking for other MasterChefs, add here
15+
const MASTERCHEFS = [
16+
'0x40a58fc672F7878F068bD8ED234a47458Ec33879', // SHELL
17+
'0x56b54a1384d35C63cD95b39eDe9339fEf7df3E42', // KRILL
18+
'0x06C551B19239fE6a425b3c45Eb8b49d28e8283C6', // PEARL
19+
]
20+
21+
// --- TOKENS (project/local wrappers + protocol tokens) ---
22+
const TOKENS = {
23+
SHELL: '0xaD4CB79293322c07973ee83Aed5DF66A53214dc6',
24+
}
25+
26+
27+
module.exports = {
28+
misrepresentedTokens: true,
29+
methodology: `
30+
TVL is computed by summing reserves across PumpSpace V2 and V3 (Trident) factories on Avalanche.
31+
Single-asset staking (if enabled) reflects tokens deposited in the respective MasterChef contracts.
32+
`,
33+
avax: {
34+
tvl: sdk.util.sumChainTvls([
35+
// v2FactoryTVL,
36+
// v3FactoryTVL,
37+
getUniTVL({ factory: PUMP_FACTORY, useDefaultCoreAssets: true }),
38+
getTridentTVL({ chain: CHAIN, factory:PUMP_V3 }),
39+
]),
40+
staking: sdk.util.sumChainTvls([
41+
// If you later add KRILL/PEARL single-asset staking, append similar lines here.
42+
staking([MASTERCHEFS[0]], [TOKENS.SHELL]),
43+
])
44+
},
45+
}

0 commit comments

Comments
 (0)