U Update dForce protocol.

This commit is contained in:
skyge 2020-05-27 16:11:55 +08:00
parent 7f79ac4733
commit 518dff7d70
1 changed files with 7 additions and 17 deletions

View File

@ -4,27 +4,17 @@
const sdk = require('../../sdk');
const _ = require('underscore');
const BigNumber = require('bignumber.js');
/*==================================================
Settings
==================================================*/
const lendingReserves = [
'0x4Fabb145d64652a948d72533023f6E7A623C7C53', // BUSD
'0x06AF07097C9Eeb7fD685c692751D5C66dB49c215', // CHAI(DAI)
'0x0316EB71485b0Ab14103307bf65a021042c6d380', // HBTC
'0xdF574c24545E5FfEcb9a659c229253D4111d87e1', // HUSD
'0x3212b29E33587A00FB1C83346f5dBFA69A458923', // imBTC
const tokenAddresses = [
'0x8E870D67F660D95d5be530380D0eC0bd388289E1', // PAX
'0x0000000000085d4780B73119b644AE5ecd22b376', // TUSD
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
'0xdAC17F958D2ee523a2206206994597C13D831ec7', // USDT
'0xeb269732ab75A6fD61Ea60b06fE994cD32a83549', // USDx
'0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', // WBTC
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
]
const market = '0x0eEe3E3828A45f7601D5F54bF49bB01d1A9dF5ea' // market
const pool = '0x786bF554473f9aB733Fd683C528212492A23D895' // USDx Stablecoin Pool
/*==================================================
TVL
@ -35,9 +25,9 @@
let balanceOfResults = await sdk.api.abi.multiCall({
block,
calls: _.map(lendingReserves, (reserve) => ({
target: reserve,
params: market
calls: _.map(tokenAddresses, (token) => ({
target: token,
params: pool
})),
abi: 'erc20:balanceOf'
});
@ -54,7 +44,7 @@
module.exports = {
name: 'dForce',
token: 'DF',
category: 'lending',
start: 1565043417, // Aug-06-2019 06:16:57 AM +UTC
category: 'assets',
start: 1563992244, // Jul-25-2019 02:17:24 AM +UTC
tvl
}