From 34f0868e421eb183356d9ab79e614758c10ee7e5 Mon Sep 17 00:00:00 2001 From: slasher125 Date: Sun, 14 Aug 2022 11:26:22 -0700 Subject: [PATCH] venus split apy components --- src/adaptors/venus/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/adaptors/venus/index.ts b/src/adaptors/venus/index.ts index 855c211537..9028daa88a 100644 --- a/src/adaptors/venus/index.ts +++ b/src/adaptors/venus/index.ts @@ -2,6 +2,8 @@ const utils = require('../utils'); const API_URL: string = 'https://api.venus.io/api/governance/venus'; +const XVS = '0xcf6bb5389c92bdda8a3747ddb454cb7a64626c63'; + interface Market { address: string; underlyingSymbol: string; @@ -9,6 +11,7 @@ interface Market { totalBorrowsUsd: string; supplyApy: string; supplyVenusApy: string; + underlyingAddress: string; } const getApy = async () => { @@ -21,7 +24,13 @@ const getApy = async () => { project: 'venus', symbol: market.underlyingSymbol, tvlUsd: Number(market.totalSupplyUsd) - Number(market.totalBorrowsUsd), - apy: Number(market.supplyApy) + Number(market.supplyVenusApy), + apyBase: Number(market.supplyApy), + apyReward: Number(market.supplyVenusApy), + rewardTokens: [XVS], + underlyingTokens: + market.underlyingSymbol === 'BNB' + ? ['0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c'] + : [], })); return pools;