Skip to content
7 changes: 5 additions & 2 deletions projects/fx-Protocol/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ const treasuries = [
"0x63Fe55B3fe3f74B42840788cFbe6229869590f83",
"0xdFac83173A96b06C5D6176638124d028269cfCd2"
]

const fxUSD = "0x085780639CC2cACd35E474e71f4d000e2405d8f6"
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should count the fxUSD underlying collateral only. Recounting fxUSD TVL would be double counting the underlying.

const uniBTC = "0x004E9C3EF86bc1ca1f0bB5C7662861Ee93350568";
const uniBTC_Genesis_Gauge = "0x1D20671A21112E85b03B00F94Fd760DE0Bef37Ba"
const fxUSD_stabilityPool = "0x65C9A641afCEB9C0E6034e558A319488FA0FA3be"
const FxProtocol_PoolManager = "0x250893CA4Ba5d05626C785e8da758026928FCD24"
const FxProtocol_PoolManager_AaveV3Strategy = "0xFd3A6540e21D0E285f88FBFd904883B23e08F5C8"
const FxProtocol_PoolManager_AaveV3Strategy_USDC = "0x376aa9086060740f444c4E7A5411ff235816Aa0C"
const FxProtocol_PoolManager_short = "0xacdc0ab51178d0ae8f70c1ead7d3cf5421fdd66d"
module.exports = {
doublecounted: true,
ethereum: {
Expand All @@ -36,7 +37,9 @@ async function getGaugeTvl(api) {

async function tvl(api) {
const tokens = await api.multiCall({ abi: 'address:baseToken', calls: treasuries })
const tokensAndOwners = [[uniBTC, uniBTC_Genesis_Gauge], [ADDRESSES.ethereum.USDC, fxUSD_stabilityPool], [ADDRESSES.ethereum.WSTETH, FxProtocol_PoolManager], [ADDRESSES.ethereum.WBTC, FxProtocol_PoolManager],["0xc035a7cf15375ce2706766804551791ad035e0c2", FxProtocol_PoolManager_AaveV3Strategy],["0x98c23e9d8f34fefb1b7bd6a91b7ff122f4e16f5c", FxProtocol_PoolManager_AaveV3Strategy_USDC]
const tokensAndOwners = [[uniBTC, uniBTC_Genesis_Gauge], [ADDRESSES.ethereum.USDC, fxUSD_stabilityPool], [ADDRESSES.ethereum.WSTETH, FxProtocol_PoolManager], [ADDRESSES.ethereum.WBTC, FxProtocol_PoolManager],
["0xc035a7cf15375ce2706766804551791ad035e0c2", FxProtocol_PoolManager_AaveV3Strategy], ["0x98c23e9d8f34fefb1b7bd6a91b7ff122f4e16f5c", FxProtocol_PoolManager_AaveV3Strategy_USDC],
[fxUSD, FxProtocol_PoolManager_short]
]
tokens.forEach((v, i) => tokensAndOwners.push([v, treasuries[i]]))
return api.sumTokens({ tokensAndOwners })
Expand Down
Loading