aave-protocol-v2/markets/aave/commons.ts

373 lines
15 KiB
TypeScript
Raw Normal View History

import {
oneRay,
ZERO_ADDRESS,
MOCK_CHAINLINK_AGGREGATORS_PRICES,
oneEther,
} from '../../helpers/constants';
2021-02-22 09:44:10 +00:00
import { ICommonConfiguration, eEthereumNetwork } from '../../helpers/types';
2020-08-24 14:18:10 +00:00
// ----------------
// PROTOCOL GLOBAL PARAMS
// ----------------
export const CommonsConfig: ICommonConfiguration = {
2020-11-26 15:11:40 +00:00
MarketId: 'Commons',
2021-02-19 20:50:06 +00:00
ATokenNamePrefix: 'Aave interest bearing',
StableDebtTokenNamePrefix: 'Aave stable debt bearing',
VariableDebtTokenNamePrefix: 'Aave variable debt bearing',
SymbolPrefix: '',
2021-02-19 22:38:44 +00:00
ProviderId: 0, // Overriden in index.ts
OracleQuoteCurrency: 'ETH',
OracleQuoteUnit: oneEther.toString(),
2020-08-24 14:18:10 +00:00
ProtocolGlobalParams: {
TokenDistributorPercentageBase: '10000',
MockUsdPriceInWei: '5848466240000000',
UsdAddress: '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96',
NilAddress: '0x0000000000000000000000000000000000000000',
OneAddress: '0x0000000000000000000000000000000000000001',
AaveReferral: '0',
},
// ----------------
// COMMON PROTOCOL PARAMS ACROSS POOLS AND NETWORKS
// ----------------
Mocks: {
AllAssetsInitialPrices: {
...MOCK_CHAINLINK_AGGREGATORS_PRICES,
},
},
2020-11-09 09:05:03 +00:00
// TODO: reorg alphabetically, checking the reason of tests failing
2020-08-24 14:18:10 +00:00
LendingRateOracleRatesCommon: {
WETH: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
DAI: {
borrowRate: oneRay.multipliedBy(0.039).toFixed(),
},
TUSD: {
borrowRate: oneRay.multipliedBy(0.035).toFixed(),
},
USDC: {
borrowRate: oneRay.multipliedBy(0.039).toFixed(),
},
SUSD: {
borrowRate: oneRay.multipliedBy(0.035).toFixed(),
},
USDT: {
borrowRate: oneRay.multipliedBy(0.035).toFixed(),
},
BAT: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
AAVE: {
2020-08-24 14:18:10 +00:00
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
LINK: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
KNC: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
MKR: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
MANA: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
WBTC: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
ZRX: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
SNX: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
2020-11-04 10:47:06 +00:00
YFI: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
REN: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
UNI: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
ENJ: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
2020-08-24 14:18:10 +00:00
BUSD: {
borrowRate: oneRay.multipliedBy(0.05).toFixed(),
},
},
// ----------------
// COMMON PROTOCOL ADDRESSES ACROSS POOLS
// ----------------
2020-11-05 11:35:50 +00:00
// If PoolAdmin/emergencyAdmin is set, will take priority over PoolAdminIndex/emergencyAdminIndex
PoolAdmin: {
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: undefined,
[eEthereumNetwork.buidlerevm]: undefined,
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.coverage]: undefined,
[eEthereumNetwork.hardhat]: undefined,
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.kovan]: undefined,
[eEthereumNetwork.ropsten]: undefined,
[eEthereumNetwork.main]: undefined,
[eEthereumNetwork.tenderly]: undefined,
2020-08-26 10:38:52 +00:00
},
2020-11-05 11:35:50 +00:00
PoolAdminIndex: 0,
EmergencyAdmin: {
2020-11-05 15:15:52 +00:00
[eEthereumNetwork.hardhat]: undefined,
2020-11-05 11:35:50 +00:00
[eEthereumNetwork.coverage]: undefined,
[eEthereumNetwork.buidlerevm]: undefined,
[eEthereumNetwork.kovan]: undefined,
[eEthereumNetwork.ropsten]: undefined,
[eEthereumNetwork.main]: undefined,
[eEthereumNetwork.tenderly]: undefined,
2020-11-05 11:35:50 +00:00
},
EmergencyAdminIndex: 1,
2020-08-24 14:18:10 +00:00
ProviderRegistry: {
[eEthereumNetwork.kovan]: '0x1E40B561EC587036f9789aF83236f057D1ed2A90',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: '',
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: '',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.tenderly]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
},
ProviderRegistryOwner: {
[eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
[eEthereumNetwork.coverage]: '',
[eEthereumNetwork.hardhat]: '',
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.tenderly]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
2020-08-24 14:18:10 +00:00
},
LendingRateOracle: {
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: '',
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: '',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.kovan]: '', //'0xdCde9Bb6a49e37fA433990832AB541AE2d4FEB4a',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.ropsten]: '0x05dcca805a6562c1bdd0423768754acb6993241b',
[eEthereumNetwork.main]: '', //'0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
[eEthereumNetwork.tenderly]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
},
LendingPoolCollateralManager: {
[eEthereumNetwork.coverage]: '',
[eEthereumNetwork.hardhat]: '',
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.kovan]: '0x9269b6453d0d75370c4c85e5a42977a53efdb72a',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
[eEthereumNetwork.tenderly]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
2020-08-24 14:18:10 +00:00
},
LendingPoolConfigurator: {
[eEthereumNetwork.coverage]: '',
[eEthereumNetwork.hardhat]: '',
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.kovan]: '',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '',
[eEthereumNetwork.tenderly]: '',
},
LendingPool: {
[eEthereumNetwork.coverage]: '',
[eEthereumNetwork.hardhat]: '',
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.kovan]: '',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '',
[eEthereumNetwork.tenderly]: '',
},
WethGateway: {
[eEthereumNetwork.coverage]: '',
[eEthereumNetwork.hardhat]: '',
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.kovan]: '',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '',
[eEthereumNetwork.tenderly]: '',
},
2020-08-24 14:18:10 +00:00
TokenDistributor: {
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: '',
[eEthereumNetwork.buidlerevm]: '',
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: '',
2021-02-22 09:44:10 +00:00
[eEthereumNetwork.kovan]: '0x971efe90088f21dc6a36f610ffed77fc19710708',
[eEthereumNetwork.ropsten]: '0xeba2ea67942b8250d870b12750b594696d02fc9c',
[eEthereumNetwork.main]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
[eEthereumNetwork.tenderly]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
2020-08-24 14:18:10 +00:00
},
AaveOracle: {
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: '',
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: '',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.buidlerevm]: '',
[eEthereumNetwork.kovan]: '', //'0xB8bE51E6563BB312Cbb2aa26e352516c25c26ac1',
2021-02-22 09:44:10 +00:00
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
[eEthereumNetwork.main]: '', //'0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
[eEthereumNetwork.tenderly]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
2020-08-24 14:18:10 +00:00
},
FallbackOracle: {
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: '',
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: '',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.buidlerevm]: '',
2021-02-22 09:44:10 +00:00
[eEthereumNetwork.kovan]: '0x50913E8E1c650E790F8a1E741FF9B1B1bB251dfe',
[eEthereumNetwork.ropsten]: '0xAD1a978cdbb8175b2eaeC47B01404f8AEC5f4F0d',
[eEthereumNetwork.main]: ZERO_ADDRESS,
[eEthereumNetwork.tenderly]: ZERO_ADDRESS,
2020-08-24 14:18:10 +00:00
},
ChainlinkAggregator: {
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: {},
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: {},
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.buidlerevm]: {},
2021-02-22 09:44:10 +00:00
[eEthereumNetwork.kovan]: {
AAVE: '0xd04647B7CB523bb9f26730E9B6dE1174db7591Ad',
BAT: '0x0e4fcEC26c9f85c3D714370c98f43C4E02Fc35Ae',
BUSD: '0xbF7A18ea5DE0501f7559144e702b29c55b055CcB',
DAI: '0x22B58f1EbEDfCA50feF632bD73368b2FdA96D541',
ENJ: '0xfaDbe2ee798889F02d1d39eDaD98Eff4c7fe95D4',
KNC: '0xb8E8130d244CFd13a75D6B9Aee029B1C33c808A7',
LINK: '0x3Af8C569ab77af5230596Acf0E8c2F9351d24C38',
MANA: '0x1b93D8E109cfeDcBb3Cc74eD761DE286d5771511',
MKR: '0x0B156192e04bAD92B6C1C13cf8739d14D78D5701',
2020-11-05 14:54:45 +00:00
REN: '0xF1939BECE7708382b5fb5e559f630CB8B39a10ee',
SNX: '0xF9A76ae7a1075Fe7d646b06fF05Bd48b9FA5582e',
SUSD: '0xb343e7a1aF578FA35632435243D814e7497622f7',
TUSD: '0x7aeCF1c19661d12E962b69eBC8f6b2E63a55C660',
2020-11-05 14:54:45 +00:00
UNI: '0x17756515f112429471F86f98D5052aCB6C47f6ee',
USDC: '0x64EaC61A2DFda2c3Fa04eED49AA33D021AeC8838',
USDT: '0x0bF499444525a23E7Bb61997539725cA2e928138',
WBTC: '0xF7904a295A029a3aBDFFB6F12755974a958C7C25',
YFI: '0xC5d1B1DEb2992738C0273408ac43e1e906086B6C',
ZRX: '0xBc3f28Ccc21E9b5856E81E6372aFf57307E2E883',
USD: '0x9326BFA02ADD2366b30bacB125260Af641031331',
2020-08-24 14:18:10 +00:00
},
2021-02-22 09:44:10 +00:00
[eEthereumNetwork.ropsten]: {
2020-11-09 09:05:03 +00:00
AAVE: ZERO_ADDRESS,
BAT: '0xafd8186c962daf599f171b8600f3e19af7b52c92',
BUSD: '0x0A32D96Ff131cd5c3E0E5AAB645BF009Eda61564',
2020-08-24 14:18:10 +00:00
DAI: '0x64b8e49baded7bfb2fd5a9235b2440c0ee02971b',
2020-11-09 09:05:03 +00:00
ENJ: ZERO_ADDRESS,
KNC: '0x19d97ceb36624a31d827032d8216dd2eb15e9845',
LINK: '0xb8c99b98913bE2ca4899CdcaF33a3e519C20EeEc',
MANA: '0xDab909dedB72573c626481fC98CEE1152b81DEC2',
MKR: '0x811B1f727F8F4aE899774B568d2e72916D91F392',
REN: ZERO_ADDRESS,
SNX: '0xA95674a8Ed9aa9D2E445eb0024a9aa05ab44f6bf',
SUSD: '0xe054b4aee7ac7645642dd52f1c892ff0128c98f0',
2020-08-24 14:18:10 +00:00
TUSD: '0x523ac85618df56e940534443125ef16daf785620',
2020-11-09 09:05:03 +00:00
UNI: ZERO_ADDRESS,
2020-08-24 14:18:10 +00:00
USDC: '0xe1480303dde539e2c241bdc527649f37c9cbef7d',
USDT: '0xc08fe0c4d97ccda6b40649c6da621761b628c288',
WBTC: '0x5b8B87A0abA4be247e660B0e0143bB30Cdf566AF',
2020-11-04 10:47:06 +00:00
YFI: ZERO_ADDRESS,
2020-11-09 09:05:03 +00:00
ZRX: '0x1d0052e4ae5b4ae4563cbac50edc3627ca0460d7',
USD: '0x8468b2bDCE073A157E560AA4D9CcF6dB1DB98507',
2020-08-24 14:18:10 +00:00
},
2021-02-22 09:44:10 +00:00
[eEthereumNetwork.main]: {
AAVE: '0x6Df09E975c830ECae5bd4eD9d90f3A95a4f88012',
BAT: '0x0d16d4528239e9ee52fa531af613AcdB23D88c94',
BUSD: '0x614715d2Af89E6EC99A233818275142cE88d1Cfd',
DAI: '0x773616E4d11A78F511299002da57A0a94577F1f4',
ENJ: '0x24D9aB51950F3d62E9144fdC2f3135DAA6Ce8D1B',
KNC: '0x656c0544eF4C98A6a98491833A89204Abb045d6b',
LINK: '0xDC530D9457755926550b59e8ECcdaE7624181557',
MANA: '0x82A44D92D6c329826dc557c5E1Be6ebeC5D5FeB9',
MKR: '0x24551a8Fb2A7211A25a17B1481f043A8a8adC7f2',
REN: '0x3147D7203354Dc06D9fd350c7a2437bcA92387a4',
SNX: '0x79291A9d692Df95334B1a0B3B4AE6bC606782f8c',
SUSD: '0x8e0b7e6062272B5eF4524250bFFF8e5Bd3497757',
TUSD: '0x3886BA987236181D98F2401c507Fb8BeA7871dF2',
UNI: '0xD6aA3D25116d8dA79Ea0246c4826EB951872e02e',
USDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4',
USDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46',
WBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8',
YFI: '0x7c5d4F8345e66f68099581Db340cd65B078C41f4',
ZRX: '0x2Da4983a622a8498bb1a21FaE9D8F6C664939962',
USD: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419',
xSUSHI: '0x9b26214bEC078E68a394AaEbfbffF406Ce14893F',
},
[eEthereumNetwork.tenderly]: {
AAVE: '0x6Df09E975c830ECae5bd4eD9d90f3A95a4f88012',
BAT: '0x0d16d4528239e9ee52fa531af613AcdB23D88c94',
BUSD: '0x614715d2Af89E6EC99A233818275142cE88d1Cfd',
DAI: '0x773616E4d11A78F511299002da57A0a94577F1f4',
ENJ: '0x24D9aB51950F3d62E9144fdC2f3135DAA6Ce8D1B',
KNC: '0x656c0544eF4C98A6a98491833A89204Abb045d6b',
LINK: '0xDC530D9457755926550b59e8ECcdaE7624181557',
MANA: '0x82A44D92D6c329826dc557c5E1Be6ebeC5D5FeB9',
MKR: '0x24551a8Fb2A7211A25a17B1481f043A8a8adC7f2',
2020-11-04 10:47:06 +00:00
REN: '0x3147D7203354Dc06D9fd350c7a2437bcA92387a4',
SNX: '0x79291A9d692Df95334B1a0B3B4AE6bC606782f8c',
SUSD: '0x8e0b7e6062272B5eF4524250bFFF8e5Bd3497757',
TUSD: '0x3886BA987236181D98F2401c507Fb8BeA7871dF2',
2020-11-04 10:47:06 +00:00
UNI: '0xD6aA3D25116d8dA79Ea0246c4826EB951872e02e',
USDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4',
USDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46',
WBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8',
2020-11-09 09:05:03 +00:00
YFI: '0x7c5d4F8345e66f68099581Db340cd65B078C41f4',
ZRX: '0x2Da4983a622a8498bb1a21FaE9D8F6C664939962',
USD: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419',
xSUSHI: '0x9b26214bEC078E68a394AaEbfbffF406Ce14893F',
2020-08-24 14:18:10 +00:00
},
},
ReserveAssets: {
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.coverage]: {},
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: {},
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.buidlerevm]: {},
2021-02-22 09:44:10 +00:00
[eEthereumNetwork.main]: {},
[eEthereumNetwork.kovan]: {},
[eEthereumNetwork.ropsten]: {},
[eEthereumNetwork.tenderly]: {},
},
ReservesConfig: {},
2020-09-15 15:24:50 +00:00
ATokenDomainSeparator: {
[eEthereumNetwork.coverage]:
'0x95b73a72c6ecf4ccbbba5178800023260bad8e75cdccdb8e4827a2977a37c820',
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]:
'0xbae024d959c6a022dc5ed37294cd39c141034b2ae5f02a955cce75c930a81bf5',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.buidlerevm]:
'0xbae024d959c6a022dc5ed37294cd39c141034b2ae5f02a955cce75c930a81bf5',
2020-09-15 15:24:50 +00:00
[eEthereumNetwork.kovan]: '',
[eEthereumNetwork.ropsten]: '',
[eEthereumNetwork.main]: '',
[eEthereumNetwork.tenderly]: '',
2020-09-15 15:24:50 +00:00
},
WETH: {
[eEthereumNetwork.coverage]: '', // deployed in local evm
2020-11-05 11:18:20 +00:00
[eEthereumNetwork.hardhat]: '', // deployed in local evm
[eEthereumNetwork.buidlerevm]: '', // deployed in local evm
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
},
WrappedNativeToken: {
[eEthereumNetwork.coverage]: '', // deployed in local evm
[eEthereumNetwork.hardhat]: '', // deployed in local evm
[eEthereumNetwork.buidlerevm]: '', // deployed in local evm
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
},
ReserveFactorTreasuryAddress: {
2020-11-27 15:40:00 +00:00
[eEthereumNetwork.coverage]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
[eEthereumNetwork.hardhat]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
2020-11-27 15:40:00 +00:00
[eEthereumNetwork.buidlerevm]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
[eEthereumNetwork.kovan]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
[eEthereumNetwork.ropsten]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
[eEthereumNetwork.main]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
[eEthereumNetwork.tenderly]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
},
IncentivesController: {
[eEthereumNetwork.coverage]: ZERO_ADDRESS,
[eEthereumNetwork.hardhat]: ZERO_ADDRESS,
[eEthereumNetwork.buidlerevm]: ZERO_ADDRESS,
[eEthereumNetwork.kovan]: ZERO_ADDRESS,
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
[eEthereumNetwork.main]: ZERO_ADDRESS,
[eEthereumNetwork.tenderly]: ZERO_ADDRESS,
},
2020-08-24 14:18:10 +00:00
};