Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions projects/marquee/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

/*
tvl = pool + vault stake + contract asset (no count due to oracle)
*/

const ADDRESSES = require('../helper/coreAssets.json')

const CoinPoolAddress = "0x304829862C52BB4A4066e0085395E93439FAC657"
const InsurancePoolAddress = "0x5387733F5f457541a671Fe02923F146b4040530C"
const NeiVaultAddress = "0xeB4985942ec930df8d912205143Fbd9ACa122b13"
const NEDAddress = "0x727E7A24Ad4fae30e37c3A23bEB08b8f4Cf1F375"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any MARQ balance should be exported under staking rather than TVL since it is your own token

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separated it into staking


async function tvl(api) {
// Get USDT balance from CoinPool
const coinPoolBalance = await api.call({
target: ADDRESSES.arbitrum.USDT,
abi: 'erc20:balanceOf',
params: [CoinPoolAddress]
})

// Get USDT balance from InsurancePool
const insurancePoolBalance = await api.call({
target: ADDRESSES.arbitrum.USDT,
abi: 'erc20:balanceOf',
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,
abi: 'erc20:balanceOf',
params: [NeiVaultAddress]
})

// Add NED token balance
api.add(NEDAddress, nedBalance)
}

module.exports = {
arbitrum: {
tvl,
staking
}
}
Loading