Merge branch 'feat/lp-market-updated-deployment' into feat/l2-markets

This commit is contained in:
Zer0dot 2021-02-19 16:44:41 -05:00
commit 71c5d7b080
26 changed files with 683 additions and 633 deletions

View File

@ -44,6 +44,10 @@ export const chooseATokenDeployment = (id: eContractid) => {
export const initReservesByHelper = async ( export const initReservesByHelper = async (
reservesParams: iMultiPoolsAssets<IReserveParams>, reservesParams: iMultiPoolsAssets<IReserveParams>,
tokenAddresses: { [symbol: string]: tEthereumAddress }, tokenAddresses: { [symbol: string]: tEthereumAddress },
aTokenNamePrefix: string,
stableDebtTokenNamePrefix: string,
variableDebtTokenNamePrefix: string,
symbolPrefix: string,
admin: tEthereumAddress, admin: tEthereumAddress,
treasuryAddress: tEthereumAddress, treasuryAddress: tEthereumAddress,
incentivesController: tEthereumAddress, incentivesController: tEthereumAddress,
@ -194,12 +198,12 @@ export const initReservesByHelper = async (
treasury: treasuryAddress, treasury: treasuryAddress,
incentivesController: ZERO_ADDRESS, incentivesController: ZERO_ADDRESS,
underlyingAssetName: reserveSymbols[i], underlyingAssetName: reserveSymbols[i],
aTokenName: `Aave interest bearing ${reserveSymbols[i]}`, aTokenName: `${aTokenNamePrefix} ${reserveSymbols[i]}`,
aTokenSymbol: `a${reserveSymbols[i]}`, aTokenSymbol: `a${symbolPrefix}${reserveSymbols[i]}`,
variableDebtTokenName: `Aave variable debt bearing ${reserveSymbols[i]}`, variableDebtTokenName: `${variableDebtTokenNamePrefix} ${symbolPrefix}${reserveSymbols[i]}`,
variableDebtTokenSymbol: `variableDebt${reserveSymbols[i]}`, variableDebtTokenSymbol: `variableDebt${symbolPrefix}${reserveSymbols[i]}`,
stableDebtTokenName: `Aave stable debt bearing ${reserveSymbols[i]}`, stableDebtTokenName: `${stableDebtTokenNamePrefix} ${reserveSymbols[i]}`,
stableDebtTokenSymbol: `stableDebt${reserveSymbols[i]}` stableDebtTokenSymbol: `stableDebt${symbolPrefix}${reserveSymbols[i]}`
}); });
} }

View File

