Reserves Configuration

This commit is contained in:
David Racero 2020-11-04 11:47:06 +01:00
parent cd687b7a0c
commit 86f79b4c13
12 changed files with 447 additions and 359 deletions

View File

@ -3,6 +3,27 @@ import {oneRay} from '../helpers/constants';
import {IAaveConfiguration, EthereumNetwork, eEthereumNetwork} from '../helpers/types';
import {CommonsConfig} from './commons';
import {
stablecoinStrategyBUSD,
stablecoinStrategyDAI,
stablecoinStrategySUSD,
stablecoinStrategyTUSD,
stablecoinStrategyUSDC,
stablecoinStrategyUSDT,
strategyAAVE,
strategyBase,
strategyKNC,
strategyLINK,
strategyMANA,
strategyMKR,
strategyREN,
strategyREP,
strategySNX,
strategyUNI,
strategyWBTC,
strategyWETH,
strategyYFI,
} from './reservesConfigs';
// ----------------
// POOL--SPECIFIC PARAMS
@ -12,247 +33,27 @@ export const AaveConfig: IAaveConfiguration = {
...CommonsConfig,
ConfigName: 'Aave',
ProviderId: 1,
ReserveSymbols: [
'WETH',
'DAI',
'AAVE',
'TUSD',
'BAT',
'USDC',
'USDT',
'SUSD',
'ZRX',
'MKR',
'WBTC',
'LINK',
'KNC',
'MANA',
'REP',
'SNX',
'BUSD',
],
ReservesConfig: {
DAI: {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.05).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
TUSD: {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
USDC: {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.16).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '6',
},
USDT: {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '-1',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '6',
},
SUSD: {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '-1',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
},
AAVE: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
BAT: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
WETH: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
LINK: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6500',
liquidationThreshold: '7000',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
WBTC: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '8',
},
KNC: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
REP: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
MKR: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
MANA: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
ZRX: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
},
SNX: {
baseVariableBorrowRate: new BigNumber(0.03).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.12).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '-1',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
},
BUSD: {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '-1',
liquidationThreshold: '8000',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
},
DAI: stablecoinStrategyDAI,
TUSD: stablecoinStrategyTUSD,
USDC: stablecoinStrategyUSDC,
USDT: stablecoinStrategyUSDT,
SUSD: stablecoinStrategySUSD,
AAVE: strategyAAVE,
BAT: strategyBase,
WETH: strategyWETH,
LINK: strategyLINK,
WBTC: strategyWBTC,
KNC: strategyKNC,
REP: strategyREP,
MKR: strategyMKR,
MANA: strategyMANA,
ZRX: strategyBase,
SNX: strategySNX,
YFI: strategyYFI,
UNI: strategyUNI,
BUSD: stablecoinStrategyBUSD,
REN: strategyREN,
},
ReserveAssets: {
[eEthereumNetwork.buidlerevm]: {},
@ -275,6 +76,9 @@ export const AaveConfig: IAaveConfiguration = {
ZRX: '0xD0d76886cF8D952ca26177EB7CfDf83bad08C00C',
SNX: '0x7FDb81B0b8a010dd4FFc57C3fecbf145BA8Bd947',
BUSD: '0x4c6E1EFC12FDfD568186b7BAEc0A43fFfb4bCcCf',
REN: '',
YFI: '',
UNI: '',
},
[EthereumNetwork.ropsten]: {
WETH: '0xc778417e063141139fce010982780140aa0cd5ab',
@ -294,6 +98,9 @@ export const AaveConfig: IAaveConfiguration = {
ZRX: '0x02d7055704EfF050323A2E5ee4ba05DB2A588959',
SNX: '0xF80Aa7e2Fda4DA065C55B8061767F729dA1476c7',
BUSD: '0xFA6adcFf6A90c11f31Bc9bb59eC0a6efB38381C6',
REN: '',
YFI: '',
UNI: '',
},
[EthereumNetwork.main]: {
WETH: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
@ -313,6 +120,9 @@ export const AaveConfig: IAaveConfiguration = {
ZRX: '0xe41d2489571d322189246dafa5ebde1f4699f498',
SNX: '0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F',
BUSD: '0x4Fabb145d64652a948d72533023f6E7A623C7C53',
REN: '0x408e41876cCCDC0F92210600ef50372656052a38',
YFI: '0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e',
UNI: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984',
},
},
};

View File

@ -1,5 +1,5 @@
import BigNumber from 'bignumber.js';
import {oneEther, oneRay, RAY} from '../helpers/constants';
import {oneEther, oneRay, RAY, ZERO_ADDRESS} from '../helpers/constants';
import {ICommonConfiguration, EthereumNetwork, eEthereumNetwork} from '../helpers/types';
const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
@ -21,6 +21,9 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
BUSD: oneEther.multipliedBy('0.00736484').toFixed(),
WETH: oneEther.toFixed(),
USD: '5848466240000000',
YFI: oneEther.multipliedBy('22.407436').toFixed(),
REN: oneEther.multipliedBy('0.00065133').toFixed(),
UNI: oneEther.multipliedBy('0.00536479').toFixed(),
UNI_DAI_ETH: oneEther.multipliedBy('2.1').toFixed(),
UNI_USDC_ETH: oneEther.multipliedBy('2.1').toFixed(),
UNI_SETH_ETH: oneEther.multipliedBy('2.1').toFixed(),
@ -35,7 +38,6 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
export const CommonsConfig: ICommonConfiguration = {
ConfigName: 'Commons',
ProviderId: 0,
ReserveSymbols: [],
ProtocolGlobalParams: {
OptimalUtilizationRate: new BigNumber(0.8).times(RAY),
ExcessUtilizationRate: new BigNumber(0.2).times(RAY),
@ -110,6 +112,15 @@ export const CommonsConfig: ICommonConfiguration = {
SNX: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
YFI: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
REN: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
UNI: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
BUSD: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(),
},
@ -183,6 +194,9 @@ export const CommonsConfig: ICommonConfiguration = {
SNX: '0x775E76cca1B5bc903c9a8C6f77416A35E5744664',
BUSD: '0x63294A05C9a81b1A40CAD3f2ff30617111630393',
USD: '0xD21912D8762078598283B14cbA40Cb4bFCb87581',
YFI: '0xe45f3ed2218E7e411bf8DFdE66069e57F46b26eF',
REN: ZERO_ADDRESS,
UNI: ZERO_ADDRESS,
UNI_DAI_ETH: '0x0338C40020Bf886c11406115fD1ba205Ef1D9Ff9',
UNI_USDC_ETH: '0x7f5E5D34591e9a70D187BBA94260C30B92aC0961',
UNI_SETH_ETH: '0xc5F1eA001c1570783b3af418fa775237Eb129EDC',
@ -208,6 +222,9 @@ export const CommonsConfig: ICommonConfiguration = {
SNX: '0xA95674a8Ed9aa9D2E445eb0024a9aa05ab44f6bf',
BUSD: '0x0A32D96Ff131cd5c3E0E5AAB645BF009Eda61564',
USD: '0x8468b2bDCE073A157E560AA4D9CcF6dB1DB98507',
YFI: ZERO_ADDRESS,
REN: ZERO_ADDRESS,
UNI: ZERO_ADDRESS,
UNI_DAI_ETH: '0x16048819e3f77b7112eB033624A0bA9d33743028',
UNI_USDC_ETH: '0x6952A2678D574073DB97963886c2F38CD09C8Ba3',
UNI_SETH_ETH: '0x23Ee5188806BD2D31103368B0EA0259bc6706Af1',
@ -233,6 +250,9 @@ export const CommonsConfig: ICommonConfiguration = {
SNX: '0xE23d1142dE4E83C08bb048bcab54d50907390828',
BUSD: '0x5d4BB541EED49D0290730b4aB332aA46bd27d888',
USD: '0x59b826c214aBa7125bFA52970d97736c105Cc375',
YFI: '0x7c5d4F8345e66f68099581Db340cd65B078C41f4',
REN: '0x3147D7203354Dc06D9fd350c7a2437bcA92387a4',
UNI: '0xD6aA3D25116d8dA79Ea0246c4826EB951872e02e',
UNI_DAI_ETH: '0x1bAB293850289Bf161C5DA79ff3d1F02A950555b',
UNI_USDC_ETH: '0x444315Ee92F2bb3579293C17B07194227fA99bF0',
UNI_SETH_ETH: '0x517D40E49660c7705b2e99eEFA6d7B0E9Ba5BF10',
@ -253,7 +273,7 @@ export const CommonsConfig: ICommonConfiguration = {
[eEthereumNetwork.coverage]:
'0x95b73a72c6ecf4ccbbba5178800023260bad8e75cdccdb8e4827a2977a37c820',
[eEthereumNetwork.buidlerevm]:
'0x76cbbf8aa4b11a7c207dd79ccf8c394f59475301598c9a083f8258b4fafcfa86',
'0xb2330c7bbc626184eddb8c084eaff33898393166dc493ce4251c287ddbe95b1a',
[eEthereumNetwork.kovan]: '',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '',

212
config/reservesConfigs.ts Normal file
View File

@ -0,0 +1,212 @@
import BigNumber from 'bignumber.js';
import {oneRay} from '../helpers/constants';
import {IReserveParams} from '../helpers/types';
export const strategyBase: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
};
export const stablecoinStrategyCentralized: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.06).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '6',
};
export const stablecoinStrategyBase: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.06).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
};
export const stablecoinStrategyDAI: IReserveParams = {
...stablecoinStrategyBase,
};
export const stablecoinStrategyTUSD: IReserveParams = {
...stablecoinStrategyCentralized,
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
borrowingEnabled: true,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
};
export const stablecoinStrategyBUSD: IReserveParams = {
...stablecoinStrategyCentralized,
reserveDecimals: '18',
baseLTVAsCollateral: '-1',
liquidationThreshold: '0',
liquidationBonus: '0',
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableBorrowRateEnabled: false,
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
};
export const stablecoinStrategyUSDC: IReserveParams = {
...stablecoinStrategyBase,
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
reserveDecimals: '6',
};
export const stablecoinStrategyUSDT: IReserveParams = {
...stablecoinStrategyBase,
baseLTVAsCollateral: '-1',
liquidationThreshold: '7000',
liquidationBonus: '0',
borrowingEnabled: false,
stableBorrowRateEnabled: true,
reserveDecimals: '6',
};
export const stablecoinStrategySUSD: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '-1',
liquidationThreshold: '0',
liquidationBonus: '0',
borrowingEnabled: false,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
};
export const strategyAAVE: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '5000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: false,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
};
export const strategyWETH: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
};
export const strategyLINK: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '6500',
liquidationThreshold: '7000',
};
export const strategyWBTC: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '8',
};
export const strategyKNC: IReserveParams = {
...strategyBase,
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
};
export const strategyREP: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '3500',
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
borrowingEnabled: false,
};
export const strategyMKR: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '3500',
};
export const strategyMANA: IReserveParams = {
...strategyBase,
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
};
export const strategySNX: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '1500',
liquidationThreshold: '4000',
baseVariableBorrowRate: new BigNumber(0.03).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.12).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
stableBorrowRateEnabled: false,
};
export const strategyENJ: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '5500',
stableBorrowRateEnabled: false,
};
export const strategyREN: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '5000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: false,
};
export const strategyGovernanceTokens: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '4000',
liquidationBonus: '11500',
};
export const strategyYFI: IReserveParams = {
...strategyGovernanceTokens,
};
export const strategyUNI: IReserveParams = {
...strategyGovernanceTokens,
stableBorrowRateEnabled: false,
};

