From 04d6344585d846092d6f0a589d70c2b82b4234eb Mon Sep 17 00:00:00 2001 From: weequan Date: Fri, 17 Oct 2025 11:17:02 +0800 Subject: [PATCH 1/4] feat: Marquee adapter --- projects/marquee/index.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 projects/marquee/index.js diff --git a/projects/marquee/index.js b/projects/marquee/index.js new file mode 100644 index 00000000000..feb9400ea1d --- /dev/null +++ b/projects/marquee/index.js @@ -0,0 +1,24 @@ + +const ADDRESSES = require('../helper/coreAssets.json') +const axios = require('axios') + +const API_URL_COMPLEX = `https://api.marquee.fi/api/client/indexdata` + +async function tvl() { + + const data = await axios.get(API_URL_COMPLEX, { + headers: { + 'accept': 'application/json' + }, + }).then(r => r.data.data.tvl*1000000) + + return { + [ADDRESSES.ethereum.USDT]: Number(data) + } +} + +module.exports = { + arbitrum: { + tvl + } +} From df863bde8c9ee1cef5b46ea681cbaf96221dab86 Mon Sep 17 00:00:00 2001 From: weequan Date: Tue, 21 Oct 2025 10:16:13 +0800 Subject: [PATCH 2/4] minor: query data from onchain --- projects/marquee/index.js | 44 +++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/projects/marquee/index.js b/projects/marquee/index.js index feb9400ea1d..d65188db7b5 100644 --- a/projects/marquee/index.js +++ b/projects/marquee/index.js @@ -1,20 +1,46 @@ +/* + tvl = pool + vault stake + contract asset (no count due to oracle) +*/ + const ADDRESSES = require('../helper/coreAssets.json') const axios = require('axios') const API_URL_COMPLEX = `https://api.marquee.fi/api/client/indexdata` -async function tvl() { +const CoinPoolAddress = "0x304829862C52BB4A4066e0085395E93439FAC657" +const InsurancePoolAddress = "0x5387733F5f457541a671Fe02923F146b4040530C" +const NeiVaultAddress = "0xeB4985942ec930df8d912205143Fbd9ACa122b13" +const NEDAddress = "0x727E7A24Ad4fae30e37c3A23bEB08b8f4Cf1F375" - const data = await axios.get(API_URL_COMPLEX, { - headers: { - 'accept': 'application/json' - }, - }).then(r => r.data.data.tvl*1000000) +async function tvl(api) { + // Get USDT balance from CoinPool + const coinPoolBalance = await api.call({ + target: ADDRESSES.arbitrum.USDT, + abi: 'erc20:balanceOf', + params: [CoinPoolAddress] + }) - return { - [ADDRESSES.ethereum.USDT]: Number(data) - } + // Get USDT balance from InsurancePool + const insurancePoolBalance = await api.call({ + target: ADDRESSES.arbitrum.USDT, + abi: 'erc20:balanceOf', + params: [InsurancePoolAddress] + }) + + // Get NED token balance in NeiVault + const nedBalance = await api.call({ + target: NEDAddress, + abi: 'erc20:balanceOf', + params: [NeiVaultAddress] + }) + + // Add USDT balances + api.add(ADDRESSES.arbitrum.USDT, coinPoolBalance) + api.add(ADDRESSES.arbitrum.USDT, insurancePoolBalance) + + // Add NED token balance + api.add(NEDAddress, nedBalance) } module.exports = { From 9e4c3da82f8f8a8e2b7b9eee2a9c45f795b42d8b Mon Sep 17 00:00:00 2001 From: weequan Date: Wed, 22 Oct 2025 01:04:43 +0800 Subject: [PATCH 3/4] nit: remove unused import --- projects/marquee/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/projects/marquee/index.js b/projects/marquee/index.js index d65188db7b5..2bd521dd671 100644 --- a/projects/marquee/index.js +++ b/projects/marquee/index.js @@ -4,9 +4,6 @@ */ const ADDRESSES = require('../helper/coreAssets.json') -const axios = require('axios') - -const API_URL_COMPLEX = `https://api.marquee.fi/api/client/indexdata` const CoinPoolAddress = "0x304829862C52BB4A4066e0085395E93439FAC657" const InsurancePoolAddress = "0x5387733F5f457541a671Fe02923F146b4040530C" From c56d5dfe625e6f6cc88bbbda93bdaa3424357201 Mon Sep 17 00:00:00 2001 From: weequan Date: Wed, 22 Oct 2025 08:41:03 +0800 Subject: [PATCH 4/4] minor:separate staking --- projects/marquee/index.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/projects/marquee/index.js b/projects/marquee/index.js index 2bd521dd671..3955d2d1f07 100644 --- a/projects/marquee/index.js +++ b/projects/marquee/index.js @@ -25,6 +25,14 @@ async function tvl(api) { params: [InsurancePoolAddress] }) + // Add USDT balances + api.add(ADDRESSES.arbitrum.USDT, coinPoolBalance) + api.add(ADDRESSES.arbitrum.USDT, insurancePoolBalance) + +} + +async function staking(api) { + // Get NED token balance in NeiVault const nedBalance = await api.call({ target: NEDAddress, @@ -32,16 +40,13 @@ async function tvl(api) { params: [NeiVaultAddress] }) - // Add USDT balances - api.add(ADDRESSES.arbitrum.USDT, coinPoolBalance) - api.add(ADDRESSES.arbitrum.USDT, insurancePoolBalance) - // Add NED token balance api.add(NEDAddress, nedBalance) } module.exports = { arbitrum: { - tvl + tvl, + staking } }