@ -207,26 +207,26 @@ export interface iAssetBase<T> {
USD: T; USD: T;
REN: T; REN: T;
ENJ: T; ENJ: T;
LpWETH: T; // LpWETH: T;
LpWBTC: T; // LpWBTC: T;
LpDAI: T; // LpDAI: T;
LpUSDC: T; // LpUSDC: T;
LpUSDT: T; // LpUSDT: T;
LpUniDAIWETH: T; UniDAIWETH: T;
LpUniWBTCWETH: T; UniWBTCWETH: T;
LpUniAAVEWETH: T; UniAAVEWETH: T;
LpUniBATWETH: T; UniBATWETH: T;
LpUniUSDCDAI: T; UniUSDCDAI: T;
LpUniCRVWETH: T; UniCRVWETH: T;
LpUniLINKWETH: T; UniLINKWETH: T;
LpUniMKRWETH: T; UniMKRWETH: T;
LpUniRENWETH: T; UniRENWETH: T;
LpUniSNXWETH: T; UniSNXWETH: T;
LpUniUNIWETH: T; UniUNIWETH: T;
LpUniUSDCWETH: T; UniUSDCWETH: T;
LpUniWBTCUSDC: T; UniWBTCUSDC: T;
LpUniYFIWETH: T; UniYFIWETH: T;
LpBalWBTCWETH: T; BptWBTCWETH: T;
} }
export type iAssetsWithoutETH<T> = Omit<iAssetBase<T>, 'ETH'>; export type iAssetsWithoutETH<T> = Omit<iAssetBase<T>, 'ETH'>;
@ -259,26 +259,26 @@ export type iAavePoolAssets<T> = Pick<
export type iLpPoolAssets<T> = Pick< export type iLpPoolAssets<T> = Pick<
iAssetsWithoutUSD<T>, iAssetsWithoutUSD<T>,
| 'LpDAI' | 'DAI'
| 'LpUSDC' | 'USDC'
| 'LpUSDT' | 'USDT'
| 'LpWBTC' | 'WBTC'
| 'LpWETH' | 'WETH'
| 'LpUniDAIWETH' | 'UniDAIWETH'
| 'LpUniWBTCWETH' | 'UniWBTCWETH'
| 'LpUniAAVEWETH' | 'UniAAVEWETH'
| 'LpUniBATWETH' | 'UniBATWETH'
| 'LpUniUSDCDAI' | 'UniUSDCDAI'
| 'LpUniCRVWETH' | 'UniCRVWETH'
| 'LpUniLINKWETH' | 'UniLINKWETH'
| 'LpUniMKRWETH' | 'UniMKRWETH'
| 'LpUniRENWETH' | 'UniRENWETH'
| 'LpUniSNXWETH' | 'UniSNXWETH'
| 'LpUniUNIWETH' | 'UniUNIWETH'
| 'LpUniUSDCWETH' | 'UniUSDCWETH'
| 'LpUniWBTCUSDC' | 'UniWBTCUSDC'
| 'LpUniYFIWETH' | 'UniYFIWETH'
| 'LpBalWBTCWETH' | 'BptWBTCWETH'
>; >;
export type iMultiPoolsAssets<T> = iAssetCommon<T> | iAavePoolAssets<T>; export type iMultiPoolsAssets<T> = iAssetCommon<T> | iAavePoolAssets<T>;
@ -309,26 +309,26 @@ export enum TokenContractId {
YFI = 'YFI', YFI = 'YFI',
UNI = 'UNI', UNI = 'UNI',
ENJ = 'ENJ', ENJ = 'ENJ',
LpWETH = 'LpWETH', // LpWETH = 'LpWETH',
LpWBTC = 'LpWBTC', // LpWBTC = 'LpWBTC',
LpDAI = 'LpDAI', // LpDAI = 'LpDAI',
LpUSDC = 'LpUSDC', // LpUSDC = 'LpUSDC',
LpUSDT = 'LpUSDT', // LpUSDT = 'LpUSDT',
LpUniDAIWETH = 'LpUniDAIWETH', UniDAIWETH = 'UniDAIWETH',
LpUniWBTCWETH = 'LpUniWBTCWETH', UniWBTCWETH = 'UniWBTCWETH',
LpUniAAVEWETH = 'LpUniAAVEWETH', UniAAVEWETH = 'UniAAVEWETH',
LpUniBATWETH = 'LpUniBATWETH', UniBATWETH = 'UniBATWETH',
LpUniUSDCDAI = 'LpUniUSDCDAI', UniUSDCDAI = 'UniUSDCDAI',
LpUniCRVWETH = 'LpUniCRVWETH', UniCRVWETH = 'UniCRVWETH',
LpUniLINKWETH = 'LpUniLINKWETH', UniLINKWETH = 'UniLINKWETH',
LpUniMKRWETH = 'LpUniMKRWETH', UniMKRWETH = 'UniMKRWETH',
LpUniRENWETH = 'LpUniRENWETH', UniRENWETH = 'UniRENWETH',
LpUniSNXWETH = 'LpUniSNXWETH', UniSNXWETH = 'UniSNXWETH',
LpUniUNIWETH = 'LpUniUNIWETH', UniUNIWETH = 'UniUNIWETH',
LpUniUSDCWETH = 'LpUniUSDCWETH', UniUSDCWETH = 'UniUSDCWETH',
LpUniWBTCUSDC = 'LpUniWBTCUSDC', UniWBTCUSDC = 'UniWBTCUSDC',
LpUniYFIWETH = 'LpUniYFIWETH', UniYFIWETH = 'UniYFIWETH',
LpBalWBTCWETH = 'LpBalWBTCWETH', BptWBTCWETH = 'BptWBTCWETH',
} }
export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams { export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {
@ -434,6 +434,10 @@ export interface ILendingRate {
export interface ICommonConfiguration { export interface ICommonConfiguration {
MarketId: string; MarketId: string;
ATokenNamePrefix: string;
StableDebtTokenNamePrefix: string;
VariableDebtTokenNamePrefix: string;
SymbolPrefix: string;
ProviderId: number; ProviderId: number;
ProtocolGlobalParams: IProtocolGlobalConfig; ProtocolGlobalParams: IProtocolGlobalConfig;
Mocks: IMocksConfig; Mocks: IMocksConfig;

View File

@ -23,35 +23,38 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
WBTC: oneEther.multipliedBy('47.332685').toFixed(), WBTC: oneEther.multipliedBy('47.332685').toFixed(),
YFI: oneEther.multipliedBy('22.407436').toFixed(), YFI: oneEther.multipliedBy('22.407436').toFixed(),
ZRX: oneEther.multipliedBy('0.001151').toFixed(), ZRX: oneEther.multipliedBy('0.001151').toFixed(),
LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(), // LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(), // LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(), // LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
LpWBTC: oneEther.multipliedBy('47.332685').toFixed(), // LpWBTC: oneEther.multipliedBy('47.332685').toFixed(),
LpWETH: oneEther.toFixed(), // LpWETH: oneEther.toFixed(),
LpUniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(), UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(), UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(),
LpUniBATWETH: oneEther.multipliedBy('22.407436').toFixed(), UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(), UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(),
LpUniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(), UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(), UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(),
LpUniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(), UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniRENWETH: oneEther.multipliedBy('22.407436').toFixed(), UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(), UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(), UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(), UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(), UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(),
LpUniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(), UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpBalWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
USD: '5848466240000000', USD: '5848466240000000',
}; };
// ---------------- // ----------------
// PROTOCOL GLOBAL PARAMS // PROTOCOL GLOBAL PARAMS
// ---------------- // ----------------
export const CommonsConfig: ICommonConfiguration = { export const CommonsConfig: ICommonConfiguration = {
MarketId: 'Commons', MarketId: 'Commons',
ATokenNamePrefix: 'Aave interest bearing',
StableDebtTokenNamePrefix: 'Aave stable debt bearing',
VariableDebtTokenNamePrefix: 'Aave variable debt bearing',
SymbolPrefix: '',
ProviderId: 0, ProviderId: 0,
ProtocolGlobalParams: { ProtocolGlobalParams: {
TokenDistributorPercentageBase: '10000', TokenDistributorPercentageBase: '10000',

View File

@ -23,26 +23,26 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
WBTC: oneEther.multipliedBy('47.332685').toFixed(), WBTC: oneEther.multipliedBy('47.332685').toFixed(),
YFI: oneEther.multipliedBy('22.407436').toFixed(), YFI: oneEther.multipliedBy('22.407436').toFixed(),
ZRX: oneEther.multipliedBy('0.001151').toFixed(), ZRX: oneEther.multipliedBy('0.001151').toFixed(),
LpDAI: oneEther.multipliedBy('0.00369068412860').toFixed(), // DAI: oneEther.multipliedBy('0.00369068412860').toFixed(),
LpUSDC: oneEther.multipliedBy('0.00367714136416').toFixed(), // USDC: oneEther.multipliedBy('0.00367714136416').toFixed(),
LpUSDT: oneEther.multipliedBy('0.00369068412860').toFixed(), // USDT: oneEther.multipliedBy('0.00369068412860').toFixed(),
LpWBTC: oneEther.multipliedBy('47.332685').toFixed(), // WBTC: oneEther.multipliedBy('47.332685').toFixed(),
LpWETH: oneEther.toFixed(), // WETH: oneEther.toFixed(),
LpUniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(), UniDAIWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), UniWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(), UniAAVEWETH: oneEther.multipliedBy('0.003620948469').toFixed(),
LpUniBATWETH: oneEther.multipliedBy('22.407436').toFixed(), UniBATWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(), UniUSDCDAI: oneEther.multipliedBy('22.407436').toFixed(),
LpUniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(), UniCRVWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(), UniLINKWETH: oneEther.multipliedBy('0.009955').toFixed(),
LpUniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(), UniMKRWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniRENWETH: oneEther.multipliedBy('22.407436').toFixed(), UniRENWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(), UniSNXWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(), UniUNIWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(), UniUSDCWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpUniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(), UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(),
LpUniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(), UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(),
LpBalWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(),
USD: '5848466240000000', USD: '5848466240000000',
}; };
// ---------------- // ----------------
@ -51,6 +51,10 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
export const CommonsConfig: ICommonConfiguration = { export const CommonsConfig: ICommonConfiguration = {
MarketId: 'Commons', MarketId: 'Commons',
ATokenNamePrefix: 'Aave AMM Market',
StableDebtTokenNamePrefix: 'Aave AMM Market stable debt',
VariableDebtTokenNamePrefix: 'Aave AMM Market variable debt',
SymbolPrefix: 'Amm',
ProviderId: 0, ProviderId: 0,
ProtocolGlobalParams: { ProtocolGlobalParams: {
TokenDistributorPercentageBase: '10000', TokenDistributorPercentageBase: '10000',
@ -72,64 +76,64 @@ export const CommonsConfig: ICommonConfiguration = {
}, },
// TODO: reorg alphabetically, checking the reason of tests failing // TODO: reorg alphabetically, checking the reason of tests failing
LendingRateOracleRatesCommon: { LendingRateOracleRatesCommon: {
LpWETH: { WETH: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(), borrowRate: oneRay.multipliedBy(0.03).toFixed(),
}, },
LpDAI: { DAI: {
borrowRate: oneRay.multipliedBy(0.039).toFixed(), borrowRate: oneRay.multipliedBy(0.039).toFixed(),
}, },
LpUSDC: { USDC: {
borrowRate: oneRay.multipliedBy(0.039).toFixed(), borrowRate: oneRay.multipliedBy(0.039).toFixed(),
}, },
LpUSDT: { USDT: {
borrowRate: oneRay.multipliedBy(0.035).toFixed(), borrowRate: oneRay.multipliedBy(0.035).toFixed(),
}, },
LpWBTC: { WBTC: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(), borrowRate: oneRay.multipliedBy(0.03).toFixed(),
}, },
LpUniDAIWETH: { UniDAIWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniWBTCWETH: { UniWBTCWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniAAVEWETH:{ UniAAVEWETH:{
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniBATWETH: { UniBATWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniUSDCDAI: { UniUSDCDAI: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniCRVWETH: { UniCRVWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniLINKWETH: { UniLINKWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniMKRWETH: { UniMKRWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniRENWETH: { UniRENWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniSNXWETH: { UniSNXWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniUNIWETH: { UniUNIWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniUSDCWETH: { UniUSDCWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniWBTCUSDC: { UniWBTCUSDC: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpUniYFIWETH: { UniYFIWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
LpBalWBTCWETH: { BptWBTCWETH: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(), borrowRate: oneRay.multipliedBy(0.05).toFixed(),
}, },
}, },
@ -174,8 +178,8 @@ export const CommonsConfig: ICommonConfiguration = {
[eEthereumNetwork.mumbai]: '', [eEthereumNetwork.mumbai]: '',
[eEthereumNetwork.matic]: '', [eEthereumNetwork.matic]: '',
}, },
ProviderRegistryOwner: { // TEMPORARILY USING MY DEPLOYER ProviderRegistryOwner: { // DEPLOYED WITH CORRECT ADDRESS
[eEthereumNetwork.kovan]: '0x18d9bA2baEfBdE0FF137C4ad031427EF205f1Fd9',//'0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F', [eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F',
[eEthereumNetwork.ropsten]: '', [eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f', [eEthereumNetwork.main]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f',
[eEthereumNetwork.coverage]: '', [eEthereumNetwork.coverage]: '',
@ -189,7 +193,7 @@ export const CommonsConfig: ICommonConfiguration = {
[eEthereumNetwork.coverage]: '', [eEthereumNetwork.coverage]: '',
[eEthereumNetwork.hardhat]: '', [eEthereumNetwork.hardhat]: '',
[eEthereumNetwork.buidlerevm]: '', [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.ropsten]: '0x05dcca805a6562c1bdd0423768754acb6993241b',
[eEthereumNetwork.main]: '', //'0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D', // Need to re-deploy because of onlyOwner [eEthereumNetwork.main]: '', //'0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D', // Need to re-deploy because of onlyOwner
[eEthereumNetwork.tenderlyMain]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D', [eEthereumNetwork.tenderlyMain]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
@ -222,7 +226,7 @@ export const CommonsConfig: ICommonConfiguration = {
[eEthereumNetwork.coverage]: '', [eEthereumNetwork.coverage]: '',
[eEthereumNetwork.hardhat]: '', [eEthereumNetwork.hardhat]: '',
[eEthereumNetwork.buidlerevm]: '', [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.ropsten]: ZERO_ADDRESS,
[EthereumNetwork.main]: '',//'0xA50ba011c48153De246E5192C8f9258A2ba79Ca9', // Need to re-deploy because of onlyOwner [EthereumNetwork.main]: '',//'0xA50ba011c48153De246E5192C8f9258A2ba79Ca9', // Need to re-deploy because of onlyOwner
[EthereumNetwork.tenderlyMain]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9', [EthereumNetwork.tenderlyMain]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
@ -245,71 +249,71 @@ export const CommonsConfig: ICommonConfiguration = {
[eEthereumNetwork.hardhat]: {}, [eEthereumNetwork.hardhat]: {},
[eEthereumNetwork.buidlerevm]: {}, [eEthereumNetwork.buidlerevm]: {},
[EthereumNetwork.kovan]: { [EthereumNetwork.kovan]: {
LpUSDT: '0x0bF499444525a23E7Bb61997539725cA2e928138', USDT: '0x0bF499444525a23E7Bb61997539725cA2e928138',
LpWBTC: '0xF7904a295A029a3aBDFFB6F12755974a958C7C25', WBTC: '0xF7904a295A029a3aBDFFB6F12755974a958C7C25',
LpUSDC: '0x64EaC61A2DFda2c3Fa04eED49AA33D021AeC8838', USDC: '0x64EaC61A2DFda2c3Fa04eED49AA33D021AeC8838',
LpDAI:'0x22B58f1EbEDfCA50feF632bD73368b2FdA96D541', DAI:'0x22B58f1EbEDfCA50feF632bD73368b2FdA96D541',
LpUniDAIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', // Mock oracles UniDAIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', // Mock oracles
LpUniWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniAAVEWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniAAVEWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniBATWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniBATWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniUSDCDAI: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniUSDCDAI: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniCRVWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniCRVWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniLINKWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniLINKWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniMKRWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniMKRWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniRENWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniRENWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniSNXWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniSNXWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniUNIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniUNIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniUSDCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniUSDCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniWBTCUSDC: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniWBTCUSDC: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpUniYFIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniYFIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
LpBalWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', BptWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F',
USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', USD: '0x9326BFA02ADD2366b30bacB125260Af641031331',
}, },
[EthereumNetwork.ropsten]: { [EthereumNetwork.ropsten]: {
}, },
[EthereumNetwork.main]: { [EthereumNetwork.main]: {
LpUSDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46', USDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46',
LpWBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8', WBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8',
LpUSDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4', USDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4',
LpDAI:'0x773616E4d11A78F511299002da57A0a94577F1f4', DAI:'0x773616E4d11A78F511299002da57A0a94577F1f4',
LpUniDAIWETH: '0xf4071801C4421Db7e63DaC15B9432e50C44a7F42', UniDAIWETH: '0xf4071801C4421Db7e63DaC15B9432e50C44a7F42',
LpUniWBTCWETH: ZERO_ADDRESS, UniWBTCWETH: ZERO_ADDRESS,
LpUniAAVEWETH: ZERO_ADDRESS, UniAAVEWETH: ZERO_ADDRESS,
LpUniBATWETH: ZERO_ADDRESS, UniBATWETH: ZERO_ADDRESS,
LpUniUSDCDAI: ZERO_ADDRESS, UniUSDCDAI: ZERO_ADDRESS,
LpUniCRVWETH: ZERO_ADDRESS, UniCRVWETH: ZERO_ADDRESS,
LpUniLINKWETH: ZERO_ADDRESS, UniLINKWETH: ZERO_ADDRESS,
LpUniMKRWETH: ZERO_ADDRESS, UniMKRWETH: ZERO_ADDRESS,
LpUniRENWETH: ZERO_ADDRESS, UniRENWETH: ZERO_ADDRESS,
LpUniSNXWETH: ZERO_ADDRESS, UniSNXWETH: ZERO_ADDRESS,
LpUniUNIWETH: ZERO_ADDRESS, UniUNIWETH: ZERO_ADDRESS,
LpUniUSDCWETH: ZERO_ADDRESS, UniUSDCWETH: ZERO_ADDRESS,
LpUniWBTCUSDC: ZERO_ADDRESS, UniWBTCUSDC: ZERO_ADDRESS,
LpUniYFIWETH: ZERO_ADDRESS, UniYFIWETH: ZERO_ADDRESS,
LpBalWBTCWETH: ZERO_ADDRESS, BptWBTCWETH: ZERO_ADDRESS,
USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', USD: '0x9326BFA02ADD2366b30bacB125260Af641031331',
}, },
[EthereumNetwork.tenderlyMain]: { [EthereumNetwork.tenderlyMain]: {
LpUSDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46', USDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46',
LpWBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8', WBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8',
LpUSDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4', USDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4',
LpDAI:'0x773616E4d11A78F511299002da57A0a94577F1f4', DAI:'0x773616E4d11A78F511299002da57A0a94577F1f4',
LpUniDAIWETH: ZERO_ADDRESS, UniDAIWETH: ZERO_ADDRESS,
LpUniWBTCWETH: ZERO_ADDRESS, UniWBTCWETH: ZERO_ADDRESS,
LpUniAAVEWETH: ZERO_ADDRESS, UniAAVEWETH: ZERO_ADDRESS,
LpUniBATWETH: ZERO_ADDRESS, UniBATWETH: ZERO_ADDRESS,
LpUniUSDCDAI: ZERO_ADDRESS, UniUSDCDAI: ZERO_ADDRESS,
LpUniCRVWETH: ZERO_ADDRESS, UniCRVWETH: ZERO_ADDRESS,
LpUniLINKWETH: ZERO_ADDRESS, UniLINKWETH: ZERO_ADDRESS,
LpUniMKRWETH: ZERO_ADDRESS, UniMKRWETH: ZERO_ADDRESS,
LpUniRENWETH: ZERO_ADDRESS, UniRENWETH: ZERO_ADDRESS,
LpUniSNXWETH: ZERO_ADDRESS, UniSNXWETH: ZERO_ADDRESS,
LpUniUNIWETH: ZERO_ADDRESS, UniUNIWETH: ZERO_ADDRESS,
LpUniUSDCWETH: ZERO_ADDRESS, UniUSDCWETH: ZERO_ADDRESS,
LpUniWBTCUSDC: ZERO_ADDRESS, UniWBTCUSDC: ZERO_ADDRESS,
LpUniYFIWETH: ZERO_ADDRESS, UniYFIWETH: ZERO_ADDRESS,
LpBalWBTCWETH: ZERO_ADDRESS, BptWBTCWETH: ZERO_ADDRESS,
USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', USD: '0x9326BFA02ADD2366b30bacB125260Af641031331',
}, },
[eEthereumNetwork.mumbai]: {}, [eEthereumNetwork.mumbai]: {},

View File

@ -33,26 +33,26 @@ export const lpConfig: ILpConfiguration = {
MarketId: 'Aave LP market', MarketId: 'Aave LP market',
ProviderId: 2, ProviderId: 2,
ReservesConfig: { ReservesConfig: {
LpWETH: strategyWETH, WETH: strategyWETH,
LpDAI: strategyDAI, DAI: strategyDAI,
LpUSDC: strategyUSDC, USDC: strategyUSDC,
LpUSDT: strategyUSDT, USDT: strategyUSDT,
LpWBTC: strategyWBTC, WBTC: strategyWBTC,
LpUniDAIWETH: strategyDAIWETH, UniDAIWETH: strategyDAIWETH,
LpUniWBTCWETH: strategyWBTCWETH, UniWBTCWETH: strategyWBTCWETH,
LpUniAAVEWETH: strategyAAVEWETH, UniAAVEWETH: strategyAAVEWETH,
LpUniBATWETH: strategyBATWETH, UniBATWETH: strategyBATWETH,
LpUniUSDCDAI: strategyUSDCDAI, UniUSDCDAI: strategyUSDCDAI,
LpUniCRVWETH: strategyCRVWETH, UniCRVWETH: strategyCRVWETH,
LpUniLINKWETH: strategyLINKWETH, UniLINKWETH: strategyLINKWETH,
LpUniMKRWETH: strategyMKRWETH, UniMKRWETH: strategyMKRWETH,
LpUniRENWETH: strategyRENWETH, UniRENWETH: strategyRENWETH,
LpUniSNXWETH: strategySNXWETH, UniSNXWETH: strategySNXWETH,
LpUniUNIWETH: strategyUNIWETH, UniUNIWETH: strategyUNIWETH,
LpUniUSDCWETH: strategyUSDCWETH, UniUSDCWETH: strategyUSDCWETH,
LpUniWBTCUSDC: strategyWBTCUSDC, UniWBTCUSDC: strategyWBTCUSDC,
LpUniYFIWETH: strategyYFIWETH, UniYFIWETH: strategyYFIWETH,
LpBalWBTCWETH: strategyWBTCWETH, BptWBTCWETH: strategyWBTCWETH,
}, },
ReserveAssets: { ReserveAssets: {
[eEthereumNetwork.buidlerevm]: {}, [eEthereumNetwork.buidlerevm]: {},
@ -61,72 +61,72 @@ export const lpConfig: ILpConfiguration = {
[eEthereumNetwork.matic]: {}, [eEthereumNetwork.matic]: {},
[eEthereumNetwork.mumbai]: {}, [eEthereumNetwork.mumbai]: {},
[EthereumNetwork.kovan]: { [EthereumNetwork.kovan]: {
LpDAI: '0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD', DAI: '0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD',
LpUSDC: '0xe22da380ee6B445bb8273C81944ADEB6E8450422', USDC: '0xe22da380ee6B445bb8273C81944ADEB6E8450422',
LpUSDT: '0x13512979ADE267AB5100878E2e0f485B568328a4', USDT: '0x13512979ADE267AB5100878E2e0f485B568328a4',
LpWBTC: '0xD1B98B6607330172f1D991521145A22BCe793277', WBTC: '0xD1B98B6607330172f1D991521145A22BCe793277',
LpWETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', WETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
LpUniDAIWETH: '0x7e48b02B21D784e79E17b06988fc150c8b5945df', UniDAIWETH: '0x0C652EeEA3d7D35759ba1E16183F1D89C386C9ea',
LpUniWBTCWETH: '0x4Fd18882730dc5f945d5049C3f99Ee43CCA1F3d9', UniWBTCWETH: '0x796d562B1dF5b9dc85A4612187B6f29Ed213d960',
LpUniAAVEWETH: '0xC173038224d47e11962bb0Bd10e036c573C57dF0', UniAAVEWETH: '0x657A7B8b46F35C5C6583AEF43824744B236EF826',
LpUniBATWETH: '0xfC482c56A91Cc92019FF6522B2FB76F41B7e2535', UniBATWETH: '0xf8CEBA8b16579956B3aE4B5D09002a30f873F783',
LpUniUSDCDAI: '0xFD0795980D4c37Fd867228C86A1f7693C9219142', UniUSDCDAI: '0x8e80b7a7531c276dD1dBEC2f1Cc281c11c859e62',
LpUniCRVWETH: '0xC7f1899F8B5861d8A3Ce1385194bc130A15C8a74', UniCRVWETH: '0x9c31b7538467bF0b01e6d5fA789e66Ce540a521e',
LpUniLINKWETH: '0xCe2355F9249ced9E51ecc35AbB749352C2557D0d', UniLINKWETH: '0x5Acab7f8B79620ec7127A96E5D8837d2124D5D7c',
LpUniMKRWETH: '0xDCf7A28f4102B7f5813148cCEFb02134648E6F0C', UniMKRWETH: '0xB0C6EC5d58ddbF4cd1e419A56a19924E9904e4Dd',
LpUniRENWETH: '0xe46C9459833bBa061471DF2a383D27a20FE97E23', UniRENWETH: '0xcF428637A9f8Af21920Bc0A94fd81071bc790105',
LpUniSNXWETH: '0xAa5826dea7cfEc02AcB644b24387bE2648feAbB9', UniSNXWETH: '0xc8F2a0d698f675Ece74042e9fB06ea52b9517521',
LpUniUNIWETH: '0xD4C255B5500cFB262EB5F9105Ea546Aa0610A0d3', UniUNIWETH: '0xcC99A5f95a86d30e3DeF113bCf22f00ecF90D050',
LpUniUSDCWETH: '0x509f6ce2F9718E3dd854cCE1857FabCc59C6dd5e', UniUSDCWETH: '0x8C00D2428ed1857E61652aca663323A85E6e76a9',
LpUniWBTCUSDC: '0x9D15e3A14926A16C9B285A5c6bd6c9e82d5F8031', UniWBTCUSDC: '0x3d35B5F289f55A580e6F85eE22E6a8f57053b966',
LpUniYFIWETH: '0xC6Dc783B3C2E2Cbf71791d253f8b4993D40DBf98', UniYFIWETH: '0x5af95ddFACC150a1695A3Fc606459fd0dE57b91f',
LpBalWBTCWETH: '0x930087451C5940B28bE556d32a4CF22D5d9754A1', BptWBTCWETH: '0x110569E3261bC0934dA637b019f6f1b6F50ec574',
}, },
[EthereumNetwork.ropsten]: { [EthereumNetwork.ropsten]: {
}, },
[EthereumNetwork.main]: { [EthereumNetwork.main]: {
LpDAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F', DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
LpUSDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
LpUSDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7', USDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
LpWBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', WBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
LpWETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
LpUniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11', UniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11',
LpUniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940', UniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940',
LpUniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f', UniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f',
LpUniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838', UniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838',
LpUniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5', UniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5',
LpUniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE', UniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE',
LpUniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974', UniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974',
LpUniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225', UniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225',
LpUniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c', UniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c',
LpUniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47', UniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47',
LpUniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17', UniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17',
LpUniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc', UniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc',
LpUniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', UniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416',
LpUniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', UniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28',
LpBalWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', BptWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5',
}, },
[EthereumNetwork.tenderlyMain]: { [EthereumNetwork.tenderlyMain]: {
LpDAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F', DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
LpUSDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
LpUSDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7', USDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
LpWBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', WBTC: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
LpWETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
LpUniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11', UniDAIWETH: '0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11',
LpUniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940', UniWBTCWETH: '0xBb2b8038a1640196FbE3e38816F3e67Cba72D940',
LpUniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f', UniAAVEWETH: '0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f',
LpUniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838', UniBATWETH: '0xB6909B960DbbE7392D405429eB2b3649752b4838',
LpUniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5', UniUSDCDAI: '0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5',
LpUniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE', UniCRVWETH: '0x3dA1313aE46132A397D90d95B1424A9A7e3e0fCE',
LpUniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974', UniLINKWETH: '0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974',
LpUniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225', UniMKRWETH: '0xC2aDdA861F89bBB333c90c492cB837741916A225',
LpUniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c', UniRENWETH: '0x8Bd1661Da98EBDd3BD080F0bE4e6d9bE8cE9858c',
LpUniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47', UniSNXWETH: '0x43AE24960e5534731Fc831386c07755A2dc33D47',
LpUniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17', UniUNIWETH: '0xd3d2E2692501A5c9Ca623199D38826e513033a17',
LpUniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc', UniUSDCWETH: '0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc',
LpUniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', UniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416',
LpUniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', UniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28',
LpBalWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', BptWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5',
}, },
}, },
}; };

View File

@ -31,7 +31,12 @@ task('dev:initialize-lending-pool', 'Initialize lending pool configuration.')
.setAction(async ({ verify, pool }, localBRE) => { .setAction(async ({ verify, pool }, localBRE) => {
await localBRE.run('set-DRE'); await localBRE.run('set-DRE');
const poolConfig = loadPoolConfig(pool); const poolConfig = loadPoolConfig(pool);
const {
ATokenNamePrefix,
StableDebtTokenNamePrefix,
VariableDebtTokenNamePrefix,
SymbolPrefix,
} = poolConfig;
const mockTokens = await getAllMockedTokens(); const mockTokens = await getAllMockedTokens();
const allTokenAddresses = getAllTokenAddresses(mockTokens); const allTokenAddresses = getAllTokenAddresses(mockTokens);
@ -52,6 +57,10 @@ task('dev:initialize-lending-pool', 'Initialize lending pool configuration.')
await initReservesByHelper( await initReservesByHelper(
reservesParams, reservesParams,
protoPoolReservesAddresses, protoPoolReservesAddresses,
ATokenNamePrefix,
StableDebtTokenNamePrefix,
VariableDebtTokenNamePrefix,
SymbolPrefix,
admin, admin,
treasuryAddress, treasuryAddress,
ZERO_ADDRESS, ZERO_ADDRESS,

View File

@ -82,15 +82,14 @@ task(
// 2. Deploy address provider and set genesis manager // 2. Deploy address provider and set genesis manager
const addressesProvider = await deployLendingPoolAddressesProvider(MarketId, verify); 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 // 3. Set the provider at the Registry
// await waitForTx( await waitForTx(
// await addressesProviderRegistry.registerAddressesProvider( await addressesProviderRegistry.registerAddressesProvider(
// addressesProvider.address, addressesProvider.address,
// ProviderId ProviderId
// ) )
// ); );
// 4. Set pool admins // 4. Set pool admins

View File

@ -48,23 +48,17 @@ task('full:deploy-oracles', 'Deploy oracles for dev enviroment')
}; };
const [tokens, aggregators] = getPairsTokenAggregator(tokensToWatch, chainlinkAggregators); 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; let aaveOracle: AaveOracle;
if (notFalsyOrZeroAddress(aaveOracleAddress)) { if (notFalsyOrZeroAddress(aaveOracleAddress)) {
aaveOracle = await getAaveOracle(aaveOracleAddress); aaveOracle = await getAaveOracle(aaveOracleAddress);
await aaveOracle.setAssetSources(tokens, aggregators); await waitForTx(await aaveOracle.setAssetSources(tokens, aggregators));
} else { } else {
aaveOracle = await deployAaveOracle( aaveOracle = await deployAaveOracle(
[tokens, aggregators, fallbackOracleAddress, await getWethAddress(poolConfig)], [tokens, aggregators, fallbackOracleAddress, await getWethAddress(poolConfig)],
verify verify
); );
} }
const lendingRateOracle = notFalsyOrZeroAddress(lendingRateOracleAddress) const lendingRateOracle = notFalsyOrZeroAddress(lendingRateOracleAddress)
? await getLendingRateOracle(lendingRateOracleAddress) ? await getLendingRateOracle(lendingRateOracleAddress)
: await deployLendingRateOracle(verify); : await deployLendingRateOracle(verify);

View File

@ -29,7 +29,15 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')
await localBRE.run('set-DRE'); await localBRE.run('set-DRE');
const network = <eEthereumNetwork>localBRE.network.name; const network = <eEthereumNetwork>localBRE.network.name;
const poolConfig = loadPoolConfig(pool); 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); const reserveAssets = await getParamPerNetwork(ReserveAssets, network);
@ -47,6 +55,10 @@ task('full:initialize-lending-pool', 'Initialize lending pool configuration.')
await initReservesByHelper( await initReservesByHelper(
ReservesConfig, ReservesConfig,
reserveAssets, reserveAssets,
ATokenNamePrefix,
StableDebtTokenNamePrefix,
VariableDebtTokenNamePrefix,
SymbolPrefix,
admin, admin,
treasuryAddress, treasuryAddress,
ZERO_ADDRESS, ZERO_ADDRESS,

View File

@ -95,7 +95,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
const aaveAdmin = await deployer.getAddress(); const aaveAdmin = await deployer.getAddress();
const mockTokens = await deployAllMockTokens(deployer); const mockTokens = await deployAllMockTokens(deployer);
console.log("Deployed mocks");
const addressesProvider = await deployLendingPoolAddressesProvider(AaveConfig.MarketId); const addressesProvider = await deployLendingPoolAddressesProvider(AaveConfig.MarketId);
await waitForTx(await addressesProvider.setPoolAdmin(aaveAdmin)); await waitForTx(await addressesProvider.setPoolAdmin(aaveAdmin));
@ -165,33 +165,33 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
REN: mockTokens.REN.address, REN: mockTokens.REN.address,
UNI: mockTokens.UNI.address, UNI: mockTokens.UNI.address,
ENJ: mockTokens.ENJ.address, ENJ: mockTokens.ENJ.address,
LpDAI: mockTokens.LpDAI.address, // DAI: mockTokens.LpDAI.address,
LpUSDC: mockTokens.LpUSDC.address, // USDC: mockTokens.LpUSDC.address,
LpUSDT: mockTokens.LpUSDT.address, // USDT: mockTokens.LpUSDT.address,
LpWBTC: mockTokens.LpWBTC.address, // WBTC: mockTokens.LpWBTC.address,
LpWETH: mockTokens.LpWETH.address, // WETH: mockTokens.LpWETH.address,
LpUniDAIWETH: mockTokens.LpUniDAIWETH.address, UniDAIWETH: mockTokens.UniDAIWETH.address,
LpUniWBTCWETH: mockTokens.LpUniWBTCWETH.address, UniWBTCWETH: mockTokens.UniWBTCWETH.address,
LpUniAAVEWETH: mockTokens.LpUniAAVEWETH.address, UniAAVEWETH: mockTokens.UniAAVEWETH.address,
LpUniBATWETH: mockTokens.LpUniBATWETH.address, UniBATWETH: mockTokens.UniBATWETH.address,
LpUniUSDCDAI: mockTokens.LpUniUSDCDAI.address, UniUSDCDAI: mockTokens.UniUSDCDAI.address,
LpUniCRVWETH: mockTokens.LpUniCRVWETH.address, UniCRVWETH: mockTokens.UniCRVWETH.address,
LpUniLINKWETH: mockTokens.LpUniLINKWETH.address, UniLINKWETH: mockTokens.UniLINKWETH.address,
LpUniMKRWETH: mockTokens.LpUniMKRWETH.address, UniMKRWETH: mockTokens.UniMKRWETH.address,
LpUniRENWETH: mockTokens.LpUniRENWETH.address, UniRENWETH: mockTokens.UniRENWETH.address,
LpUniSNXWETH: mockTokens.LpUniSNXWETH.address, UniSNXWETH: mockTokens.UniSNXWETH.address,
LpUniUNIWETH: mockTokens.LpUniUNIWETH.address, UniUNIWETH: mockTokens.UniUNIWETH.address,
LpUniUSDCWETH: mockTokens.LpUniUSDCWETH.address, UniUSDCWETH: mockTokens.UniUSDCWETH.address,
LpUniWBTCUSDC: mockTokens.LpUniWBTCUSDC.address, UniWBTCUSDC: mockTokens.UniWBTCUSDC.address,
LpUniYFIWETH: mockTokens.LpUniYFIWETH.address, UniYFIWETH: mockTokens.UniYFIWETH.address,
LpBalWBTCWETH: mockTokens.LpBalWBTCWETH.address, BptWBTCWETH: mockTokens.BptWBTCWETH.address,
USD: USD_ADDRESS, USD: USD_ADDRESS,
}, },
fallbackOracle fallbackOracle
); );
const mockAggregators = await deployAllMockAggregators(MOCK_CHAINLINK_AGGREGATORS_PRICES); const mockAggregators = await deployAllMockAggregators(MOCK_CHAINLINK_AGGREGATORS_PRICES);
console.log("Mock aggs deployed");
const allTokenAddresses = Object.entries(mockTokens).reduce( const allTokenAddresses = Object.entries(mockTokens).reduce(
(accum: { [tokenSymbol: string]: tEthereumAddress }, [tokenSymbol, tokenContract]) => ({ (accum: { [tokenSymbol: string]: tEthereumAddress }, [tokenSymbol, tokenContract]) => ({
...accum, ...accum,
@ -237,16 +237,27 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
const config = loadPoolConfig(ConfigNames.Aave); const config = loadPoolConfig(ConfigNames.Aave);
const {
ATokenNamePrefix,
StableDebtTokenNamePrefix,
VariableDebtTokenNamePrefix,
SymbolPrefix,
} = config;
const treasuryAddress = await getTreasuryAddress(config); const treasuryAddress = await getTreasuryAddress(config);
await initReservesByHelper( await initReservesByHelper(
reservesParams, reservesParams,
allReservesAddresses, allReservesAddresses,
ATokenNamePrefix,
StableDebtTokenNamePrefix,
VariableDebtTokenNamePrefix,
SymbolPrefix,
admin, admin,
treasuryAddress, treasuryAddress,
ZERO_ADDRESS, ZERO_ADDRESS,
false false
); );
await configureReservesByHelper(reservesParams, allReservesAddresses, testHelpers, admin); await configureReservesByHelper(reservesParams, allReservesAddresses, testHelpers, admin);
const collateralManager = await deployLendingPoolCollateralManager(); const collateralManager = await deployLendingPoolCollateralManager();

View File

@ -66,7 +66,7 @@ const deployAllMockTokens = async (deployer: Signer) => {
const lpConfigData = getReservesConfigByPool(AavePools.lp); const lpConfigData = getReservesConfigByPool(AavePools.lp);
for (const tokenSymbol of Object.keys(TokenContractId)) { for (const tokenSymbol of Object.keys(TokenContractId)) {
if (tokenSymbol === 'LpWETH') { if (tokenSymbol === 'WETH') {
tokens[tokenSymbol] = await deployWETHMocked(); tokens[tokenSymbol] = await deployWETHMocked();
await registerContractInJsonDb('WETH', tokens[tokenSymbol]); await registerContractInJsonDb('WETH', tokens[tokenSymbol]);
continue; continue;
@ -165,26 +165,26 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
REN: mockTokens.REN.address, REN: mockTokens.REN.address,
UNI: mockTokens.UNI.address, UNI: mockTokens.UNI.address,
ENJ: mockTokens.ENJ.address, ENJ: mockTokens.ENJ.address,
LpDAI: mockTokens.LpDAI.address, // DAI: mockTokens.LpDAI.address,
LpUSDC: mockTokens.LpUSDC.address, // USDC: mockTokens.LpUSDC.address,
LpUSDT: mockTokens.LpUSDT.address, // USDT: mockTokens.LpUSDT.address,
LpWBTC: mockTokens.LpWBTC.address, // WBTC: mockTokens.LpWBTC.address,
LpWETH: mockTokens.LpWETH.address, // WETH: mockTokens.LpWETH.address,
LpUniDAIWETH: mockTokens.LpUniDAIWETH.address, UniDAIWETH: mockTokens.UniDAIWETH.address,
LpUniWBTCWETH: mockTokens.LpUniWBTCWETH.address, UniWBTCWETH: mockTokens.UniWBTCWETH.address,
LpUniAAVEWETH: mockTokens.LpUniAAVEWETH.address, UniAAVEWETH: mockTokens.UniAAVEWETH.address,
LpUniBATWETH: mockTokens.LpUniBATWETH.address, UniBATWETH: mockTokens.UniBATWETH.address,
LpUniUSDCDAI: mockTokens.LpUniUSDCDAI.address, UniUSDCDAI: mockTokens.UniUSDCDAI.address,
LpUniCRVWETH: mockTokens.LpUniCRVWETH.address, UniCRVWETH: mockTokens.UniCRVWETH.address,
LpUniLINKWETH: mockTokens.LpUniLINKWETH.address, UniLINKWETH: mockTokens.UniLINKWETH.address,
LpUniMKRWETH: mockTokens.LpUniMKRWETH.address, UniMKRWETH: mockTokens.UniMKRWETH.address,
LpUniRENWETH: mockTokens.LpUniRENWETH.address, UniRENWETH: mockTokens.UniRENWETH.address,
LpUniSNXWETH: mockTokens.LpUniSNXWETH.address, UniSNXWETH: mockTokens.UniSNXWETH.address,
LpUniUNIWETH: mockTokens.LpUniUNIWETH.address, UniUNIWETH: mockTokens.UniUNIWETH.address,
LpUniUSDCWETH: mockTokens.LpUniUSDCWETH.address, UniUSDCWETH: mockTokens.UniUSDCWETH.address,
LpUniWBTCUSDC: mockTokens.LpUniWBTCUSDC.address, UniWBTCUSDC: mockTokens.UniWBTCUSDC.address,
LpUniYFIWETH: mockTokens.LpUniYFIWETH.address, UniYFIWETH: mockTokens.UniYFIWETH.address,
LpBalWBTCWETH: mockTokens.LpBalWBTCWETH.address, BptWBTCWETH: mockTokens.BptWBTCWETH.address,
USD: USD_ADDRESS, USD: USD_ADDRESS,
}, },
fallbackOracle fallbackOracle
@ -236,12 +236,22 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
console.log('Initialize configuration'); console.log('Initialize configuration');
const config = loadPoolConfig(ConfigNames.Lp); const config = loadPoolConfig(ConfigNames.Lp);
const {
ATokenNamePrefix,
StableDebtTokenNamePrefix,
VariableDebtTokenNamePrefix,
SymbolPrefix,
} = config;
const treasuryAddress = await getTreasuryAddress(config); const treasuryAddress = await getTreasuryAddress(config);
await initReservesByHelper( await initReservesByHelper(
reservesParams, reservesParams,
allReservesAddresses, allReservesAddresses,
ATokenNamePrefix,
StableDebtTokenNamePrefix,
VariableDebtTokenNamePrefix,
SymbolPrefix,
admin, admin,
treasuryAddress, treasuryAddress,
ZERO_ADDRESS, ZERO_ADDRESS,
@ -269,7 +279,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
await deployWalletBalancerProvider(); await deployWalletBalancerProvider();
await deployWETHGateway([mockTokens.LpWETH.address, lendingPoolAddress]); await deployWETHGateway([mockTokens.WETH.address, lendingPoolAddress]);
console.timeEnd('setup'); console.timeEnd('setup');
}; };

View File

@ -33,7 +33,7 @@ makeSuite('AToken: Transfer', (testEnv: TestEnv) => {
const name = await aDai.name(); 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 fromBalance = await aDai.balanceOf(users[0].address);
const toBalance = await aDai.balanceOf(users[1].address); const toBalance = await aDai.balanceOf(users[1].address);

View File

@ -128,15 +128,15 @@ export async function initializeMakeSuite() {
testEnv.helpersContract = await getAaveProtocolDataProvider(); testEnv.helpersContract = await getAaveProtocolDataProvider();
const allTokens = await testEnv.helpersContract.getAllATokens(); 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 reservesTokens = await testEnv.helpersContract.getAllReservesTokens();
const daiAddress = reservesTokens.find((token) => token.symbol === 'LpDAI')?.tokenAddress; const daiAddress = reservesTokens.find((token) => token.symbol === 'DAI')?.tokenAddress;
const usdcAddress = reservesTokens.find((token) => token.symbol === 'LpUSDC')?.tokenAddress; const usdcAddress = reservesTokens.find((token) => token.symbol === 'USDC')?.tokenAddress;
const aaveAddress = reservesTokens.find((token) => token.symbol === 'LpUniAAVEWETH')?.tokenAddress; const aaveAddress = reservesTokens.find((token) => token.symbol === 'UniAAVEWETH')?.tokenAddress;
const wethAddress = reservesTokens.find((token) => token.symbol === 'WETH')?.tokenAddress; const wethAddress = reservesTokens.find((token) => token.symbol === 'WETH')?.tokenAddress;
if (!aDaiAddress || !aWEthAddress) { if (!aDaiAddress || !aWEthAddress) {

View File

@ -3,12 +3,12 @@
"description": "Test cases for the deposit function.", "description": "Test cases for the deposit function.",
"stories": [ "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -17,7 +17,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -25,7 +25,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -60,7 +60,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "none", "borrowRateMode": "none",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -85,7 +85,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -93,7 +93,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -128,7 +128,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "invalid", "borrowRateMode": "invalid",
"user": "1" "user": "1"

View File

@ -3,12 +3,12 @@
"description": "Test cases for the borrow function, stable mode.", "description": "Test cases for the borrow function, stable mode.",
"stories": [ "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -17,7 +17,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -25,7 +25,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -61,7 +61,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "1", "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "900", "amount": "900",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "1" "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "900", "amount": "900",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"description": "Mint 10 LPDAI to cover the interest", "description": "Mint 10 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "10", "amount": "10",
"user": "1" "user": "1"
}, },
@ -134,7 +134,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -142,7 +142,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "50", "amount": "50",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "50", "amount": "50",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"description": "Mint 15 LPDAI to cover the interest", "description": "Mint 15 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "15", "amount": "15",
"user": "1" "user": "1"
}, },
@ -184,7 +184,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -192,7 +192,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -247,7 +247,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -255,7 +255,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -264,7 +264,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "2" "user": "2"
@ -275,7 +275,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -298,7 +298,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -306,7 +306,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -341,7 +341,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "1", "user": "1",
@ -378,7 +378,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "2", "user": "2",
@ -415,7 +415,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "3", "user": "3",
@ -452,7 +452,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "4", "user": "4",
@ -462,9 +462,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 15 LPDAI to cover the interest", "description": "Mint 15 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "15", "amount": "15",
"user": "1" "user": "1"
}, },
@ -473,7 +473,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -481,7 +481,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "1", "onBehalfOf": "1",
@ -491,9 +491,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 20 LPDAI to cover the interest", "description": "Mint 20 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "20", "amount": "20",
"user": "2" "user": "2"
}, },
@ -502,7 +502,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "2" "user": "2"
}, },
"expected": "success" "expected": "success"
@ -510,7 +510,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "2", "user": "2",
"onBehalfOf": "2", "onBehalfOf": "2",
@ -520,9 +520,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 30 LPDAI to cover the interest", "description": "Mint 30 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "30", "amount": "30",
"user": "3" "user": "3"
}, },
@ -531,7 +531,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "3" "user": "3"
}, },
"expected": "success" "expected": "success"
@ -539,7 +539,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "3", "user": "3",
"onBehalfOf": "3", "onBehalfOf": "3",
@ -549,9 +549,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 30 LPDAI to cover the interest", "description": "Mint 30 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "30", "amount": "30",
"user": "4" "user": "4"
}, },
@ -560,7 +560,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "4" "user": "4"
}, },
"expected": "success" "expected": "success"
@ -568,7 +568,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "4", "user": "4",
"onBehalfOf": "4", "onBehalfOf": "4",
@ -579,7 +579,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -602,7 +602,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -610,7 +610,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -645,7 +645,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "1", "user": "1",
@ -656,7 +656,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1", "user": "1",
@ -667,7 +667,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1", "user": "1",
@ -677,9 +677,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 50 LPDAI to cover the interest", "description": "Mint 50 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "50", "amount": "50",
"user": "1" "user": "1"
}, },
@ -688,7 +688,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -696,7 +696,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "1", "onBehalfOf": "1",
@ -707,7 +707,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "1", "onBehalfOf": "1",
@ -718,7 +718,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "0" "user": "0"
}, },

View File

@ -3,12 +3,12 @@
"description": "Test cases for the borrow function, variable mode.", "description": "Test cases for the borrow function, variable mode.",
"stories": [ "stories": [
{ {
"description": "User 2 deposits 1 LPDAI to account for rounding errors", "description": "User 2 deposits 1 DAI to account for rounding errors",
"actions": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1", "amount": "1",
"user": "2" "user": "2"
}, },
@ -17,7 +17,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "2" "user": "2"
}, },
"expected": "success" "expected": "success"
@ -25,7 +25,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1", "amount": "1",
"user": "2" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -48,7 +48,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -56,7 +56,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -91,7 +91,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1", "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "900", "amount": "900",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "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": [ "actions": [
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "0", "amount": "0",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -147,7 +147,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1.25", "amount": "1.25",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"description": "Mint 10 LPDAI to cover the interest", "description": "Mint 10 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "10", "amount": "10",
"user": "1" "user": "1"
}, },
@ -173,7 +173,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
@ -274,7 +274,7 @@
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"amount": "100", "amount": "100",
"user": "1" "user": "1"
}, },
@ -283,7 +283,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -292,7 +292,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"amount": "100", "amount": "100",
"user": "1" "user": "1"
}, },
@ -431,7 +431,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"amount": "-1", "amount": "-1",
"user": "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1", "amount": "1",
"user": "2" "user": "2"
}, },
@ -455,7 +455,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "2" "user": "2"
}, },
"expected": "success" "expected": "success"
@ -463,7 +463,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1", "amount": "1",
"user": "2" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -486,7 +486,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -494,7 +494,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -529,7 +529,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1", "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "900", "amount": "900",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"description": "Mint 10 LPUSDC to cover the interest", "description": "Mint 10 USDC to cover the interest",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "10", "amount": "10",
"user": "1" "user": "1"
}, },
@ -571,7 +571,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -579,7 +579,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "-1", "amount": "-1",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -632,7 +632,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -640,7 +640,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -649,7 +649,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "3" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
@ -691,7 +691,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "3" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -730,7 +730,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -738,7 +738,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -747,7 +747,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "3" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
@ -789,7 +789,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "3" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -828,7 +828,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -836,7 +836,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -871,7 +871,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "6", "user": "6",
@ -882,7 +882,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "6", "user": "6",
@ -893,7 +893,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "6", "user": "6",
@ -903,9 +903,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 50 LPDAI to cover the interest", "description": "Mint 50 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "50", "amount": "50",
"user": "6" "user": "6"
}, },
@ -914,7 +914,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "6" "user": "6"
}, },
"expected": "success" "expected": "success"
@ -922,7 +922,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "6", "user": "6",
"onBehalfOf": "6", "onBehalfOf": "6",
@ -933,7 +933,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "6", "user": "6",
"onBehalfOf": "6", "onBehalfOf": "6",
@ -944,7 +944,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "0" "user": "0"
}, },

View File

@ -3,7 +3,7 @@
"description": "Test cases for the credit delegation related functions.", "description": "Test cases for the credit delegation related functions.",
"stories": [ "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
@ -34,7 +34,7 @@
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -43,7 +43,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -51,7 +51,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },

View File

@ -3,12 +3,12 @@
"description": "Test cases for the deposit function.", "description": "Test cases for the deposit function.",
"stories": [ "stories": [
{ {
"description": "User 0 Deposits 1000 LPDAI in an empty reserve", "description": "User 0 Deposits 1000 DAI in an empty reserve",
"actions": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -17,7 +17,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -25,7 +25,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -48,7 +48,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -56,7 +56,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -79,7 +79,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -87,7 +87,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -110,7 +110,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -118,7 +118,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -214,12 +214,12 @@
] ]
}, },
{ {
"description": "User 1 deposits 0 LPDAI", "description": "User 1 deposits 0 DAI",
"actions": [ "actions": [
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "0", "amount": "0",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"user": "1" "user": "1"
}, },
@ -243,7 +243,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"user": "1", "user": "1",
"onBehalfOf": "2" "onBehalfOf": "2"

View File

@ -8,7 +8,7 @@
{ {
"name": "rebalanceStableBorrowRate", "name": "rebalanceStableBorrowRate",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0", "user": "0",
"target": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -32,7 +32,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -40,7 +40,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -75,7 +75,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "250", "amount": "250",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "user": "1"
@ -85,7 +85,7 @@
{ {
"name": "rebalanceStableBorrowRate", "name": "rebalanceStableBorrowRate",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0", "user": "0",
"target": "1" "target": "1"
}, },
@ -100,7 +100,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "200", "amount": "200",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "user": "1"
@ -110,7 +110,7 @@
{ {
"name": "rebalanceStableBorrowRate", "name": "rebalanceStableBorrowRate",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0", "user": "0",
"target": "1" "target": "1"
}, },
@ -125,7 +125,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "200", "amount": "200",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "user": "1"
@ -135,7 +135,7 @@
{ {
"name": "rebalanceStableBorrowRate", "name": "rebalanceStableBorrowRate",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0", "user": "0",
"target": "1" "target": "1"
}, },
@ -150,7 +150,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "280", "amount": "280",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "user": "1"
@ -160,7 +160,7 @@
{ {
"name": "rebalanceStableBorrowRate", "name": "rebalanceStableBorrowRate",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0", "user": "0",
"target": "1" "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "20", "amount": "20",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "user": "1"
@ -186,7 +186,7 @@
{ {
"name": "rebalanceStableBorrowRate", "name": "rebalanceStableBorrowRate",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0", "user": "0",
"target": "1" "target": "1"
}, },

View File

@ -3,12 +3,12 @@
"description": "Test cases for the setUserUseReserveAsCollateral() function.", "description": "Test cases for the setUserUseReserveAsCollateral() function.",
"stories": [ "stories": [
{ {
"description": "User 0 Deposits 1000 LPDAI, disables LPDAI as collateral", "description": "User 0 Deposits 1000 DAI, disables DAI as collateral",
"actions": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -17,7 +17,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -25,7 +25,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -34,7 +34,7 @@
{ {
"name": "setUseAsCollateral", "name": "setUseAsCollateral",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0", "user": "0",
"useAsCollateral": "false" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
@ -83,7 +83,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "400", "amount": "400",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "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": [ "actions": [
{ {
"name": "setUseAsCollateral", "name": "setUseAsCollateral",
@ -108,7 +108,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "400", "amount": "400",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"amount": "10", "amount": "10",
"user": "1" "user": "1"
}, },
@ -147,7 +147,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -155,7 +155,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"amount": "10", "amount": "10",
"user": "1" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"amount": "640", "amount": "640",
"user": "1" "user": "1"
}, },
@ -187,7 +187,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"amount": "640", "amount": "640",
"user": "1" "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": [ "actions": [
{ {
"name": "setUseAsCollateral", "name": "setUseAsCollateral",
"args": { "args": {
"reserve": "LPUNILINKWETH", "reserve": "UNILINKWETH",
"user": "1", "user": "1",
"useAsCollateral": "false" "useAsCollateral": "false"
}, },

View File

@ -8,7 +8,7 @@
{ {
"name": "swapBorrowRateMode", "name": "swapBorrowRateMode",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1", "user": "1",
"borrowRateMode": "variable" "borrowRateMode": "variable"
}, },
@ -23,7 +23,7 @@
{ {
"name": "swapBorrowRateMode", "name": "swapBorrowRateMode",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1", "user": "1",
"borrowRateMode": "stable" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -47,7 +47,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -55,7 +55,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -90,7 +90,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1", "user": "1",
@ -101,7 +101,7 @@
{ {
"name": "swapBorrowRateMode", "name": "swapBorrowRateMode",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1", "user": "1",
"borrowRateMode": "variable" "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "stable", "borrowRateMode": "stable",
"user": "1", "user": "1",
@ -126,7 +126,7 @@
{ {
"name": "swapBorrowRateMode", "name": "swapBorrowRateMode",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1", "user": "1",
"borrowRateMode": "stable" "borrowRateMode": "stable"
}, },
@ -134,9 +134,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 50 LPDAI to cover the interest", "description": "Mint 50 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "50", "amount": "50",
"user": "1" "user": "1"
}, },
@ -145,7 +145,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -153,7 +153,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "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": [ "actions": [
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"borrowRateMode": "variable", "borrowRateMode": "variable",
"user": "1", "user": "1",
@ -180,7 +180,7 @@
{ {
"name": "swapBorrowRateMode", "name": "swapBorrowRateMode",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1", "user": "1",
"borrowRateMode": "stable" "borrowRateMode": "stable"
}, },
@ -188,9 +188,9 @@
}, },
{ {
"name": "mint", "name": "mint",
"description": "Mint 50 LPDAI to cover the interest", "description": "Mint 50 DAI to cover the interest",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "50", "amount": "50",
"user": "1" "user": "1"
}, },
@ -199,7 +199,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -207,7 +207,7 @@
{ {
"name": "repay", "name": "repay",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "1", "user": "1",
"onBehalfOf": "1", "onBehalfOf": "1",

View File

@ -3,12 +3,12 @@
"description": "Redeem function.", "description": "Redeem function.",
"stories": [ "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -17,7 +17,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -25,7 +25,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -35,7 +35,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "0", "amount": "0",
"user": "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1100", "amount": "1100",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
@ -91,7 +91,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"user": "1", "user": "1",
"borrowRateMode": "stable" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
@ -141,7 +141,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"user": "1", "user": "1",
"borrowRateMode": "variable" "borrowRateMode": "variable"

View File

@ -3,12 +3,12 @@
"description": "withdraw function.", "description": "withdraw function.",
"stories": [ "stories": [
{ {
"description": "User 0 Deposits 1000 LPDAI in an empty reserve", "description": "User 0 Deposits 1000 DAI in an empty reserve",
"actions": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -17,7 +17,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -25,7 +25,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "500", "amount": "500",
"user": "0" "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -76,7 +76,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "0" "user": "0"
}, },
"expected": "success" "expected": "success"
@ -84,7 +84,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "0" "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "500", "amount": "500",
"user": "0" "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": [ "actions": [
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "-1", "amount": "-1",
"user": "0" "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -194,7 +194,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -202,7 +202,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -211,7 +211,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -220,7 +220,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "0" "user": "0"
}, },
@ -229,7 +229,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "-1", "amount": "-1",
"user": "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": [ "actions": [
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -252,7 +252,7 @@
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -261,7 +261,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -269,7 +269,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -304,7 +304,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"user": "1", "user": "1",
"borrowRateMode": "stable" "borrowRateMode": "stable"
@ -314,7 +314,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "-1", "amount": "-1",
"user": "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": [ "actions": [
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -337,7 +337,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "1000", "amount": "1000",
"user": "0" "user": "0"
}, },
@ -346,7 +346,7 @@
{ {
"name": "mint", "name": "mint",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "10000", "amount": "10000",
"user": "1" "user": "1"
}, },
@ -355,7 +355,7 @@
{ {
"name": "approve", "name": "approve",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"user": "1" "user": "1"
}, },
"expected": "success" "expected": "success"
@ -363,7 +363,7 @@
{ {
"name": "deposit", "name": "deposit",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "1000", "amount": "1000",
"user": "1" "user": "1"
}, },
@ -398,7 +398,7 @@
{ {
"name": "borrow", "name": "borrow",
"args": { "args": {
"reserve": "LPDAI", "reserve": "DAI",
"amount": "100", "amount": "100",
"user": "1", "user": "1",
"borrowRateMode": "variable" "borrowRateMode": "variable"
@ -408,7 +408,7 @@
{ {
"name": "withdraw", "name": "withdraw",
"args": { "args": {
"reserve": "LPUSDC", "reserve": "USDC",
"amount": "-1", "amount": "-1",
"user": "1" "user": "1"
}, },

View File

@ -1238,9 +1238,9 @@ export const calcExpectedInterestRates = (
const { reservesParams } = configuration; const { reservesParams } = configuration;
// Fixes WETH - LpWETH mock token symbol mismatch // Fixes WETH - LpWETH mock token symbol mismatch
if(reserveSymbol === 'WETH') { // if(reserveSymbol === 'WETH') {
reserveSymbol = 'LpWETH'; // reserveSymbol = 'LpWETH';
} // }
const reserveIndex = Object.keys(reservesParams).findIndex((value) => value === reserveSymbol); const reserveIndex = Object.keys(reservesParams).findIndex((value) => value === reserveSymbol);
const [, reserveConfiguration] = (Object.entries(reservesParams) as [string, IReserveParams][])[ const [, reserveConfiguration] = (Object.entries(reservesParams) as [string, IReserveParams][])[
reserveIndex reserveIndex

View File

@ -29,7 +29,7 @@ makeSuite('Stable debt token tests', (testEnv: TestEnv) => {
const name = await stableDebtContract.name(); 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( await expect(stableDebtContract.burn(deployer.address, '1')).to.be.revertedWith(
CT_CALLER_MUST_BE_LENDING_POOL CT_CALLER_MUST_BE_LENDING_POOL
); );

View File

@ -32,24 +32,24 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => {
dai.address, dai.address,
ZERO_ADDRESS, ZERO_ADDRESS,
ZERO_ADDRESS, ZERO_ADDRESS,
'Aave Interest bearing LpDAI updated', 'Aave AMM Market DAI updated',
'aUniDAI', 'aAmmDAI',
]); ]);
const stableDebtTokenInstance = await deployMockStableDebtToken([ const stableDebtTokenInstance = await deployMockStableDebtToken([
pool.address, pool.address,
dai.address, dai.address,
ZERO_ADDRESS, ZERO_ADDRESS,
'Aave stable debt bearing LpDAI updated', 'Aave AMM Market stable debt DAI updated',
'stableDebtUniDAI', 'stableDebtAmmDAI',
]); ]);
const variableDebtTokenInstance = await deployMockVariableDebtToken([ const variableDebtTokenInstance = await deployMockVariableDebtToken([
pool.address, pool.address,
dai.address, dai.address,
ZERO_ADDRESS, ZERO_ADDRESS,
'Aave variable debt bearing LpDAI updated', 'Aave AMM Market variable debt DAI updated',
'variableDebtUniDAI', 'variableDebtAmmDAI',
]); ]);
newATokenAddress = aTokenInstance.address; newATokenAddress = aTokenInstance.address;
@ -108,7 +108,7 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => {
const tokenName = await aDai.name(); 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 () => { 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(); 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 () => { 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(); 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');
}); });
}); });