Skip to content

Commit 7f29f51

Browse files
Adding TVL from the Merlin chain (DefiLlama#9843)
Co-authored-by: surf-rd <[email protected]>
1 parent ed2382a commit 7f29f51

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

projects/surfone/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
const factoryContract = '0x5FeD7c030a1B3b40988984479Fdd666dE81038A3'
22
const positionContract = '0x1fa9702e774D31aB661D84f449b0Aa22c41D6827'
3+
const merlinPoolContract = '0x69d2AbBCef322afcDAED52238f43882cEe3ACC08'
4+
const merlinPositionContract = '0x7A3D0eBb547001E769F2A7AE3f0D7a9b3078F3C1'
35
const ADDRESSES = require('../helper/coreAssets.json')
46

5-
async function tvl(api) {
7+
async function tvlBase(api) {
68
const data = await api.call({ abi: abi.getAllPools, target: factoryContract })
79
const ownerTokens = data.map(i => [[i.baseToken], i.pool])
810
ownerTokens.push([[ADDRESSES.base.USDC, ADDRESSES.base.WETH], positionContract])
911
return api.sumTokens({ ownerTokens, });
1012
}
1113

14+
async function merlinTvl(api) {
15+
return api.sumTokens({ owners:[merlinPoolContract,merlinPositionContract], tokens: [ADDRESSES.merlin.WBTC, ADDRESSES.merlin.WBTC_1]})
16+
}
1217

1318
module.exports = {
14-
start: 8048857,
15-
base: { tvl },
19+
base: { tvl:tvlBase},
20+
merlin: {tvl:merlinTvl},
1621
methodology: "Count the total balance across all fee pools for all trading pairs.",
1722
}
1823

0 commit comments

Comments
 (0)