View File

@ -12,18 +12,6 @@ export const UniswapConfig: IUniswapConfiguration = {
...CommonsConfig,
ConfigName: 'Uniswap',
ProviderId: 2,
ReserveSymbols: [
'WETH',
'DAI',
'USDC',
'USDT',
'UNI_DAI_ETH',
'UNI_USDC_ETH',
'UNI_SETH_ETH',
'UNI_LINK_ETH',
'UNI_MKR_ETH',
'UNI_LEND_ETH',
],
ReservesConfig: {
WETH: {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),

View File

@ -1,7 +1,7 @@
{
"MintableERC20": {
"buidlerevm": {
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
"address": "0x5A0773Ff307Bf7C71a832dBB5312237fD3437f9F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
@ -97,91 +97,91 @@
},
"SNX": {
"buidlerevm": {
"address": "0x2D8553F9ddA85A9B3259F6Bf26911364B85556F5",
"address": "0x52d3b94181f8654db2530b0fEe1B19173f519C52",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"BUSD": {
"buidlerevm": {
"address": "0x52d3b94181f8654db2530b0fEe1B19173f519C52",
"address": "0xd15468525c35BDBC1eD8F2e09A00F8a173437f2f",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"USD": {
"buidlerevm": {
"address": "0xd15468525c35BDBC1eD8F2e09A00F8a173437f2f",
"address": "0x7e35Eaf7e8FBd7887ad538D4A38Df5BbD073814a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_DAI_ETH": {
"buidlerevm": {
"address": "0x7e35Eaf7e8FBd7887ad538D4A38Df5BbD073814a",
"address": "0x53369fd4680FfE3DfF39Fc6DDa9CfbfD43daeA2E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_USDC_ETH": {
"buidlerevm": {
"address": "0x5bcb88A0d20426e451332eE6C4324b0e663c50E0",
"address": "0xB00cC45B4a7d3e1FEE684cFc4417998A1c183e6d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_SETH_ETH": {
"buidlerevm": {
"address": "0x3521eF8AaB0323004A6dD8b03CE890F4Ea3A13f5",
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_LINK_ETH": {
"buidlerevm": {
"address": "0x53369fd4680FfE3DfF39Fc6DDa9CfbfD43daeA2E",
"address": "0xa4bcDF64Cdd5451b6ac3743B414124A6299B65FF",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_MKR_ETH": {
"buidlerevm": {
"address": "0xB00cC45B4a7d3e1FEE684cFc4417998A1c183e6d",
"address": "0x22474D350EC2dA53D717E30b96e9a2B7628Ede5b",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_LEND_ETH": {
"buidlerevm": {
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
"address": "0x5A0773Ff307Bf7C71a832dBB5312237fD3437f9F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingPoolAddressesProvider": {
"buidlerevm": {
"address": "0xa4bcDF64Cdd5451b6ac3743B414124A6299B65FF",
"address": "0x18b9306737eaf6E8FC8e737F488a1AE077b18053",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x4d9b0B189D8382cE39B905E0a1Edc285D18aa69b",
"address": "0x737e98878e585C80FeF2B2F8b3Bb7621bE74DdF0",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"LendingPoolAddressesProviderRegistry": {
"buidlerevm": {
"address": "0x5A0773Ff307Bf7C71a832dBB5312237fD3437f9F",
"address": "0x6082731fdAba4761277Fb31299ebC782AD3bCf24",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x52e7AbE89c7479BA50F9f0E3517aB99EA5d9696F",
"address": "0x58a6a59e68178a7a5c5A92291CFa0161fD85Ab5C",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"ReserveLogic": {
"buidlerevm": {
"address": "0x78Ee8Fb9fE5abD5e347Fc94c2fb85596d1f60e3c",
"address": "0x12080583C4F0211eC382d33a273E6D0f9fAb0F75",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x5FCEC698A187eb16F23a90bA745C5d894437529f",
"address": "0x029d507134bA125e6EBdD02ffbB1B19171503D54",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"GenericLogic": {
"buidlerevm": {
"address": "0x920d847fE49E54C19047ba8bc236C45A8068Bca7",
"address": "0x5F6CaC05CDF893f029b29F44d368eAeD40e573B6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
@ -191,7 +191,7 @@
},
"ValidationLogic": {
"buidlerevm": {
"address": "0xA4765Ff72A9F3CfE73089bb2c3a41B838DF71574",
"address": "0x92cfBAB5A86631e9F1A6126b42E01A74eadA61Df",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
@ -201,8 +201,7 @@
},
"LendingPool": {
"buidlerevm": {
"address": "0x35c1419Da7cf0Ff885B8Ef8EA9242FEF6800c99b",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
"address": "0x6e2ec941EC385E56BDea7eD8fBf78610995B6D91"
},
"kovan": {
"address": "0x04F571451E55fFB4C76551cB6347282284E290e4"
@ -210,7 +209,7 @@
},
"LendingPoolConfigurator": {
"buidlerevm": {
"address": "0x6642B57e4265BAD868C17Fc1d1F4F88DBBA04Aa8"
"address": "0x846CDeeb7ce99204788615020a8cAF50c7e389f3"
},
"kovan": {
"address": "0xF5E4C55A26C32b640DE7c97eA92Ad62D99B371F3"
@ -218,7 +217,7 @@
},
"StableAndVariableTokensHelper": {
"buidlerevm": {
"address": "0x0C6c3C47A1f650809B0D1048FDf9603e09473D7E",
"address": "0x1750499D05Ed1674d822430FB960d5F6731fDf64",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
@ -228,7 +227,7 @@
},
"ATokensAndRatesHelper": {
"buidlerevm": {
"address": "0x06bA8d8af0dF898D0712DffFb0f862cC51AF45c2",
"address": "0xE4C10Db67595aF2Cb4166c8C274e0140f7E43059",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
@ -238,31 +237,31 @@
},
"PriceOracle": {
"buidlerevm": {
"address": "0xb682dEEf4f8e298d86bFc3e21f50c675151FB974",
"address": "0x099d9fF8F818290C8b5B7Db5bFca84CEebd2714c",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockAggregator": {
"buidlerevm": {
"address": "0x3D8FFB457fedDFBc760F3F243283F52692b579B1",
"address": "0xd5C35F41baD857A2D4F34D7554E78d0391BAcEDF",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"ChainlinkProxyPriceProvider": {
"buidlerevm": {
"address": "0xEC1C93A9f6a9e18E97784c76aC52053587FcDB89",
"address": "0xc1cb554de746224c13c1f25478aD0f3fa9e64843",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingRateOracle": {
"buidlerevm": {
"address": "0xAF6BA11790D1942625C0c2dA07da19AB63845cfF",
"address": "0x8Dd7f10813aC8fCB83ad7ad94e941D53b002fBc7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"AaveProtocolTestHelpers": {
"buidlerevm": {
"address": "0xf4830d6b1D70C8595d3BD8A63f9ed9F636DB9ef2"
"address": "0x0bcCE4611Bb4118422549f61e344dd38d65084cb"
},
"kovan": {
"address": "0x607b84e528C2A46218bf868Baf3927645389CD30",
@ -271,7 +270,7 @@
},
"LendingPoolCollateralManager": {
"buidlerevm": {
"address": "0x8D0206fEBEB380486729b64bB4cfEDC5b354a6D6",
"address": "0xE55aA921A1001f0a19241264a50063683D2e1179",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
@ -281,12 +280,12 @@
},
"MockFlashLoanReceiver": {
"buidlerevm": {
"address": "0xfC88832bac6AbdF216BC5A67be68E9DE94aD5ba2"
"address": "0xf89AA2f1397e9A0622c8Fc99aB1947E28b5EF876"
}
},
"WalletBalanceProvider": {
"buidlerevm": {
"address": "0x1256eBA4d0a7A38D10BaF4F61775ba491Ce7EE25",
"address": "0x1a66D6103F8BBf9204E1618F095a80b3E4817C95",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
@ -296,31 +295,31 @@
},
"MockAToken": {
"buidlerevm": {
"address": "0x77B0b5636fEA30eA79BB65AeCCdb599997A849A8",
"address": "0x0EBCa695959e5f138Af772FAa44ce1A9C7aEd921",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockStableDebtToken": {
"buidlerevm": {
"address": "0x78Ee8Fb9fE5abD5e347Fc94c2fb85596d1f60e3c",
"address": "0x417fc1038b2AF553D65F4fF2839efE9f93Ec1eac",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockVariableDebtToken": {
"buidlerevm": {
"address": "0x920d847fE49E54C19047ba8bc236C45A8068Bca7",
"address": "0x8BFFF31B1757da579Bb5B118489568526F7fb6D4",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MintableDelegationERC20": {
"buidlerevm": {
"address": "0x77B0b5636fEA30eA79BB65AeCCdb599997A849A8",
"address": "0x0EBCa695959e5f138Af772FAa44ce1A9C7aEd921",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"AToken": {
"buidlerevm": {
"address": "0x78Ee8Fb9fE5abD5e347Fc94c2fb85596d1f60e3c",
"address": "0x417fc1038b2AF553D65F4fF2839efE9f93Ec1eac",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
@ -329,5 +328,23 @@
"address": "0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"REN": {
"buidlerevm": {
"address": "0x2D8553F9ddA85A9B3259F6Bf26911364B85556F5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"YFI": {
"buidlerevm": {
"address": "0x5bcb88A0d20426e451332eE6C4324b0e663c50E0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI": {
"buidlerevm": {
"address": "0x3521eF8AaB0323004A6dD8b03CE890F4Ea3A13f5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
}
}

View File

@ -381,7 +381,7 @@ export const deployMockTokens = async (config: PoolConfiguration, verify?: boole
const configData = config.ReservesConfig;
for (const tokenSymbol of Object.keys(config.ReserveSymbols)) {
for (const tokenSymbol of Object.keys(configData)) {
tokens[tokenSymbol] = await deployMintableERC20(
[
tokenSymbol,

View File

@ -127,7 +127,7 @@ export const getLendingRateOracle = async (address?: tEthereumAddress) =>
);
export const getMockedTokens = async (config: PoolConfiguration) => {
const tokenSymbols = config.ReserveSymbols;
const tokenSymbols = Object.keys(config.ReservesConfig);
const db = getDb();
const tokens: MockTokenMap = await tokenSymbols.reduce<Promise<MockTokenMap>>(
async (acc, tokenSymbol) => {

View File

@ -187,8 +187,10 @@ export interface iAssetBase<T> {
ZRX: T;
SNX: T;
BUSD: T;
YFI: T;
UNI: T;
USD: T;
REN: T;
UNI_DAI_ETH: T;
UNI_USDC_ETH: T;
@ -221,6 +223,9 @@ export type iAavePoolAssets<T> = Pick<
| 'SNX'
| 'BUSD'
| 'WETH'
| 'YFI'
| 'UNI'
| 'REN'
>;
export type iUniAssets<T> = Pick<
@ -264,9 +269,12 @@ export enum TokenContractId {
KNC = 'KNC',
MANA = 'MANA',
REP = 'REP',
REN = 'REN',
SNX = 'SNX',
BUSD = 'BUSD',
USD = 'USD',
YFI = 'YFI',
UNI = 'UNI',
UNI_DAI_ETH = 'UNI_DAI_ETH',
UNI_USDC_ETH = 'UNI_USDC_ETH',
UNI_SETH_ETH = 'UNI_SETH_ETH',
@ -362,7 +370,6 @@ export interface ILendingRate {
export interface ICommonConfiguration {
ConfigName: string;
ProviderId: number;
ReserveSymbols: string[];
ProtocolGlobalParams: IProtocolGlobalConfig;
Mocks: IMocksConfig;
ProviderRegistry: iParamsPerNetwork<tEthereumAddress | undefined>;

149
package-lock.json generated
View File

@ -3220,16 +3220,6 @@
}
}
},
"call-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
"integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.0"
}
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@ -7042,7 +7032,6 @@
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.5.tgz",
"integrity": "sha512-DpkQ6rwk9jTefrRsJzEm6nhRiJd9pvhn1xN0rw5N/jswXG5r7BLk/GVA0mMAVWAsYfvi2xSc5L41FMox43RYEA==",
"optional": true,
"requires": {
"@ethersproject/bignumber": "^5.0.7",
"@ethersproject/bytes": "^5.0.4",
@ -7056,7 +7045,6 @@
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.8.tgz",
"integrity": "sha512-KXFVAFKS1jdTXYN8BE5Oj+ZfPMh28iRdFeNGBVT6cUFdtiPVqeXqc0ggvBqA3A1VoFFGgM7oAeaagA393aORHA==",
"optional": true,
"requires": {
"@ethersproject/bytes": "^5.0.4",
"@ethersproject/logger": "^5.0.5",
@ -7067,7 +7055,6 @@
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.5.tgz",
"integrity": "sha512-IEj9HpZB+ACS6cZ+QQMTqmu/cnUK2fYNE6ms/PVxjoBjoxc6HCraLpam1KuRvreMy0i523PLmjN8OYeikRdcUQ==",
"optional": true,
"requires": {
"@ethersproject/logger": "^5.0.5"
}
@ -7076,7 +7063,6 @@
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.5.tgz",
"integrity": "sha512-foaQVmxp2+ik9FrLUCtVrLZCj4M3Ibgkqvh+Xw/vFRSerkjVSYePApaVE5essxhoSlF1U9oXfWY09QI2AXtgKA==",
"optional": true,
"requires": {
"@ethersproject/bignumber": "^5.0.7"
}
@ -7085,7 +7071,6 @@
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.5.tgz",
"integrity": "sha512-GpI80/h2HDpfNKpCZoxQJCjOQloGnlD5hM1G+tZe8FQDJhEvFjJoPDuWv+NaYjJfOciKS2Axqc4Q4WamdLoUgg==",
"optional": true,
"requires": {
"@ethersproject/bytes": "^5.0.4",
"@ethersproject/keccak256": "^5.0.3",
@ -7097,7 +7082,6 @@
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.4.tgz",
"integrity": "sha512-GNpiOUm9PGUxFNqOxYKDQBM0u68bG9XC9iOulEQ8I0tOx/4qUpgVzvgXL6ugxr0RY554Gz/NQsVqknqPzUcxpQ==",
"optional": true,
"requires": {
"@ethersproject/bytes": "^5.0.4"
}
@ -7105,14 +7089,12 @@
"@ethersproject/logger": {
"version": "5.0.6",
"resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.6.tgz",
"integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==",
"optional": true
"integrity": "sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ=="
},
"@ethersproject/properties": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.4.tgz",
"integrity": "sha512-UdyX3GqBxFt15B0uSESdDNmhvEbK3ACdDXl2soshoPcneXuTswHDeA0LoPlnaZzhbgk4p6jqb4GMms5C26Qu6A==",
"optional": true,
"requires": {
"@ethersproject/logger": "^5.0.5"
}
@ -7121,7 +7103,6 @@
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.4.tgz",
"integrity": "sha512-5qrrZad7VTjofxSsm7Zg/7Dr4ZOln4S2CqiDdOuTv6MBKnXj0CiBojXyuDy52M8O3wxH0CyE924hXWTDV1PQWQ==",
"optional": true,
"requires": {
"@ethersproject/bytes": "^5.0.4",
"@ethersproject/logger": "^5.0.5"
@ -7131,7 +7112,6 @@
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.5.tgz",
"integrity": "sha512-Z1wY7JC1HVO4CvQWY2TyTTuAr8xK3bJijZw1a9G92JEmKdv1j255R/0YLBBcFTl2J65LUjtXynNJ2GbArPGi5g==",
"optional": true,
"requires": {
"@ethersproject/bytes": "^5.0.4",
"@ethersproject/logger": "^5.0.5",
@ -7143,7 +7123,6 @@
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.5.tgz",
"integrity": "sha512-JED6WaIV00xM/gvj8vSnd+0VWtDYdidTmavFRCTQakqfz+4tDo6Jz5LHgG+dd45h7ah7ykCHW0C7ZXWEDROCXQ==",
"optional": true,
"requires": {
"@ethersproject/bytes": "^5.0.4",
"@ethersproject/constants": "^5.0.4",
@ -8633,7 +8612,6 @@
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz",
"integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==",
"optional": true,
"requires": {
"buffer": "^5.5.0",
"class-is": "^1.1.0",
@ -8646,7 +8624,6 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz",
"integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==",
"optional": true,
"requires": {
"buffer": "^5.6.0",
"varint": "^5.0.0"
@ -8666,8 +8643,7 @@
"class-is": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz",
"integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==",
"optional": true
"integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw=="
},
"class-utils": {
"version": "0.3.6",
@ -12134,10 +12110,7 @@
"is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
}
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY="
},
"is-arguments": {
"version": "1.0.4",
@ -12161,10 +12134,7 @@
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
}
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y="
},
"is-date-object": {
"version": "1.0.2",
@ -12177,8 +12147,7 @@
"integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
"kind-of": "^5.0.0"
"is-data-descriptor": "^0.1.4"
}
},
"is-extendable": {
@ -12210,11 +12179,6 @@
"integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=",
"dev": true
},
"is-negative-zero": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz",
"integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE="
},
"is-object": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz",
@ -12674,6 +12638,15 @@
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true
},
"xtend": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
"dev": true,
"requires": {
"object-keys": "~0.4.0"
}
}
}
},
@ -12853,6 +12826,12 @@
"semaphore": ">=1.0.1"
},
"dependencies": {
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
"dev": true
},
"ethereumjs-util": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz",
@ -12926,6 +12905,23 @@
"dev": true
}
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
}
}
}
}
},
@ -13072,7 +13068,6 @@
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz",
"integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==",
"optional": true,
"requires": {
"base-x": "^3.0.8",
"buffer": "^5.5.0"
@ -13082,7 +13077,6 @@
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz",
"integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==",
"optional": true,
"requires": {
"varint": "^5.0.0"
}
@ -13091,7 +13085,6 @@
"version": "0.4.21",
"resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz",
"integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==",
"optional": true,
"requires": {
"buffer": "^5.5.0",
"multibase": "^0.7.0",
@ -13102,7 +13095,6 @@
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz",
"integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==",
"optional": true,
"requires": {
"base-x": "^3.0.8",
"buffer": "^5.5.0"
@ -13292,9 +13284,9 @@
},
"dependencies": {
"es-abstract": {
"version": "1.18.0-next.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
"version": "1.17.7",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
"integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
@ -13302,7 +13294,6 @@
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
"is-negative-zero": "^2.0.0",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
@ -13333,6 +13324,18 @@
"define-properties": "^1.1.3",
"has-symbols": "^1.0.1",
"object-keys": "^1.1.1"
},
"dependencies": {
"call-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
"integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.0"
}
}
}
}
}
@ -13340,7 +13343,8 @@
"object-keys": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
"dev": true
},
"object-visit": {
"version": "1.0.1",
@ -13370,7 +13374,6 @@
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-negative-zero": "^2.0.0",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
@ -14603,9 +14606,9 @@
},
"dependencies": {
"es-abstract": {
"version": "1.18.0-next.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
"version": "1.17.7",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
"integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
@ -14613,7 +14616,6 @@
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
"is-negative-zero": "^2.0.0",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
@ -14644,6 +14646,18 @@
"define-properties": "^1.1.3",
"has-symbols": "^1.0.1",
"object-keys": "^1.1.1"
},
"dependencies": {
"call-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
"integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.0"
}
}
}
}
}
@ -14675,9 +14689,9 @@
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
}
}
},
@ -15283,8 +15297,7 @@
"varint": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
"integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==",
"optional": true
"integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow=="
},
"vary": {
"version": "1.1.2",
@ -15560,6 +15573,15 @@
"requires": {
"bn.js": "4.11.8",
"web3-utils": "1.2.4"
},
"dependencies": {
"bn.js": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
"dev": true,
"optional": true
}
}
},
"web3-eth-personal": {
@ -16105,6 +16127,13 @@
"utf8": "3.0.0"
},
"dependencies": {
"bn.js": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
"dev": true,
"optional": true
},
"eth-lib": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz",

View File

@ -37,7 +37,7 @@ task('dev:initialize-lending-pool', 'Initialize lending pool configuration.')
const addressesProvider = await getLendingPoolAddressesProvider();
const protoPoolReservesAddresses = <{[symbol: string]: tEthereumAddress}>(
filterMapBy(allTokenAddresses, (key: string) => !key.includes('UNI'))
filterMapBy(allTokenAddresses, (key: string) => !key.includes('UNI_'))
);
const testHelpers = await deployAaveProtocolTestHelpers(addressesProvider.address, verify);

View File

@ -26,12 +26,11 @@ task('full:deploy-oracles', 'Deploy oracles for dev enviroment')
ProtocolGlobalParams: {UsdAddress},
LendingRateOracleRatesCommon,
ReserveAssets,
ReserveSymbols,
FallbackOracle,
ChainlinkAggregator,
} = poolConfig as ICommonConfiguration;
const lendingRateOracles = filterMapBy(LendingRateOracleRatesCommon, (key) =>
ReserveSymbols.includes(key)
Object.keys(ReserveAssets[network]).includes(key)
);
const addressesProvider = await getLendingPoolAddressesProvider();
const admin = await addressesProvider.getAaveAdmin();

View File

@ -87,6 +87,10 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
const aaveAdmin = await deployer.getAddress();
const mockTokens = await deployAllMockTokens(deployer);
const mockTokenAddress = Object.keys(mockTokens).reduce<{[key: string]: string}>((acc, key) => {
acc[key] = mockTokens[key].address;
return acc;
}, {});
const addressesProvider = await deployLendingPoolAddressesProvider();
await waitForTx(await addressesProvider.setAaveAdmin(aaveAdmin));
@ -147,7 +151,9 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
ZRX: mockTokens.ZRX.address,
SNX: mockTokens.SNX.address,
BUSD: mockTokens.BUSD.address,
YFI: mockTokens.BUSD.address,
REN: mockTokens.REN.address,
UNI: mockTokens.UNI.address,
USD: USD_ADDRESS,
UNI_DAI_ETH: mockTokens.UNI_DAI_ETH.address,