From 5ca1a4f05b23c297c3e8241e3c6960f8d184de96 Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Thu, 18 Feb 2021 16:49:29 -0500 Subject: [PATCH 1/6] Re-enabled Sec 3 --- tasks/full/1_address_provider.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tasks/full/1_address_provider.ts b/tasks/full/1_address_provider.ts index ae5fabc0..87e3e23d 100644 --- a/tasks/full/1_address_provider.ts +++ b/tasks/full/1_address_provider.ts @@ -82,15 +82,14 @@ task( // 2. Deploy address provider and set genesis manager const addressesProvider = await deployLendingPoolAddressesProvider(MarketId, verify); - // TEMPORARILY DISABLING SEC. 3 FOR GOVERNANCE USE - + // DISABLE SEC. 3 FOR GOVERNANCE USE! // 3. Set the provider at the Registry - // await waitForTx( - // await addressesProviderRegistry.registerAddressesProvider( - // addressesProvider.address, - // ProviderId - // ) - // ); + await waitForTx( + await addressesProviderRegistry.registerAddressesProvider( + addressesProvider.address, + ProviderId + ) + ); // 4. Set pool admins From a0dbf13d6041deb8866e8eb6b85cfdc48d8a8423 Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Thu, 18 Feb 2021 16:49:54 -0500 Subject: [PATCH 2/6] Reused same Registry owner & price oracle --- markets/lp/commons.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/markets/lp/commons.ts b/markets/lp/commons.ts index da376b39..8ee7e247 100644 --- a/markets/lp/commons.ts +++ b/markets/lp/commons.ts @@ -168,8 +168,8 @@ export const CommonsConfig: ICommonConfiguration = { [eEthereumNetwork.buidlerevm]: '', [eEthereumNetwork.tenderlyMain]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413', }, - ProviderRegistryOwner: { // TEMPORARILY USING MY DEPLOYER - [eEthereumNetwork.kovan]: '0x18d9bA2baEfBdE0FF137C4ad031427EF205f1Fd9',//'0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F', + ProviderRegistryOwner: { // DEPLOYED WITH CORRECT ADDRESS + [eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F', [eEthereumNetwork.ropsten]: '', [eEthereumNetwork.main]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f', [eEthereumNetwork.coverage]: '', @@ -181,7 +181,7 @@ export const CommonsConfig: ICommonConfiguration = { [eEthereumNetwork.coverage]: '', [eEthereumNetwork.hardhat]: '', [eEthereumNetwork.buidlerevm]: '', - [eEthereumNetwork.kovan]: '', //'0xdCde9Bb6a49e37fA433990832AB541AE2d4FEB4a', // Need to re-deploy because of onlyOwner + [eEthereumNetwork.kovan]: '',//'0xdCde9Bb6a49e37fA433990832AB541AE2d4FEB4a', // Need to re-deploy because of onlyOwner [eEthereumNetwork.ropsten]: '0x05dcca805a6562c1bdd0423768754acb6993241b', [eEthereumNetwork.main]: '', //'0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D', // Need to re-deploy because of onlyOwner [eEthereumNetwork.tenderlyMain]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D', @@ -208,7 +208,7 @@ export const CommonsConfig: ICommonConfiguration = { [eEthereumNetwork.coverage]: '', [eEthereumNetwork.hardhat]: '', [eEthereumNetwork.buidlerevm]: '', - [EthereumNetwork.kovan]: '',//'0xB8bE51E6563BB312Cbb2aa26e352516c25c26ac1', // Need to re-deploy because of onlyOwner + [EthereumNetwork.kovan]: '0x8fb777d67e9945e2c01936e319057f9d41d559e6', // Need to re-deploy because of onlyOwner [EthereumNetwork.ropsten]: ZERO_ADDRESS, [EthereumNetwork.main]: '',//'0xA50ba011c48153De246E5192C8f9258A2ba79Ca9', // Need to re-deploy because of onlyOwner [EthereumNetwork.tenderlyMain]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9', From f44879e625b666983cd91233b601c7cc7b1debbc Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Thu, 18 Feb 2021 16:50:15 -0500 Subject: [PATCH 3/6] Fixed missing "waitForTx" --- tasks/full/3_oracles.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tasks/full/3_oracles.ts b/tasks/full/3_oracles.ts index 677681ec..67a8fbd7 100644 --- a/tasks/full/3_oracles.ts +++ b/tasks/full/3_oracles.ts @@ -48,23 +48,17 @@ task('full:deploy-oracles', 'Deploy oracles for dev enviroment') }; const [tokens, aggregators] = getPairsTokenAggregator(tokensToWatch, chainlinkAggregators); - // const aaveOracle = notFalsyOrZeroAddress(aaveOracleAddress) - // ? await getAaveOracle(aaveOracleAddress) - // : await deployAaveOracle( - // [tokens, aggregators, fallbackOracleAddress, await getWethAddress(poolConfig)], - // verify - // ); - let aaveOracle: AaveOracle; if (notFalsyOrZeroAddress(aaveOracleAddress)) { aaveOracle = await getAaveOracle(aaveOracleAddress); - await aaveOracle.setAssetSources(tokens, aggregators); + await waitForTx(await aaveOracle.setAssetSources(tokens, aggregators)); } else { aaveOracle = await deployAaveOracle( [tokens, aggregators, fallbackOracleAddress, await getWethAddress(poolConfig)], verify ); } + const lendingRateOracle = notFalsyOrZeroAddress(lendingRateOracleAddress) ? await getLendingRateOracle(lendingRateOracleAddress) : await deployLendingRateOracle(verify); From 5965ef09d4ee68e66203d33b378ddbf521964986 Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Fri, 19 Feb 2021 15:50:06 -0500 Subject: [PATCH 4/6] Fixed names & added prefixes --- helpers/init-helpers.ts | 16 +-- helpers/types.ts | 124 ++++++++++++----------- markets/aave/commons.ts | 45 +++++---- markets/lp/commons.ts | 198 +++++++++++++++++++------------------ markets/lp/index.ts | 160 +++++++++++++++--------------- tasks/dev/5_initialize.ts | 11 ++- tasks/full/5_initialize.ts | 14 ++- 7 files changed, 302 insertions(+), 266 deletions(-) diff --git a/helpers/init-helpers.ts b/helpers/init-helpers.ts index e2ced0d7..3f6ce5f4 100644 --- a/helpers/init-helpers.ts +++ b/helpers/init-helpers.ts @@ -44,6 +44,10 @@ export const chooseATokenDeployment = (id: eContractid) => { export const initReservesByHelper = async ( reservesParams: iMultiPoolsAssets, tokenAddresses: { [symbol: string]: tEthereumAddress }, + aTokenNamePrefix: string, + stableDebtTokenNamePrefix: string, + variableDebtTokenNamePrefix: string, + symbolPrefix: string, admin: tEthereumAddress, treasuryAddress: tEthereumAddress, incentivesController: tEthereumAddress, @@ -194,12 +198,12 @@ export const initReservesByHelper = async ( treasury: treasuryAddress, incentivesController: ZERO_ADDRESS, underlyingAssetName: reserveSymbols[i], - aTokenName: `Aave interest bearing ${reserveSymbols[i]}`, - aTokenSymbol: `a${reserveSymbols[i]}`, - variableDebtTokenName: `Aave variable debt bearing ${reserveSymbols[i]}`, - variableDebtTokenSymbol: `variableDebt${reserveSymbols[i]}`, - stableDebtTokenName: `Aave stable debt bearing ${reserveSymbols[i]}`, - stableDebtTokenSymbol: `stableDebt${reserveSymbols[i]}` + aTokenName: `${aTokenNamePrefix} ${reserveSymbols[i]}`, + aTokenSymbol: `a${symbolPrefix}${reserveSymbols[i]}`, + variableDebtTokenName: `${variableDebtTokenNamePrefix} ${symbolPrefix}${reserveSymbols[i]}`, + variableDebtTokenSymbol: `variableDebt${symbolPrefix}${reserveSymbols[i]}`, + stableDebtTokenName: `${stableDebtTokenNamePrefix} ${reserveSymbols[i]}`, + stableDebtTokenSymbol: `stableDebt${symbolPrefix}${reserveSymbols[i]}` }); } diff --git a/helpers/types.ts b/helpers/types.ts index 54c75180..57a9bfd3 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -205,26 +205,26 @@ export interface iAssetBase { USD: T; REN: T; ENJ: T; - LpWETH: T; - LpWBTC: T; - LpDAI: T; - LpUSDC: T; - LpUSDT: T; - LpUniDAIWETH: T; - LpUniWBTCWETH: T; - LpUniAAVEWETH: T; - LpUniBATWETH: T; - LpUniUSDCDAI: T; - LpUniCRVWETH: T; - LpUniLINKWETH: T; - LpUniMKRWETH: T; - LpUniRENWETH: T; - LpUniSNXWETH: T; - LpUniUNIWETH: T; - LpUniUSDCWETH: T; - LpUniWBTCUSDC: T; - LpUniYFIWETH: T; - LpBalWBTCWETH: T; + // LpWETH: T; + // LpWBTC: T; + // LpDAI: T; + // LpUSDC: T; + // LpUSDT: T; + UniDAIWETH: T; + UniWBTCWETH: T; + UniAAVEWETH: T; + UniBATWETH: T; + UniUSDCDAI: T; + UniCRVWETH: T; + UniLINKWETH: T; + UniMKRWETH: T; + UniRENWETH: T; + UniSNXWETH: T; + UniUNIWETH: T; + UniUSDCWETH: T; + UniWBTCUSDC: T; + UniYFIWETH: T; + BptWBTCWETH: T; } export type iAssetsWithoutETH = Omit, 'ETH'>; @@ -257,26 +257,26 @@ export type iAavePoolAssets = Pick< export type iLpPoolAssets = Pick< iAssetsWithoutUSD, - | 'LpDAI' - | 'LpUSDC' - | 'LpUSDT' - | 'LpWBTC' - | 'LpWETH' - | 'LpUniDAIWETH' - | 'LpUniWBTCWETH' - | 'LpUniAAVEWETH' - | 'LpUniBATWETH' - | 'LpUniUSDCDAI' - | 'LpUniCRVWETH' - | 'LpUniLINKWETH' - | 'LpUniMKRWETH' - | 'LpUniRENWETH' - | 'LpUniSNXWETH' - | 'LpUniUNIWETH' - | 'LpUniUSDCWETH' - | 'LpUniWBTCUSDC' - | 'LpUniYFIWETH' - | 'LpBalWBTCWETH' + | 'DAI' + | 'USDC' + | 'USDT' + | 'WBTC' + | 'WETH' + | 'UniDAIWETH' + | 'UniWBTCWETH' + | 'UniAAVEWETH' + | 'UniBATWETH' + | 'UniUSDCDAI' + | 'UniCRVWETH' + | 'UniLINKWETH' + | 'UniMKRWETH' + | 'UniRENWETH' + | 'UniSNXWETH' + | 'UniUNIWETH' + | 'UniUSDCWETH' + | 'UniWBTCUSDC' + | 'UniYFIWETH' + | 'BptWBTCWETH' >; export type iMultiPoolsAssets = iAssetCommon | iAavePoolAssets; @@ -307,26 +307,26 @@ export enum TokenContractId { YFI = 'YFI', UNI = 'UNI', ENJ = 'ENJ', - LpWETH = 'LpWETH', - LpWBTC = 'LpWBTC', - LpDAI = 'LpDAI', - LpUSDC = 'LpUSDC', - LpUSDT = 'LpUSDT', - LpUniDAIWETH = 'LpUniDAIWETH', - LpUniWBTCWETH = 'LpUniWBTCWETH', - LpUniAAVEWETH = 'LpUniAAVEWETH', - LpUniBATWETH = 'LpUniBATWETH', - LpUniUSDCDAI = 'LpUniUSDCDAI', - LpUniCRVWETH = 'LpUniCRVWETH', - LpUniLINKWETH = 'LpUniLINKWETH', - LpUniMKRWETH = 'LpUniMKRWETH', - LpUniRENWETH = 'LpUniRENWETH', - LpUniSNXWETH = 'LpUniSNXWETH', - LpUniUNIWETH = 'LpUniUNIWETH', - LpUniUSDCWETH = 'LpUniUSDCWETH', - LpUniWBTCUSDC = 'LpUniWBTCUSDC', - LpUniYFIWETH = 'LpUniYFIWETH', - LpBalWBTCWETH = 'LpBalWBTCWETH', + // LpWETH = 'LpWETH', + // LpWBTC = 'LpWBTC', + // LpDAI = 'LpDAI', + // LpUSDC = 'LpUSDC', + // LpUSDT = 'LpUSDT', + UniDAIWETH = 'UniDAIWETH', + UniWBTCWETH = 'UniWBTCWETH', + UniAAVEWETH = 'UniAAVEWETH', + UniBATWETH = 'UniBATWETH', + UniUSDCDAI = 'UniUSDCDAI', + UniCRVWETH = 'UniCRVWETH', + UniLINKWETH = 'UniLINKWETH', + UniMKRWETH = 'UniMKRWETH', + UniRENWETH = 'UniRENWETH', + UniSNXWETH = 'UniSNXWETH', + UniUNIWETH = 'UniUNIWETH', + UniUSDCWETH = 'UniUSDCWETH', + UniWBTCUSDC = 'UniWBTCUSDC', + UniYFIWETH = 'UniYFIWETH', + BptWBTCWETH = 'BptWBTCWETH', } export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams { @@ -428,6 +428,10 @@ export interface ILendingRate { export interface ICommonConfiguration { MarketId: string; + ATokenNamePrefix: string; + StableDebtTokenNamePrefix: string; + VariableDebtTokenNamePrefix: string; + SymbolPrefix: string; ProviderId: number; ProtocolGlobalParams: IProtocolGlobalConfig; Mocks: IMocksConfig; diff --git a/markets/aave/commons.ts b/markets/aave/commons.ts index f5992dba..5571be27 100644 --- a/markets/aave/commons.ts +++ b/markets/aave/commons.ts @@ -23,35 +23,38 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = { WBTC: oneEther.multipliedBy('47.332685').toFixed(), YFI: oneEther.multipliedBy('22.407436').toFixed(), ZRX: oneEther.multipliedBy('0.001151').toFixed(), - LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(), - LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(), - LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(), - LpWBTC: oneEther.multipliedBy('47.332685').toFixed(), - LpWETH: oneEther.toFixed(), - LpUniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(), - LpUniBATWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(), - LpUniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(), - LpUniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniRENWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(), - LpUniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpBalWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), + // LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(), + // LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(), + // LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(), + // LpWBTC: oneEther.multipliedBy('47.332685').toFixed(), + // LpWETH: oneEther.toFixed(), + UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(), + UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(), + UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(), + UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(), + UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(), + BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), USD: '5848466240000000', }; - // ---------------- // PROTOCOL GLOBAL PARAMS // ---------------- export const CommonsConfig: ICommonConfiguration = { MarketId: 'Commons', + ATokenNamePrefix: 'Aave interest bearing', + StableDebtTokenNamePrefix: 'Aave stable debt bearing', + VariableDebtTokenNamePrefix: 'Aave variable debt bearing', + SymbolPrefix: '', ProviderId: 0, ProtocolGlobalParams: { TokenDistributorPercentageBase: '10000', diff --git a/markets/lp/commons.ts b/markets/lp/commons.ts index 8ee7e247..d29b7d29 100644 --- a/markets/lp/commons.ts +++ b/markets/lp/commons.ts @@ -23,26 +23,26 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = { WBTC: oneEther.multipliedBy('47.332685').toFixed(), YFI: oneEther.multipliedBy('22.407436').toFixed(), ZRX: oneEther.multipliedBy('0.001151').toFixed(), - LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(), - LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(), - LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(), - LpWBTC: oneEther.multipliedBy('47.332685').toFixed(), - LpWETH: oneEther.toFixed(), - LpUniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(), - LpUniBATWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(), - LpUniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(), - LpUniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniRENWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpUniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(), - LpUniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(), - LpBalWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), + // DAI: oneEther.multipliedBy('0.00369068412860').toFixed(), + // USDC: oneEther.multipliedBy('0.00367714136416').toFixed(), + // USDT: oneEther.multipliedBy('0.00369068412860').toFixed(), + // WBTC: oneEther.multipliedBy('47.332685').toFixed(), + // WETH: oneEther.toFixed(), + UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(), + UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(), + UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(), + UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(), + UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(), + UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(), + BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), USD: '5848466240000000', }; // ---------------- @@ -51,6 +51,10 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = { export const CommonsConfig: ICommonConfiguration = { MarketId: 'Commons', + ATokenNamePrefix: 'Aave AMM Market', + StableDebtTokenNamePrefix: 'Aave AMM Market stable debt', + VariableDebtTokenNamePrefix: 'Aave AMM Market variable debt', + SymbolPrefix: 'Amm', ProviderId: 0, ProtocolGlobalParams: { TokenDistributorPercentageBase: '10000', @@ -72,64 +76,64 @@ export const CommonsConfig: ICommonConfiguration = { }, // TODO: reorg alphabetically, checking the reason of tests failing LendingRateOracleRatesCommon: { - LpWETH: { + WETH: { borrowRate: oneRay.multipliedBy(0.03).toFixed(), }, - LpDAI: { + DAI: { borrowRate: oneRay.multipliedBy(0.039).toFixed(), }, - LpUSDC: { + USDC: { borrowRate: oneRay.multipliedBy(0.039).toFixed(), }, - LpUSDT: { + USDT: { borrowRate: oneRay.multipliedBy(0.035).toFixed(), }, - LpWBTC: { + WBTC: { borrowRate: oneRay.multipliedBy(0.03).toFixed(), }, - LpUniDAIWETH: { + UniDAIWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniWBTCWETH: { + UniWBTCWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniAAVEWETH:{ + UniAAVEWETH:{ borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniBATWETH: { + UniBATWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniUSDCDAI: { + UniUSDCDAI: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniCRVWETH: { + UniCRVWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniLINKWETH: { + UniLINKWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniMKRWETH: { + UniMKRWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniRENWETH: { + UniRENWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniSNXWETH: { + UniSNXWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniUNIWETH: { + UniUNIWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniUSDCWETH: { + UniUSDCWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniWBTCUSDC: { + UniWBTCUSDC: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpUniYFIWETH: { + UniYFIWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, - LpBalWBTCWETH: { + BptWBTCWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, }, @@ -227,71 +231,71 @@ export const CommonsConfig: ICommonConfiguration = { [eEthereumNetwork.hardhat]: {}, [eEthereumNetwork.buidlerevm]: {}, [EthereumNetwork.kovan]: { - LpUSDT: '0x0bF499444525a23E7Bb61997539725cA2e928138', - LpWBTC: '0xF7904a295A029a3aBDFFB6F12755974a958C7C25', - LpUSDC: '0x64EaC61A2DFda2c3Fa04eED49AA33D021AeC8838', - LpDAI:'0x22B58f1EbEDfCA50feF632bD73368b2FdA96D541', - LpUniDAIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', // Mock oracles - LpUniWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniAAVEWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniBATWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniUSDCDAI: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniCRVWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniLINKWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniMKRWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniRENWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniSNXWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniUNIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniUSDCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniWBTCUSDC: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpUniYFIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', - LpBalWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + USDT: '0x0bF499444525a23E7Bb61997539725cA2e928138', + WBTC: '0xF7904a295A029a3aBDFFB6F12755974a958C7C25', + USDC: '0x64EaC61A2DFda2c3Fa04eED49AA33D021AeC8838', + DAI:'0x22B58f1EbEDfCA50feF632bD73368b2FdA96D541', + UniDAIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', // Mock oracles + UniWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniAAVEWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniBATWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniUSDCDAI: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniCRVWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniLINKWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniMKRWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniRENWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniSNXWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniUNIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniUSDCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniWBTCUSDC: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + UniYFIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + BptWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', }, [EthereumNetwork.ropsten]: { }, [EthereumNetwork.main]: { - LpUSDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46', - LpWBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8', - LpUSDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4', - LpDAI:'0x773616E4d11A78F511299002da57A0a94577F1f4', - LpUniDAIWETH: '0xf4071801C4421Db7e63DaC15B9432e50C44a7F42', - LpUniWBTCWETH: ZERO_ADDRESS, - LpUniAAVEWETH: ZERO_ADDRESS, - LpUniBATWETH: ZERO_ADDRESS, - LpUniUSDCDAI: ZERO_ADDRESS, - LpUniCRVWETH: ZERO_ADDRESS, - LpUniLINKWETH: ZERO_ADDRESS, - LpUniMKRWETH: ZERO_ADDRESS, - LpUniRENWETH: ZERO_ADDRESS, - LpUniSNXWETH: ZERO_ADDRESS, - LpUniUNIWETH: ZERO_ADDRESS, - LpUniUSDCWETH: ZERO_ADDRESS, - LpUniWBTCUSDC: ZERO_ADDRESS, - LpUniYFIWETH: ZERO_ADDRESS, - LpBalWBTCWETH: ZERO_ADDRESS, + USDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46', + WBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8', + USDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4', + DAI:'0x773616E4d11A78F511299002da57A0a94577F1f4', + UniDAIWETH: '0xf4071801C4421Db7e63DaC15B9432e50C44a7F42', + UniWBTCWETH: ZERO_ADDRESS, + UniAAVEWETH: ZERO_ADDRESS, + UniBATWETH: ZERO_ADDRESS, + UniUSDCDAI: ZERO_ADDRESS, + UniCRVWETH: ZERO_ADDRESS, + UniLINKWETH: ZERO_ADDRESS, + UniMKRWETH: ZERO_ADDRESS, + UniRENWETH: ZERO_ADDRESS, + UniSNXWETH: ZERO_ADDRESS, + UniUNIWETH: ZERO_ADDRESS, + UniUSDCWETH: ZERO_ADDRESS, + UniWBTCUSDC: ZERO_ADDRESS, + UniYFIWETH: ZERO_ADDRESS, + BptWBTCWETH: ZERO_ADDRESS, USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', }, [EthereumNetwork.tenderlyMain]: { - LpUSDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46', - LpWBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8', - LpUSDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4', - LpDAI:'0x773616E4d11A78F511299002da57A0a94577F1f4', - LpUniDAIWETH: ZERO_ADDRESS, - LpUniWBTCWETH: ZERO_ADDRESS, - LpUniAAVEWETH: ZERO_ADDRESS, - LpUniBATWETH: ZERO_ADDRESS, - LpUniUSDCDAI: ZERO_ADDRESS, - LpUniCRVWETH: ZERO_ADDRESS, - LpUniLINKWETH: ZERO_ADDRESS, - LpUniMKRWETH: ZERO_ADDRESS, - LpUniRENWETH: ZERO_ADDRESS, - LpUniSNXWETH: ZERO_ADDRESS, - LpUniUNIWETH: ZERO_ADDRESS, - LpUniUSDCWETH: ZERO_ADDRESS, - LpUniWBTCUSDC: ZERO_ADDRESS, - LpUniYFIWETH: ZERO_ADDRESS, - LpBalWBTCWETH: ZERO_ADDRESS, + USDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46', + WBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8', + USDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4', + DAI:'0x773616E4d11A78F511299002da57A0a94577F1f4', + UniDAIWETH: ZERO_ADDRESS, + UniWBTCWETH: ZERO_ADDRESS, + UniAAVEWETH: ZERO_ADDRESS, + UniBATWETH: ZERO_ADDRESS, + UniUSDCDAI: ZERO_ADDRESS, + UniCRVWETH: ZERO_ADDRESS, + UniLINKWETH: ZERO_ADDRESS, + UniMKRWETH: ZERO_ADDRESS, + UniRENWETH: ZERO_ADDRESS, + UniSNXWETH: ZERO_ADDRESS, + UniUNIWETH: ZERO_ADDRESS, + UniUSDCWETH: ZERO_ADDRESS, + UniWBTCUSDC: ZERO_ADDRESS, + UniYFIWETH: ZERO_ADDRESS, + BptWBTCWETH: ZERO_ADDRESS, USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', }, }, diff --git a/markets/lp/index.ts b/markets/lp/index.ts index c1105a05..5886bf85 100644 --- a/markets/lp/index.ts +++ b/markets/lp/index.ts @@ -33,98 +33,98 @@ export const lpConfig: ILpConfiguration = { MarketId: 'Aave LP market', ProviderId: 2, ReservesConfig: { - LpWETH: strategyWETH, - LpDAI: strategyDAI, - LpUSDC: strategyUSDC, - LpUSDT: strategyUSDT, - LpWBTC: strategyWBTC, - LpUniDAIWETH: strategyDAIWETH, - LpUniWBTCWETH: strategyWBTCWETH, - LpUniAAVEWETH: strategyAAVEWETH, - LpUniBATWETH: strategyBATWETH, - LpUniUSDCDAI: strategyUSDCDAI, - LpUniCRVWETH: strategyCRVWETH, - LpUniLINKWETH: strategyLINKWETH, - LpUniMKRWETH: strategyMKRWETH, - LpUniRENWETH: strategyRENWETH, - LpUniSNXWETH: strategySNXWETH, - LpUniUNIWETH: strategyUNIWETH, - LpUniUSDCWETH: strategyUSDCWETH, - LpUniWBTCUSDC: strategyWBTCUSDC, - LpUniYFIWETH: strategyYFIWETH, - LpBalWBTCWETH: strategyWBTCWETH, + WETH: strategyWETH, + DAI: strategyDAI, + USDC: strategyUSDC, + USDT: strategyUSDT, + WBTC: strategyWBTC, + UniDAIWETH: strategyDAIWETH, + UniWBTCWETH: strategyWBTCWETH, + UniAAVEWETH: strategyAAVEWETH, + UniBATWETH: strategyBATWETH, + UniUSDCDAI: strategyUSDCDAI, + UniCRVWETH: strategyCRVWETH, + UniLINKWETH: strategyLINKWETH, + UniMKRWETH: strategyMKRWETH, + UniRENWETH: strategyRENWETH, + UniSNXWETH: strategySNXWETH, + UniUNIWETH: strategyUNIWETH, + UniUSDCWETH: strategyUSDCWETH, + UniWBTCUSDC: strategyWBTCUSDC, + UniYFIWETH: strategyYFIWETH, + BptWBTCWETH: strategyWBTCWETH, }, ReserveAssets: { [eEthereumNetwork.buidlerevm]: {}, [eEthereumNetwork.hardhat]: {}, [eEthereumNetwork.coverage]: {}, [EthereumNetwork.kovan]: { - LpDAI: '0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD', - LpUSDC: '0xe22da380ee6B445bb8273C81944ADEB6E8450422', - LpUSDT: '0x13512979ADE267AB5100878E2e0f485B568328a4', - LpWBTC: '0xD1B98B6607330172f1D991521145A22BCe793277', - LpWETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', - LpUniDAIWETH: '0x7e48b02B21D784e79E17b06988fc150c8b5945df', - LpUniWBTCWETH: '0x4Fd18882730dc5f945d5049C3f99Ee43CCA1F3d9', - LpUniAAVEWETH: '0xC173038224d47e11962bb0Bd10e036c573C57dF0', - LpUniBATWETH: '0xfC482c56A91Cc92019FF6522B2FB76F41B7e2535', - LpUniUSDCDAI: '0xFD0795980D4c37Fd867228C86A1f7693C9219142', - LpUniCRVWETH: '0xC7f1899F8B5861d8A3Ce1385194bc130A15C8a74', - LpUniLINKWETH: '0xCe2355F9249ced9E51ecc35AbB749352C2557D0d', - LpUniMKRWETH: '0xDCf7A28f4102B7f5813148cCEFb02134648E6F0C', - LpUniRENWETH: '0xe46C9459833bBa061471DF2a383D27a20FE97E23', - LpUniSNXWETH: '0xAa5826dea7cfEc02AcB644b24387bE2648feAbB9', - LpUniUNIWETH: '0xD4C255B5500cFB262EB5F9105Ea546Aa0610A0d3', - LpUniUSDCWETH: '0x509f6ce2F9718E3dd854cCE1857FabCc59C6dd5e', - LpUniWBTCUSDC: '0x9D15e3A14926A16C9B285A5c6bd6c9e82d5F8031', - LpUniYFIWETH: '0xC6Dc783B3C2E2Cbf71791d253f8b4993D40DBf98', - LpBalWBTCWETH: '0x930087451C5940B28bE556d32a4CF22D5d9754A1', + DAI: '0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD', + USDC: '0xe22da380ee6B445bb8273C81944ADEB6E8450422', + USDT: '0x13512979ADE267AB5100878E2e0f485B568328a4', + WBTC: '0xD1B98B6607330172f1D991521145A22BCe793277', + WETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', + UniDAIWETH: '0x7e48b02B21D784e79E17b06988fc150c8b5945df', + UniWBTCWETH: '0x4Fd18882730dc5f945d5049C3f99Ee43CCA1F3d9', + UniAAVEWETH: '0xC173038224d47e11962bb0Bd10e036c573C57dF0', + UniBATWETH: '0xfC482c56A91Cc92019FF6522B2FB76F41B7e2535', + UniUSDCDAI: '0xFD0795980D4c37Fd867228C86A1f7693C9219142', + UniCRVWETH: '0xC7f1899F8B5861d8A3Ce1385194bc130A15C8a74', + UniLINKWETH: '0xCe2355F9249ced9E51ecc35AbB749352C2557D0d', + UniMKRWETH: '0xDCf7A28f4102B7f5813148cCEFb02134648E6F0C', + UniRENWETH: '0xe46C9459833bBa061471DF2a383D27a20FE97E23', + UniSNXWETH: '0xAa5826dea7cfEc02AcB644b24387bE2648feAbB9', + UniUNIWETH: '0xD4C255B5500cFB262EB5F9105Ea546Aa0610A0d3', + UniUSDCWETH: '0x509f6ce2F9718E3dd854cCE1857FabCc59C6dd5e', + UniWBTCUSDC: '0x9D15e3A14926A16C9B285A5c6bd6c9e82d5F8031', + UniYFIWETH: '0xC6Dc783B3C2E2Cbf71791d253f8b4993D40DBf98', + BptWBTCWETH: '0x930087451C5940B28bE556d32a4CF22D5d9754A1', }, [EthereumNetwork.ropsten]: { }, [EthereumNetwork.main]: { - LpDAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - LpUSDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', - LpUSDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7', - LpWBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', - LpWETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', - LpUniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11', - LpUniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940', - LpUniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f', - LpUniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838', - LpUniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5', - LpUniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE', - LpUniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974', - LpUniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225', - LpUniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c', - LpUniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47', - LpUniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17', - LpUniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc', - LpUniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', - LpUniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', - LpBalWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', + DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + USDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7', + WBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', + WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', + UniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11', + UniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940', + UniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f', + UniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838', + UniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5', + UniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE', + UniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974', + UniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225', + UniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c', + UniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47', + UniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17', + UniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc', + UniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', + UniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', + BptWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', }, [EthereumNetwork.tenderlyMain]: { - LpDAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - LpUSDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', - LpUSDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7', - LpWBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', - LpWETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', - LpUniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11', - LpUniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940', - LpUniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f', - LpUniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838', - LpUniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5', - LpUniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE', - LpUniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974', - LpUniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225', - LpUniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c', - LpUniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47', - LpUniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17', - LpUniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc', - LpUniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', - LpUniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', - LpBalWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', + DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + USDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7', + WBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', + WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', + UniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11', + UniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940', + UniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f', + UniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838', + UniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5', + UniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE', + UniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974', + UniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225', + UniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c', + UniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47', + UniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17', + UniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc', + UniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', + UniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', + BptWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', }, }, }; diff --git a/tasks/dev/5_initialize.ts b/tasks/dev/5_initialize.ts index 37744343..983b7454 100644 --- a/tasks/dev/5_initialize.ts +++ b/tasks/dev/5_initialize.ts @@ -31,7 +31,12 @@ task('dev:initialize-lending-pool', 'Initialize lending pool configuration.') .setAction(async ({ verify, pool }, localBRE) => { await localBRE.run('set-DRE'); const poolConfig = loadPoolConfig(pool); - + const { + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, + } = poolConfig; const mockTokens = await getAllMockedTokens(); const allTokenAddresses = getAllTokenAddresses(mockTokens); @@ -52,6 +57,10 @@ task('dev:initialize-lending-pool', 'Initialize lending pool configuration.') await initReservesByHelper( reservesParams, protoPoolReservesAddresses, + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, admin, treasuryAddress, ZERO_ADDRESS, diff --git a/tasks/full/5_initialize.ts b/tasks/full/5_initialize.ts index a8e93f7e..99725034 100644 --- a/tasks/full/5_initialize.ts +++ b/tasks/full/5_initialize.ts @@ -29,7 +29,15 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.') await localBRE.run('set-DRE'); const network = localBRE.network.name; const poolConfig = loadPoolConfig(pool); - const { ReserveAssets, ReservesConfig, LendingPoolCollateralManager } = poolConfig as ICommonConfiguration; + const { + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, + ReserveAssets, + ReservesConfig, + LendingPoolCollateralManager + } = poolConfig as ICommonConfiguration; const reserveAssets = await getParamPerNetwork(ReserveAssets, network); @@ -47,6 +55,10 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.') await initReservesByHelper( ReservesConfig, reserveAssets, + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, admin, treasuryAddress, ZERO_ADDRESS, From ebc147866f7b87eb6ea11ce61cbda04024083671 Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Fri, 19 Feb 2021 15:50:13 -0500 Subject: [PATCH 5/6] Fixed tests with new prefixes --- test-suites/test-aave/__setup.spec.ts | 55 ++++--- test-suites/test-lp/__setup.spec.ts | 56 ++++--- test-suites/test-lp/atoken-transfer.spec.ts | 2 +- test-suites/test-lp/helpers/make-suite.ts | 10 +- .../helpers/scenarios/borrow-negatives.json | 20 +-- .../scenarios/borrow-repay-stable.json | 142 ++++++++--------- .../scenarios/borrow-repay-variable.json | 144 +++++++++--------- .../helpers/scenarios/credit-delegation.json | 8 +- .../test-lp/helpers/scenarios/deposit.json | 42 ++--- .../scenarios/rebalance-stable-rate.json | 32 ++-- .../scenarios/set-use-as-collateral.json | 36 ++--- .../helpers/scenarios/swap-rate-mode.json | 44 +++--- .../helpers/scenarios/withdraw-negatives.json | 22 +-- .../test-lp/helpers/scenarios/withdraw.json | 76 ++++----- .../test-lp/helpers/utils/calculations.ts | 6 +- test-suites/test-lp/stable-token.spec.ts | 2 +- test-suites/test-lp/upgradeability.spec.ts | 18 +-- 17 files changed, 368 insertions(+), 347 deletions(-) diff --git a/test-suites/test-aave/__setup.spec.ts b/test-suites/test-aave/__setup.spec.ts index 466a5abf..006e0d74 100644 --- a/test-suites/test-aave/__setup.spec.ts +++ b/test-suites/test-aave/__setup.spec.ts @@ -95,7 +95,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { const aaveAdmin = await deployer.getAddress(); const mockTokens = await deployAllMockTokens(deployer); - + console.log("Deployed mocks"); const addressesProvider = await deployLendingPoolAddressesProvider(AaveConfig.MarketId); await waitForTx(await addressesProvider.setPoolAdmin(aaveAdmin)); @@ -165,33 +165,33 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { REN: mockTokens.REN.address, UNI: mockTokens.UNI.address, ENJ: mockTokens.ENJ.address, - LpDAI: mockTokens.LpDAI.address, - LpUSDC: mockTokens.LpUSDC.address, - LpUSDT: mockTokens.LpUSDT.address, - LpWBTC: mockTokens.LpWBTC.address, - LpWETH: mockTokens.LpWETH.address, - LpUniDAIWETH: mockTokens.LpUniDAIWETH.address, - LpUniWBTCWETH: mockTokens.LpUniWBTCWETH.address, - LpUniAAVEWETH: mockTokens.LpUniAAVEWETH.address, - LpUniBATWETH: mockTokens.LpUniBATWETH.address, - LpUniUSDCDAI: mockTokens.LpUniUSDCDAI.address, - LpUniCRVWETH: mockTokens.LpUniCRVWETH.address, - LpUniLINKWETH: mockTokens.LpUniLINKWETH.address, - LpUniMKRWETH: mockTokens.LpUniMKRWETH.address, - LpUniRENWETH: mockTokens.LpUniRENWETH.address, - LpUniSNXWETH: mockTokens.LpUniSNXWETH.address, - LpUniUNIWETH: mockTokens.LpUniUNIWETH.address, - LpUniUSDCWETH: mockTokens.LpUniUSDCWETH.address, - LpUniWBTCUSDC: mockTokens.LpUniWBTCUSDC.address, - LpUniYFIWETH: mockTokens.LpUniYFIWETH.address, - LpBalWBTCWETH: mockTokens.LpBalWBTCWETH.address, + // DAI: mockTokens.LpDAI.address, + // USDC: mockTokens.LpUSDC.address, + // USDT: mockTokens.LpUSDT.address, + // WBTC: mockTokens.LpWBTC.address, + // WETH: mockTokens.LpWETH.address, + UniDAIWETH: mockTokens.UniDAIWETH.address, + UniWBTCWETH: mockTokens.UniWBTCWETH.address, + UniAAVEWETH: mockTokens.UniAAVEWETH.address, + UniBATWETH: mockTokens.UniBATWETH.address, + UniUSDCDAI: mockTokens.UniUSDCDAI.address, + UniCRVWETH: mockTokens.UniCRVWETH.address, + UniLINKWETH: mockTokens.UniLINKWETH.address, + UniMKRWETH: mockTokens.UniMKRWETH.address, + UniRENWETH: mockTokens.UniRENWETH.address, + UniSNXWETH: mockTokens.UniSNXWETH.address, + UniUNIWETH: mockTokens.UniUNIWETH.address, + UniUSDCWETH: mockTokens.UniUSDCWETH.address, + UniWBTCUSDC: mockTokens.UniWBTCUSDC.address, + UniYFIWETH: mockTokens.UniYFIWETH.address, + BptWBTCWETH: mockTokens.BptWBTCWETH.address, USD: USD_ADDRESS, }, fallbackOracle ); const mockAggregators = await deployAllMockAggregators(MOCK_CHAINLINK_AGGREGATORS_PRICES); - + console.log("Mock aggs deployed"); const allTokenAddresses = Object.entries(mockTokens).reduce( (accum: { [tokenSymbol: string]: tEthereumAddress }, [tokenSymbol, tokenContract]) => ({ ...accum, @@ -237,16 +237,27 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { const config = loadPoolConfig(ConfigNames.Aave); + const { + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, + } = config; const treasuryAddress = await getTreasuryAddress(config); await initReservesByHelper( reservesParams, allReservesAddresses, + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, admin, treasuryAddress, ZERO_ADDRESS, false ); + await configureReservesByHelper(reservesParams, allReservesAddresses, testHelpers, admin); const collateralManager = await deployLendingPoolCollateralManager(); diff --git a/test-suites/test-lp/__setup.spec.ts b/test-suites/test-lp/__setup.spec.ts index d38df0f9..09c02efc 100644 --- a/test-suites/test-lp/__setup.spec.ts +++ b/test-suites/test-lp/__setup.spec.ts @@ -66,7 +66,7 @@ const deployAllMockTokens = async (deployer: Signer) => { const lpConfigData = getReservesConfigByPool(AavePools.lp); for (const tokenSymbol of Object.keys(TokenContractId)) { - if (tokenSymbol === 'LpWETH') { + if (tokenSymbol === 'WETH') { tokens[tokenSymbol] = await deployWETHMocked(); await registerContractInJsonDb('WETH', tokens[tokenSymbol]); continue; @@ -165,26 +165,26 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { REN: mockTokens.REN.address, UNI: mockTokens.UNI.address, ENJ: mockTokens.ENJ.address, - LpDAI: mockTokens.LpDAI.address, - LpUSDC: mockTokens.LpUSDC.address, - LpUSDT: mockTokens.LpUSDT.address, - LpWBTC: mockTokens.LpWBTC.address, - LpWETH: mockTokens.LpWETH.address, - LpUniDAIWETH: mockTokens.LpUniDAIWETH.address, - LpUniWBTCWETH: mockTokens.LpUniWBTCWETH.address, - LpUniAAVEWETH: mockTokens.LpUniAAVEWETH.address, - LpUniBATWETH: mockTokens.LpUniBATWETH.address, - LpUniUSDCDAI: mockTokens.LpUniUSDCDAI.address, - LpUniCRVWETH: mockTokens.LpUniCRVWETH.address, - LpUniLINKWETH: mockTokens.LpUniLINKWETH.address, - LpUniMKRWETH: mockTokens.LpUniMKRWETH.address, - LpUniRENWETH: mockTokens.LpUniRENWETH.address, - LpUniSNXWETH: mockTokens.LpUniSNXWETH.address, - LpUniUNIWETH: mockTokens.LpUniUNIWETH.address, - LpUniUSDCWETH: mockTokens.LpUniUSDCWETH.address, - LpUniWBTCUSDC: mockTokens.LpUniWBTCUSDC.address, - LpUniYFIWETH: mockTokens.LpUniYFIWETH.address, - LpBalWBTCWETH: mockTokens.LpBalWBTCWETH.address, + // DAI: mockTokens.LpDAI.address, + // USDC: mockTokens.LpUSDC.address, + // USDT: mockTokens.LpUSDT.address, + // WBTC: mockTokens.LpWBTC.address, + // WETH: mockTokens.LpWETH.address, + UniDAIWETH: mockTokens.UniDAIWETH.address, + UniWBTCWETH: mockTokens.UniWBTCWETH.address, + UniAAVEWETH: mockTokens.UniAAVEWETH.address, + UniBATWETH: mockTokens.UniBATWETH.address, + UniUSDCDAI: mockTokens.UniUSDCDAI.address, + UniCRVWETH: mockTokens.UniCRVWETH.address, + UniLINKWETH: mockTokens.UniLINKWETH.address, + UniMKRWETH: mockTokens.UniMKRWETH.address, + UniRENWETH: mockTokens.UniRENWETH.address, + UniSNXWETH: mockTokens.UniSNXWETH.address, + UniUNIWETH: mockTokens.UniUNIWETH.address, + UniUSDCWETH: mockTokens.UniUSDCWETH.address, + UniWBTCUSDC: mockTokens.UniWBTCUSDC.address, + UniYFIWETH: mockTokens.UniYFIWETH.address, + BptWBTCWETH: mockTokens.BptWBTCWETH.address, USD: USD_ADDRESS, }, fallbackOracle @@ -236,12 +236,22 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { console.log('Initialize configuration'); const config = loadPoolConfig(ConfigNames.Lp); - + + const { + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, + } = config; const treasuryAddress = await getTreasuryAddress(config); await initReservesByHelper( reservesParams, allReservesAddresses, + ATokenNamePrefix, + StableDebtTokenNamePrefix, + VariableDebtTokenNamePrefix, + SymbolPrefix, admin, treasuryAddress, ZERO_ADDRESS, @@ -269,7 +279,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { await deployWalletBalancerProvider(); - await deployWETHGateway([mockTokens.LpWETH.address, lendingPoolAddress]); + await deployWETHGateway([mockTokens.WETH.address, lendingPoolAddress]); console.timeEnd('setup'); }; diff --git a/test-suites/test-lp/atoken-transfer.spec.ts b/test-suites/test-lp/atoken-transfer.spec.ts index df58bbcf..9d1b8359 100644 --- a/test-suites/test-lp/atoken-transfer.spec.ts +++ b/test-suites/test-lp/atoken-transfer.spec.ts @@ -33,7 +33,7 @@ makeSuite('AToken: Transfer', (testEnv: TestEnv) => { const name = await aDai.name(); - expect(name).to.be.equal('Aave interest bearing LpDAI'); + expect(name).to.be.equal('Aave AMM Market DAI'); const fromBalance = await aDai.balanceOf(users[0].address); const toBalance = await aDai.balanceOf(users[1].address); diff --git a/test-suites/test-lp/helpers/make-suite.ts b/test-suites/test-lp/helpers/make-suite.ts index 07d9a54c..c65f0df0 100644 --- a/test-suites/test-lp/helpers/make-suite.ts +++ b/test-suites/test-lp/helpers/make-suite.ts @@ -128,15 +128,15 @@ export async function initializeMakeSuite() { testEnv.helpersContract = await getAaveProtocolDataProvider(); const allTokens = await testEnv.helpersContract.getAllATokens(); - const aDaiAddress = allTokens.find((aToken) => aToken.symbol === 'aLpDAI')?.tokenAddress; + const aDaiAddress = allTokens.find((aToken) => aToken.symbol === 'aAmmDAI')?.tokenAddress; - const aWEthAddress = allTokens.find((aToken) => aToken.symbol === 'aLpWETH')?.tokenAddress; + const aWEthAddress = allTokens.find((aToken) => aToken.symbol === 'aAmmWETH')?.tokenAddress; const reservesTokens = await testEnv.helpersContract.getAllReservesTokens(); - const daiAddress = reservesTokens.find((token) => token.symbol === 'LpDAI')?.tokenAddress; - const usdcAddress = reservesTokens.find((token) => token.symbol === 'LpUSDC')?.tokenAddress; - const aaveAddress = reservesTokens.find((token) => token.symbol === 'LpUniAAVEWETH')?.tokenAddress; + const daiAddress = reservesTokens.find((token) => token.symbol === 'DAI')?.tokenAddress; + const usdcAddress = reservesTokens.find((token) => token.symbol === 'USDC')?.tokenAddress; + const aaveAddress = reservesTokens.find((token) => token.symbol === 'UniAAVEWETH')?.tokenAddress; const wethAddress = reservesTokens.find((token) => token.symbol === 'WETH')?.tokenAddress; if (!aDaiAddress || !aWEthAddress) { diff --git a/test-suites/test-lp/helpers/scenarios/borrow-negatives.json b/test-suites/test-lp/helpers/scenarios/borrow-negatives.json index 4ae81f1f..03f4d005 100644 --- a/test-suites/test-lp/helpers/scenarios/borrow-negatives.json +++ b/test-suites/test-lp/helpers/scenarios/borrow-negatives.json @@ -3,12 +3,12 @@ "description": "Test cases for the deposit function.", "stories": [ { - "description": "User 0 deposits 1000 LPDAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 LPDAI with rate mode NONE (revert expected)", + "description": "User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with rate mode NONE (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -17,7 +17,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -25,7 +25,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -60,7 +60,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "none", "user": "1" @@ -71,12 +71,12 @@ ] }, { - "description": "User 0 deposits 1000 LPDAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 LPDAI with an invalid rate mode (revert expected)", + "description": "User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with an invalid rate mode (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -85,7 +85,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -93,7 +93,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -128,7 +128,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "invalid", "user": "1" diff --git a/test-suites/test-lp/helpers/scenarios/borrow-repay-stable.json b/test-suites/test-lp/helpers/scenarios/borrow-repay-stable.json index a1402942..6cebf5b5 100644 --- a/test-suites/test-lp/helpers/scenarios/borrow-repay-stable.json +++ b/test-suites/test-lp/helpers/scenarios/borrow-repay-stable.json @@ -3,12 +3,12 @@ "description": "Test cases for the borrow function, stable mode.", "stories": [ { - "description": "User 0 deposits 1000 LPDAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 LPDAI at stable rate (revert expected)", + "description": "User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI at stable rate (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -17,7 +17,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -25,7 +25,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -61,7 +61,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "1", @@ -72,12 +72,12 @@ ] }, { - "description": "User 1 tries to borrow the rest of the LPDAI liquidity (revert expected)", + "description": "User 1 tries to borrow the rest of the DAI liquidity (revert expected)", "actions": [ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "900", "borrowRateMode": "stable", "user": "1" @@ -88,12 +88,12 @@ ] }, { - "description": "User 1 tries to borrow 100 LPDAI at variable", + "description": "User 1 tries to borrow 100 DAI at variable", "actions": [ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "1" @@ -103,12 +103,12 @@ ] }, { - "description": "User 1 tries to borrow the rest of the LPDAI liquidity at stable (revert expected)", + "description": "User 1 tries to borrow the rest of the DAI liquidity at stable (revert expected)", "actions": [ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "900", "borrowRateMode": "stable", "user": "1" @@ -119,13 +119,13 @@ ] }, { - "description": "User 1 repays half of the LPDAI borrow at stable after one year (revert expected)", + "description": "User 1 repays half of the DAI borrow at stable after one year (revert expected)", "actions": [ { "name": "mint", - "description": "Mint 10 LPDAI to cover the interest", + "description": "Mint 10 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "10", "user": "1" }, @@ -134,7 +134,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -142,7 +142,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "50", "user": "1", "onBehalfOf": "1", @@ -153,12 +153,12 @@ ] }, { - "description": "User 1 repays half of the variable LPDAI borrow after one year", + "description": "User 1 repays half of the variable DAI borrow after one year", "actions": [ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "50", "user": "1", "onBehalfOf": "1", @@ -169,13 +169,13 @@ ] }, { - "description": "User 1 repays the rest of the LPDAI borrow at stable after one year (revert expected)", + "description": "User 1 repays the rest of the DAI borrow at stable after one year (revert expected)", "actions": [ { "name": "mint", - "description": "Mint 15 LPDAI to cover the interest", + "description": "Mint 15 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "15", "user": "1" }, @@ -184,7 +184,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -192,7 +192,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -203,12 +203,12 @@ ] }, { - "description": "User 1 repays the rest of the LPDAI borrow after one year at variable", + "description": "User 1 repays the rest of the DAI borrow after one year at variable", "actions": [ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -219,12 +219,12 @@ ] }, { - "description": "User 0 withdraws the deposited LPDAI plus interest", + "description": "User 0 withdraws the deposited DAI plus interest", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "0" }, @@ -233,12 +233,12 @@ ] }, { - "description": "User 1 deposits 1000 LPDAI, user 2 tries to borrow 1000 LPDAI at a stable rate without any collateral (revert expected) User 1 withdrawws", + "description": "User 1 deposits 1000 DAI, user 2 tries to borrow 1000 DAI at a stable rate without any collateral (revert expected) User 1 withdrawws", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -247,7 +247,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -255,7 +255,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -264,7 +264,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "borrowRateMode": "stable", "user": "2" @@ -275,7 +275,7 @@ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -284,12 +284,12 @@ ] }, { - "description": "User 0 deposits 1000 LPDAI, user 1,2,3,4 deposit 1 WETH each and borrow 100 LPDAI at stable rate (revert expected) user 0 withdraws", + "description": "User 0 deposits 1000 DAI, user 1,2,3,4 deposit 1 WETH each and borrow 100 DAI at stable rate (revert expected) user 0 withdraws", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -298,7 +298,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -306,7 +306,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -341,7 +341,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "1", @@ -378,7 +378,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "2", @@ -415,7 +415,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "3", @@ -452,7 +452,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "4", @@ -462,9 +462,9 @@ }, { "name": "mint", - "description": "Mint 15 LPDAI to cover the interest", + "description": "Mint 15 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "15", "user": "1" }, @@ -473,7 +473,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -481,7 +481,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -491,9 +491,9 @@ }, { "name": "mint", - "description": "Mint 20 LPDAI to cover the interest", + "description": "Mint 20 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "20", "user": "2" }, @@ -502,7 +502,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "2" }, "expected": "success" @@ -510,7 +510,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "2", "onBehalfOf": "2", @@ -520,9 +520,9 @@ }, { "name": "mint", - "description": "Mint 30 LPDAI to cover the interest", + "description": "Mint 30 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "30", "user": "3" }, @@ -531,7 +531,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "3" }, "expected": "success" @@ -539,7 +539,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "3", "onBehalfOf": "3", @@ -549,9 +549,9 @@ }, { "name": "mint", - "description": "Mint 30 LPDAI to cover the interest", + "description": "Mint 30 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "30", "user": "4" }, @@ -560,7 +560,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "4" }, "expected": "success" @@ -568,7 +568,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "4", "onBehalfOf": "4", @@ -579,7 +579,7 @@ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "0" }, @@ -588,12 +588,12 @@ ] }, { - "description": "User 0 deposits 1000 LPDAI, user 1 deposits 2 WETH and borrow 100 LPDAI at stable rate first (revert expected), then 100 LPDAI at variable rate twice, repays everything. User 0 withdraws", + "description": "User 0 deposits 1000 DAI, user 1 deposits 2 WETH and borrow 100 DAI at stable rate first (revert expected), then 100 DAI at variable rate twice, repays everything. User 0 withdraws", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -602,7 +602,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -610,7 +610,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -645,7 +645,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "1", @@ -656,7 +656,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "1", @@ -667,7 +667,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "1", @@ -677,9 +677,9 @@ }, { "name": "mint", - "description": "Mint 50 LPDAI to cover the interest", + "description": "Mint 50 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "50", "user": "1" }, @@ -688,7 +688,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -696,7 +696,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -707,7 +707,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -718,7 +718,7 @@ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "0" }, diff --git a/test-suites/test-lp/helpers/scenarios/borrow-repay-variable.json b/test-suites/test-lp/helpers/scenarios/borrow-repay-variable.json index 39461dfc..ccde9089 100644 --- a/test-suites/test-lp/helpers/scenarios/borrow-repay-variable.json +++ b/test-suites/test-lp/helpers/scenarios/borrow-repay-variable.json @@ -3,12 +3,12 @@ "description": "Test cases for the borrow function, variable mode.", "stories": [ { - "description": "User 2 deposits 1 LPDAI to account for rounding errors", + "description": "User 2 deposits 1 DAI to account for rounding errors", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1", "user": "2" }, @@ -17,7 +17,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "2" }, "expected": "success" @@ -25,7 +25,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1", "user": "2" }, @@ -34,12 +34,12 @@ ] }, { - "description": "User 0 deposits 1000 LPDAI, user 1 deposits 1 WETH as collateral and borrows 100 LPDAI at variable rate", + "description": "User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and borrows 100 DAI at variable rate", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -48,7 +48,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -56,7 +56,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -91,7 +91,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "1", @@ -102,12 +102,12 @@ ] }, { - "description": "User 1 tries to borrow the rest of the LPDAI liquidity (revert expected)", + "description": "User 1 tries to borrow the rest of the DAI liquidity (revert expected)", "actions": [ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "900", "borrowRateMode": "variable", "user": "1" @@ -118,12 +118,12 @@ ] }, { - "description": "User 1 tries to repay 0 LPDAI (revert expected)", + "description": "User 1 tries to repay 0 DAI (revert expected)", "actions": [ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "0", "user": "1", "onBehalfOf": "1" @@ -134,12 +134,12 @@ ] }, { - "description": "User 1 repays a small amount of LPDAI, enough to cover a small part of the interest", + "description": "User 1 repays a small amount of DAI, enough to cover a small part of the interest", "actions": [ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -147,7 +147,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1.25", "user": "1", "onBehalfOf": "1", @@ -158,13 +158,13 @@ ] }, { - "description": "User 1 repays the LPDAI borrow after one year", + "description": "User 1 repays the DAI borrow after one year", "actions": [ { "name": "mint", - "description": "Mint 10 LPDAI to cover the interest", + "description": "Mint 10 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "10", "user": "1" }, @@ -173,7 +173,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -184,12 +184,12 @@ ] }, { - "description": "User 0 withdraws the deposited LPDAI plus interest", + "description": "User 0 withdraws the deposited DAI plus interest", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "0" }, @@ -243,7 +243,7 @@ ] }, { - "description": "User 0 deposits 1 WETH, user 1 deposits 100 LPUNILINKWETH as collateral and borrows 0.5 WETH at variable rate", + "description": "User 0 deposits 1 WETH, user 1 deposits 100 UNILINKWETH as collateral and borrows 0.5 WETH at variable rate", "actions": [ { "name": "mint", @@ -274,7 +274,7 @@ { "name": "mint", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "amount": "100", "user": "1" }, @@ -283,7 +283,7 @@ { "name": "approve", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "user": "1" }, "expected": "success" @@ -292,7 +292,7 @@ { "name": "deposit", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "amount": "100", "user": "1" }, @@ -431,7 +431,7 @@ { "name": "withdraw", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "amount": "-1", "user": "1" }, @@ -441,12 +441,12 @@ }, { - "description": "User 2 deposits 1 LPUSDC to account for rounding errors", + "description": "User 2 deposits 1 USDC to account for rounding errors", "actions": [ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1", "user": "2" }, @@ -455,7 +455,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "2" }, "expected": "success" @@ -463,7 +463,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1", "user": "2" }, @@ -472,12 +472,12 @@ ] }, { - "description": "User 0 deposits 1000 LPUSDC, user 1 deposits 1 WETH as collateral and borrows 100 LPUSDC at variable rate", + "description": "User 0 deposits 1000 USDC, user 1 deposits 1 WETH as collateral and borrows 100 USDC at variable rate", "actions": [ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -486,7 +486,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0" }, "expected": "success" @@ -494,7 +494,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -529,7 +529,7 @@ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "100", "borrowRateMode": "variable", "user": "1", @@ -540,12 +540,12 @@ ] }, { - "description": "User 1 tries to borrow the rest of the LPUSDC liquidity (revert expected)", + "description": "User 1 tries to borrow the rest of the USDC liquidity (revert expected)", "actions": [ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "900", "borrowRateMode": "variable", "user": "1" @@ -556,13 +556,13 @@ ] }, { - "description": "User 1 repays the LPUSDC borrow after one year", + "description": "User 1 repays the USDC borrow after one year", "actions": [ { "name": "mint", - "description": "Mint 10 LPUSDC to cover the interest", + "description": "Mint 10 USDC to cover the interest", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "10", "user": "1" }, @@ -571,7 +571,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "1" }, "expected": "success" @@ -579,7 +579,7 @@ { "name": "repay", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -590,12 +590,12 @@ ] }, { - "description": "User 0 withdraws the deposited LPUSDC plus interest", + "description": "User 0 withdraws the deposited USDC plus interest", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "-1", "user": "0" }, @@ -618,12 +618,12 @@ ] }, { - "description": "User 1 deposits 1000 LPDAI, user 3 tries to borrow 1000 LPDAI without any collateral (revert expected)", + "description": "User 1 deposits 1000 DAI, user 3 tries to borrow 1000 DAI without any collateral (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -632,7 +632,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -640,7 +640,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -649,7 +649,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "borrowRateMode": "variable", "user": "3" @@ -660,7 +660,7 @@ ] }, { - "description": "user 3 deposits 0.1 WETH collateral to borrow 100 LPDAI; 0.1 WETH is not enough to borrow 100 LPDAI (revert expected)", + "description": "user 3 deposits 0.1 WETH collateral to borrow 100 DAI; 0.1 WETH is not enough to borrow 100 DAI (revert expected)", "actions": [ { "name": "mint", @@ -691,7 +691,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "3" @@ -716,12 +716,12 @@ ] }, { - "description": "User 1 deposits 1000 LPUSDC, user 3 tries to borrow 1000 LPUSDC without any collateral (revert expected)", + "description": "User 1 deposits 1000 USDC, user 3 tries to borrow 1000 USDC without any collateral (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "1" }, @@ -730,7 +730,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "1" }, "expected": "success" @@ -738,7 +738,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "1" }, @@ -747,7 +747,7 @@ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "borrowRateMode": "variable", "user": "3" @@ -758,7 +758,7 @@ ] }, { - "description": "user 3 deposits 0.1 WETH collateral to borrow 100 LPUSDC; 0.1 WETH is not enough to borrow 100 LPUSDC (revert expected)", + "description": "user 3 deposits 0.1 WETH collateral to borrow 100 USDC; 0.1 WETH is not enough to borrow 100 USDC (revert expected)", "actions": [ { "name": "mint", @@ -789,7 +789,7 @@ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "100", "borrowRateMode": "variable", "user": "3" @@ -814,12 +814,12 @@ ] }, { - "description": "User 0 deposits 1000 LPDAI, user 6 deposits 2 WETH and borrow 100 LPDAI at variable rate first, then 100 LPDAI at stable rate (revert expected), then 100 LPDAI at variable again, repays everything. User 0 withdraws", + "description": "User 0 deposits 1000 DAI, user 6 deposits 2 WETH and borrow 100 DAI at variable rate first, then 100 DAI at stable rate (revert expected), then 100 DAI at variable again, repays everything. User 0 withdraws", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -828,7 +828,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -836,7 +836,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -871,7 +871,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "6", @@ -882,7 +882,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "6", @@ -893,7 +893,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "6", @@ -903,9 +903,9 @@ }, { "name": "mint", - "description": "Mint 50 LPDAI to cover the interest", + "description": "Mint 50 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "50", "user": "6" }, @@ -914,7 +914,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "6" }, "expected": "success" @@ -922,7 +922,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "6", "onBehalfOf": "6", @@ -933,7 +933,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "6", "onBehalfOf": "6", @@ -944,7 +944,7 @@ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "0" }, diff --git a/test-suites/test-lp/helpers/scenarios/credit-delegation.json b/test-suites/test-lp/helpers/scenarios/credit-delegation.json index 46437c40..8798083b 100644 --- a/test-suites/test-lp/helpers/scenarios/credit-delegation.json +++ b/test-suites/test-lp/helpers/scenarios/credit-delegation.json @@ -3,7 +3,7 @@ "description": "Test cases for the credit delegation related functions.", "stories": [ { - "description": "User 3 deposits 1000 WETH. User 0 deposits 1000 LPDAI, user 0 delegates borrowing of 1 WETH on variable to user 4, user 4 borrows 1 WETH variable on behalf of user 0", + "description": "User 3 deposits 1000 WETH. User 0 deposits 1000 DAI, user 0 delegates borrowing of 1 WETH on variable to user 4, user 4 borrows 1 WETH variable on behalf of user 0", "actions": [ { "name": "mint", @@ -34,7 +34,7 @@ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -43,7 +43,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -51,7 +51,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, diff --git a/test-suites/test-lp/helpers/scenarios/deposit.json b/test-suites/test-lp/helpers/scenarios/deposit.json index 960011e3..b4b73879 100644 --- a/test-suites/test-lp/helpers/scenarios/deposit.json +++ b/test-suites/test-lp/helpers/scenarios/deposit.json @@ -3,12 +3,12 @@ "description": "Test cases for the deposit function.", "stories": [ { - "description": "User 0 Deposits 1000 LPDAI in an empty reserve", + "description": "User 0 Deposits 1000 DAI in an empty reserve", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -17,7 +17,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -25,7 +25,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -34,12 +34,12 @@ ] }, { - "description": "User 1 deposits 1000 LPDAI after user 0", + "description": "User 1 deposits 1000 DAI after user 0", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -48,7 +48,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -56,7 +56,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -65,12 +65,12 @@ ] }, { - "description": "User 0 deposits 1000 LPUSDC in an empty reserve", + "description": "User 0 deposits 1000 USDC in an empty reserve", "actions": [ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -79,7 +79,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0" }, "expected": "success" @@ -87,7 +87,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -96,12 +96,12 @@ ] }, { - "description": "User 1 deposits 1000 LPUSDC after user 0", + "description": "User 1 deposits 1000 USDC after user 0", "actions": [ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "1" }, @@ -110,7 +110,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "1" }, "expected": "success" @@ -118,7 +118,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "1" }, @@ -214,12 +214,12 @@ ] }, { - "description": "User 1 deposits 0 LPDAI", + "description": "User 1 deposits 0 DAI", "actions": [ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "0", "user": "1" }, @@ -229,12 +229,12 @@ ] }, { - "description": "User 1 deposits 100 LPDAI on behalf of user 2, user 2 tries to borrow 0.1 WETH", + "description": "User 1 deposits 100 DAI on behalf of user 2, user 2 tries to borrow 0.1 WETH", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "user": "1" }, @@ -243,7 +243,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "user": "1", "onBehalfOf": "2" diff --git a/test-suites/test-lp/helpers/scenarios/rebalance-stable-rate.json b/test-suites/test-lp/helpers/scenarios/rebalance-stable-rate.json index 21c09510..8e4f17b6 100644 --- a/test-suites/test-lp/helpers/scenarios/rebalance-stable-rate.json +++ b/test-suites/test-lp/helpers/scenarios/rebalance-stable-rate.json @@ -8,7 +8,7 @@ { "name": "rebalanceStableBorrowRate", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0", "target": "1" }, @@ -18,12 +18,12 @@ ] }, { - "description": "User 0 deposits 1000 LPUSDC, user 1 deposits 7 WETH, borrows 250 LPUSDC at a variable rate, user 0 rebalances user 1 (revert expected)", + "description": "User 0 deposits 1000 USDC, user 1 deposits 7 WETH, borrows 250 USDC at a variable rate, user 0 rebalances user 1 (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -32,7 +32,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0" }, "expected": "success" @@ -40,7 +40,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -75,7 +75,7 @@ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "250", "borrowRateMode": "variable", "user": "1" @@ -85,7 +85,7 @@ { "name": "rebalanceStableBorrowRate", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0", "target": "1" }, @@ -100,7 +100,7 @@ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "200", "borrowRateMode": "variable", "user": "1" @@ -110,7 +110,7 @@ { "name": "rebalanceStableBorrowRate", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0", "target": "1" }, @@ -125,7 +125,7 @@ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "200", "borrowRateMode": "variable", "user": "1" @@ -135,7 +135,7 @@ { "name": "rebalanceStableBorrowRate", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0", "target": "1" }, @@ -150,7 +150,7 @@ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "280", "borrowRateMode": "variable", "user": "1" @@ -160,7 +160,7 @@ { "name": "rebalanceStableBorrowRate", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0", "target": "1" }, @@ -171,12 +171,12 @@ }, { - "description": "User 1 borrows the remaining LPUSDC (usage ratio = 100%) at variable. User 0 rebalances user 1, fails since there are no stable borrows (revert expected)", + "description": "User 1 borrows the remaining USDC (usage ratio = 100%) at variable. User 0 rebalances user 1, fails since there are no stable borrows (revert expected)", "actions": [ { "name": "borrow", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "20", "borrowRateMode": "variable", "user": "1" @@ -186,7 +186,7 @@ { "name": "rebalanceStableBorrowRate", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0", "target": "1" }, diff --git a/test-suites/test-lp/helpers/scenarios/set-use-as-collateral.json b/test-suites/test-lp/helpers/scenarios/set-use-as-collateral.json index 49785753..d2c8520a 100644 --- a/test-suites/test-lp/helpers/scenarios/set-use-as-collateral.json +++ b/test-suites/test-lp/helpers/scenarios/set-use-as-collateral.json @@ -3,12 +3,12 @@ "description": "Test cases for the setUserUseReserveAsCollateral() function.", "stories": [ { - "description": "User 0 Deposits 1000 LPDAI, disables LPDAI as collateral", + "description": "User 0 Deposits 1000 DAI, disables DAI as collateral", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -17,7 +17,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -25,7 +25,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -34,7 +34,7 @@ { "name": "setUseAsCollateral", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0", "useAsCollateral": "false" }, @@ -43,7 +43,7 @@ ] }, { - "description": "User 1 Deposits 2 WETH, disables WETH as collateral, borrows 400 LPDAI (revert expected)", + "description": "User 1 Deposits 2 WETH, disables WETH as collateral, borrows 400 DAI (revert expected)", "actions": [ { "name": "mint", @@ -83,7 +83,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "400", "borrowRateMode": "variable", "user": "1" @@ -94,7 +94,7 @@ ] }, { - "description": "User 1 enables WETH as collateral, borrows 400 LPDAI", + "description": "User 1 enables WETH as collateral, borrows 400 DAI", "actions": [ { "name": "setUseAsCollateral", @@ -108,7 +108,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "400", "borrowRateMode": "variable", "user": "1" @@ -133,12 +133,12 @@ ] }, { - "description": "User 1 Deposits 10 LPUNILINKWETH, disables WETH as collateral. Should revert as 10 LPUNILINKWETH are not enough to cover the debt (revert expected)", + "description": "User 1 Deposits 10 UNILINKWETH, disables WETH as collateral. Should revert as 10 UNILINKWETH are not enough to cover the debt (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "amount": "10", "user": "1" }, @@ -147,7 +147,7 @@ { "name": "approve", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "user": "1" }, "expected": "success" @@ -155,7 +155,7 @@ { "name": "deposit", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "amount": "10", "user": "1" }, @@ -173,12 +173,12 @@ ] }, { - "description": "User 1 Deposits 640 more LPUNILINKWETH (enough to cover the LPDAI debt), disables WETH as collateral", + "description": "User 1 Deposits 640 more UNILINKWETH (enough to cover the DAI debt), disables WETH as collateral", "actions": [ { "name": "mint", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "amount": "640", "user": "1" }, @@ -187,7 +187,7 @@ { "name": "deposit", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "amount": "640", "user": "1" }, @@ -205,12 +205,12 @@ ] }, { - "description": "User 1 disables LPUNILINKWETH as collateral (revert expected)", + "description": "User 1 disables UNILINKWETH as collateral (revert expected)", "actions": [ { "name": "setUseAsCollateral", "args": { - "reserve": "LPUNILINKWETH", + "reserve": "UNILINKWETH", "user": "1", "useAsCollateral": "false" }, diff --git a/test-suites/test-lp/helpers/scenarios/swap-rate-mode.json b/test-suites/test-lp/helpers/scenarios/swap-rate-mode.json index 82b44e83..17f9dfe3 100644 --- a/test-suites/test-lp/helpers/scenarios/swap-rate-mode.json +++ b/test-suites/test-lp/helpers/scenarios/swap-rate-mode.json @@ -8,7 +8,7 @@ { "name": "swapBorrowRateMode", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1", "borrowRateMode": "variable" }, @@ -23,7 +23,7 @@ { "name": "swapBorrowRateMode", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1", "borrowRateMode": "stable" }, @@ -33,12 +33,12 @@ ] }, { - "description": "User 0 deposits 1000 LPDAI, user 1 deposits 2 WETH as collateral, borrows 100 LPDAI at variable rate and swaps to stable after one year, fails because stable borrowing is disabled (revert expected)", + "description": "User 0 deposits 1000 DAI, user 1 deposits 2 WETH as collateral, borrows 100 DAI at variable rate and swaps to stable after one year, fails because stable borrowing is disabled (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -47,7 +47,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -55,7 +55,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -90,7 +90,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "1", @@ -101,7 +101,7 @@ { "name": "swapBorrowRateMode", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1", "borrowRateMode": "variable" }, @@ -110,12 +110,12 @@ ] }, { - "description": "User 1 borrows another 100 LPDAI at stable (revert expected), and swaps back to variable after one year (revert expected), repays the loan", + "description": "User 1 borrows another 100 DAI at stable (revert expected), and swaps back to variable after one year (revert expected), repays the loan", "actions": [ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "stable", "user": "1", @@ -126,7 +126,7 @@ { "name": "swapBorrowRateMode", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1", "borrowRateMode": "stable" }, @@ -134,9 +134,9 @@ }, { "name": "mint", - "description": "Mint 50 LPDAI to cover the interest", + "description": "Mint 50 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "50", "user": "1" }, @@ -145,7 +145,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -153,7 +153,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", @@ -164,12 +164,12 @@ ] }, { - "description": "User 1 borrows another 100 LPDAI at variable, and tries to swap to stable after one year (revert expected), repays the loan", + "description": "User 1 borrows another 100 DAI at variable, and tries to swap to stable after one year (revert expected), repays the loan", "actions": [ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "borrowRateMode": "variable", "user": "1", @@ -180,7 +180,7 @@ { "name": "swapBorrowRateMode", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1", "borrowRateMode": "stable" }, @@ -188,9 +188,9 @@ }, { "name": "mint", - "description": "Mint 50 LPDAI to cover the interest", + "description": "Mint 50 DAI to cover the interest", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "50", "user": "1" }, @@ -199,7 +199,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -207,7 +207,7 @@ { "name": "repay", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1", "onBehalfOf": "1", diff --git a/test-suites/test-lp/helpers/scenarios/withdraw-negatives.json b/test-suites/test-lp/helpers/scenarios/withdraw-negatives.json index e282e65c..cf50812d 100644 --- a/test-suites/test-lp/helpers/scenarios/withdraw-negatives.json +++ b/test-suites/test-lp/helpers/scenarios/withdraw-negatives.json @@ -3,12 +3,12 @@ "description": "Redeem function.", "stories": [ { - "description": "Users 0 Deposits 1000 LPDAI and tries to redeem 0 LPDAI (revert expected)", + "description": "Users 0 Deposits 1000 DAI and tries to redeem 0 DAI (revert expected)", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -17,7 +17,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -25,7 +25,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -35,7 +35,7 @@ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "0", "user": "0" }, @@ -45,12 +45,12 @@ ] }, { - "description": "Users 0 tries to redeem 1100 LPDAI from the 1000 LPDAI deposited (revert expected)", + "description": "Users 0 tries to redeem 1100 DAI from the 1000 DAI deposited (revert expected)", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1100", "user": "0" }, @@ -60,7 +60,7 @@ ] }, { - "description": "Users 1 deposits 1 WETH, borrows 100 LPDAI stable (revert expected), redeems the 1 WETH deposited", + "description": "Users 1 deposits 1 WETH, borrows 100 DAI stable (revert expected), redeems the 1 WETH deposited", "actions": [ { "name": "mint", @@ -91,7 +91,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "user": "1", "borrowRateMode": "stable" @@ -110,7 +110,7 @@ ] }, { - "description": "Users 1 deposits 1 WETH, borrows 100 LPDAI at variable rate, tries to redeem the 1 WETH deposited (revert expected)", + "description": "Users 1 deposits 1 WETH, borrows 100 DAI at variable rate, tries to redeem the 1 WETH deposited (revert expected)", "actions": [ { "name": "mint", @@ -141,7 +141,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "user": "1", "borrowRateMode": "variable" diff --git a/test-suites/test-lp/helpers/scenarios/withdraw.json b/test-suites/test-lp/helpers/scenarios/withdraw.json index ac72b2c6..d3b69908 100644 --- a/test-suites/test-lp/helpers/scenarios/withdraw.json +++ b/test-suites/test-lp/helpers/scenarios/withdraw.json @@ -3,12 +3,12 @@ "description": "withdraw function.", "stories": [ { - "description": "User 0 Deposits 1000 LPDAI in an empty reserve", + "description": "User 0 Deposits 1000 DAI in an empty reserve", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -17,7 +17,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "0" }, "expected": "success" @@ -25,7 +25,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -34,12 +34,12 @@ ] }, { - "description": "User 0 withdraws half of the deposited LPDAI", + "description": "User 0 withdraws half of the deposited DAI", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "500", "user": "0" }, @@ -48,12 +48,12 @@ ] }, { - "description": "User 0 withdraws remaining half of the deposited LPDAI", + "description": "User 0 withdraws remaining half of the deposited DAI", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "0" }, @@ -62,12 +62,12 @@ ] }, { - "description": "User 0 Deposits 1000 LPUSDC in an empty reserve", + "description": "User 0 Deposits 1000 USDC in an empty reserve", "actions": [ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -76,7 +76,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "0" }, "expected": "success" @@ -84,7 +84,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "0" }, @@ -93,12 +93,12 @@ ] }, { - "description": "User 0 withdraws half of the deposited LPUSDC", + "description": "User 0 withdraws half of the deposited USDC", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "500", "user": "0" }, @@ -107,12 +107,12 @@ ] }, { - "description": "User 0 withdraws remaining half of the deposited LPUSDC", + "description": "User 0 withdraws remaining half of the deposited USDC", "actions": [ { "name": "withdraw", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "-1", "user": "0" }, @@ -180,12 +180,12 @@ ] }, { - "description": "Users 0 and 1 Deposit 1000 LPDAI, both withdraw", + "description": "Users 0 and 1 Deposit 1000 DAI, both withdraw", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -194,7 +194,7 @@ { "name": "approve", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "user": "1" }, "expected": "success" @@ -202,7 +202,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -211,7 +211,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "1" }, @@ -220,7 +220,7 @@ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "0" }, @@ -229,7 +229,7 @@ { "name": "withdraw", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "-1", "user": "1" }, @@ -238,12 +238,12 @@ ] }, { - "description": "Users 0 deposits 1000 LPDAI, user 1 Deposit 1000 LPUSDC and 1 WETH, borrows 100 LPDAI at stable rate (revert expected). User 1 tries to withdraw all the LPUSDC", + "description": "Users 0 deposits 1000 DAI, user 1 Deposit 1000 USDC and 1 WETH, borrows 100 DAI at stable rate (revert expected). User 1 tries to withdraw all the USDC", "actions": [ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -252,7 +252,7 @@ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "1" }, @@ -261,7 +261,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "1" }, "expected": "success" @@ -269,7 +269,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "1" }, @@ -304,7 +304,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "user": "1", "borrowRateMode": "stable" @@ -314,7 +314,7 @@ { "name": "withdraw", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "-1", "user": "1" }, @@ -323,12 +323,12 @@ ] }, { - "description": "Users 0 deposits 1000 LPDAI, user 1 Deposit 1000 LPUSDC and 1 WETH, borrows 100 LPDAI at variable rate. User 1 tries to withdraw all the LPUSDC", + "description": "Users 0 deposits 1000 DAI, user 1 Deposit 1000 USDC and 1 WETH, borrows 100 DAI at variable rate. User 1 tries to withdraw all the USDC", "actions": [ { "name": "mint", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -337,7 +337,7 @@ { "name": "deposit", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "1000", "user": "0" }, @@ -346,7 +346,7 @@ { "name": "mint", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "10000", "user": "1" }, @@ -355,7 +355,7 @@ { "name": "approve", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "user": "1" }, "expected": "success" @@ -363,7 +363,7 @@ { "name": "deposit", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "1000", "user": "1" }, @@ -398,7 +398,7 @@ { "name": "borrow", "args": { - "reserve": "LPDAI", + "reserve": "DAI", "amount": "100", "user": "1", "borrowRateMode": "variable" @@ -408,7 +408,7 @@ { "name": "withdraw", "args": { - "reserve": "LPUSDC", + "reserve": "USDC", "amount": "-1", "user": "1" }, diff --git a/test-suites/test-lp/helpers/utils/calculations.ts b/test-suites/test-lp/helpers/utils/calculations.ts index 1a801cc1..e1574656 100644 --- a/test-suites/test-lp/helpers/utils/calculations.ts +++ b/test-suites/test-lp/helpers/utils/calculations.ts @@ -1238,9 +1238,9 @@ export const calcExpectedInterestRates = ( const { reservesParams } = configuration; // Fixes WETH - LpWETH mock token symbol mismatch - if(reserveSymbol === 'WETH') { - reserveSymbol = 'LpWETH'; - } + // if(reserveSymbol === 'WETH') { + // reserveSymbol = 'LpWETH'; + // } const reserveIndex = Object.keys(reservesParams).findIndex((value) => value === reserveSymbol); const [, reserveConfiguration] = (Object.entries(reservesParams) as [string, IReserveParams][])[ reserveIndex diff --git a/test-suites/test-lp/stable-token.spec.ts b/test-suites/test-lp/stable-token.spec.ts index 58884018..d3c75fc6 100644 --- a/test-suites/test-lp/stable-token.spec.ts +++ b/test-suites/test-lp/stable-token.spec.ts @@ -29,7 +29,7 @@ makeSuite('Stable debt token tests', (testEnv: TestEnv) => { const name = await stableDebtContract.name(); - expect(name).to.be.equal('Aave stable debt bearing LpDAI'); + expect(name).to.be.equal('Aave AMM Market stable debt DAI'); await expect(stableDebtContract.burn(deployer.address, '1')).to.be.revertedWith( CT_CALLER_MUST_BE_LENDING_POOL ); diff --git a/test-suites/test-lp/upgradeability.spec.ts b/test-suites/test-lp/upgradeability.spec.ts index 53050b48..bbe5799b 100644 --- a/test-suites/test-lp/upgradeability.spec.ts +++ b/test-suites/test-lp/upgradeability.spec.ts @@ -32,24 +32,24 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => { dai.address, ZERO_ADDRESS, ZERO_ADDRESS, - 'Aave Interest bearing LpDAI updated', - 'aUniDAI', + 'Aave AMM Market DAI updated', + 'aAmmDAI', ]); const stableDebtTokenInstance = await deployMockStableDebtToken([ pool.address, dai.address, ZERO_ADDRESS, - 'Aave stable debt bearing LpDAI updated', - 'stableDebtUniDAI', + 'Aave AMM Market stable debt DAI updated', + 'stableDebtAmmDAI', ]); const variableDebtTokenInstance = await deployMockVariableDebtToken([ pool.address, dai.address, ZERO_ADDRESS, - 'Aave variable debt bearing LpDAI updated', - 'variableDebtUniDAI', + 'Aave AMM Market variable debt DAI updated', + 'variableDebtAmmDAI', ]); newATokenAddress = aTokenInstance.address; @@ -108,7 +108,7 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => { const tokenName = await aDai.name(); - expect(tokenName).to.be.eq('Aave Interest bearing LpDAI updated', 'Invalid token name'); + expect(tokenName).to.be.eq('Aave AMM Market DAI updated', 'Invalid token name'); }); it('Tries to update the DAI Stable debt token implementation with a different address than the lendingPoolManager', async () => { @@ -168,7 +168,7 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => { const tokenName = await debtToken.name(); - expect(tokenName).to.be.eq('Aave stable debt bearing LpDAI updated', 'Invalid token name'); + expect(tokenName).to.be.eq('Aave AMM Market stable debt DAI updated', 'Invalid token name'); }); it('Tries to update the DAI variable debt token implementation with a different address than the lendingPoolManager', async () => { @@ -229,6 +229,6 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => { const tokenName = await debtToken.name(); - expect(tokenName).to.be.eq('Aave variable debt bearing LpDAI updated', 'Invalid token name'); + expect(tokenName).to.be.eq('Aave AMM Market variable debt DAI updated', 'Invalid token name'); }); }); From 83d92ac1efd41877202624bc3418b637676889a2 Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Fri, 19 Feb 2021 16:15:59 -0500 Subject: [PATCH 6/6] Updated kovan assets --- markets/lp/index.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/markets/lp/index.ts b/markets/lp/index.ts index 5886bf85..5f66ce18 100644 --- a/markets/lp/index.ts +++ b/markets/lp/index.ts @@ -64,21 +64,21 @@ export const lpConfig: ILpConfiguration = { USDT: '0x13512979ADE267AB5100878E2e0f485B568328a4', WBTC: '0xD1B98B6607330172f1D991521145A22BCe793277', WETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', - UniDAIWETH: '0x7e48b02B21D784e79E17b06988fc150c8b5945df', - UniWBTCWETH: '0x4Fd18882730dc5f945d5049C3f99Ee43CCA1F3d9', - UniAAVEWETH: '0xC173038224d47e11962bb0Bd10e036c573C57dF0', - UniBATWETH: '0xfC482c56A91Cc92019FF6522B2FB76F41B7e2535', - UniUSDCDAI: '0xFD0795980D4c37Fd867228C86A1f7693C9219142', - UniCRVWETH: '0xC7f1899F8B5861d8A3Ce1385194bc130A15C8a74', - UniLINKWETH: '0xCe2355F9249ced9E51ecc35AbB749352C2557D0d', - UniMKRWETH: '0xDCf7A28f4102B7f5813148cCEFb02134648E6F0C', - UniRENWETH: '0xe46C9459833bBa061471DF2a383D27a20FE97E23', - UniSNXWETH: '0xAa5826dea7cfEc02AcB644b24387bE2648feAbB9', - UniUNIWETH: '0xD4C255B5500cFB262EB5F9105Ea546Aa0610A0d3', - UniUSDCWETH: '0x509f6ce2F9718E3dd854cCE1857FabCc59C6dd5e', - UniWBTCUSDC: '0x9D15e3A14926A16C9B285A5c6bd6c9e82d5F8031', - UniYFIWETH: '0xC6Dc783B3C2E2Cbf71791d253f8b4993D40DBf98', - BptWBTCWETH: '0x930087451C5940B28bE556d32a4CF22D5d9754A1', + UniDAIWETH: '0x0C652EeEA3d7D35759ba1E16183F1D89C386C9ea', + UniWBTCWETH: '0x796d562B1dF5b9dc85A4612187B6f29Ed213d960', + UniAAVEWETH: '0x657A7B8b46F35C5C6583AEF43824744B236EF826', + UniBATWETH: '0xf8CEBA8b16579956B3aE4B5D09002a30f873F783', + UniUSDCDAI: '0x8e80b7a7531c276dD1dBEC2f1Cc281c11c859e62', + UniCRVWETH: '0x9c31b7538467bF0b01e6d5fA789e66Ce540a521e', + UniLINKWETH: '0x5Acab7f8B79620ec7127A96E5D8837d2124D5D7c', + UniMKRWETH: '0xB0C6EC5d58ddbF4cd1e419A56a19924E9904e4Dd', + UniRENWETH: '0xcF428637A9f8Af21920Bc0A94fd81071bc790105', + UniSNXWETH: '0xc8F2a0d698f675Ece74042e9fB06ea52b9517521', + UniUNIWETH: '0xcC99A5f95a86d30e3DeF113bCf22f00ecF90D050', + UniUSDCWETH: '0x8C00D2428ed1857E61652aca663323A85E6e76a9', + UniWBTCUSDC: '0x3d35B5F289f55A580e6F85eE22E6a8f57053b966', + UniYFIWETH: '0x5af95ddFACC150a1695A3Fc606459fd0dE57b91f', + BptWBTCWETH: '0x110569E3261bC0934dA637b019f6f1b6F50ec574', }, [EthereumNetwork.ropsten]: { },