2021-02-19 21:44:27 +00:00
|
|
|
import BigNumber from 'bignumber.js';
|
2021-03-11 15:55:04 +00:00
|
|
|
import {
|
|
|
|
oneEther,
|
|
|
|
oneRay,
|
|
|
|
RAY,
|
|
|
|
ZERO_ADDRESS,
|
|
|
|
MOCK_CHAINLINK_AGGREGATORS_PRICES,
|
|
|
|
} from '../../helpers/constants';
|
2021-02-22 09:44:10 +00:00
|
|
|
import { ICommonConfiguration, ePolygonNetwork } from '../../helpers/types';
|
2021-02-19 21:44:27 +00:00
|
|
|
|
|
|
|
// ----------------
|
|
|
|
// PROTOCOL GLOBAL PARAMS
|
|
|
|
// ----------------
|
|
|
|
|
|
|
|
export const CommonsConfig: ICommonConfiguration = {
|
|
|
|
MarketId: 'Commons',
|
2021-02-19 22:38:44 +00:00
|
|
|
ATokenNamePrefix: 'Aave Matic Market',
|
|
|
|
StableDebtTokenNamePrefix: 'Aave Matic Market stable debt',
|
|
|
|
VariableDebtTokenNamePrefix: 'Aave Matic Market variable debt',
|
2021-02-21 23:18:59 +00:00
|
|
|
SymbolPrefix: 'm',
|
2021-02-19 22:38:44 +00:00
|
|
|
ProviderId: 0, // Overriden in index.ts
|
2021-02-19 21:44:27 +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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// TODO: reorg alphabetically, checking the reason of tests failing
|
|
|
|
LendingRateOracleRatesCommon: {
|
|
|
|
WETH: {
|
|
|
|
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
|
|
|
|
},
|
|
|
|
DAI: {
|
|
|
|
borrowRate: oneRay.multipliedBy(0.039).toFixed(),
|
|
|
|
},
|
|
|
|
USDC: {
|
|
|
|
borrowRate: oneRay.multipliedBy(0.039).toFixed(),
|
|
|
|
},
|
|
|
|
USDT: {
|
|
|
|
borrowRate: oneRay.multipliedBy(0.035).toFixed(),
|
|
|
|
},
|
|
|
|
WBTC: {
|
|
|
|
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
|
|
|
|
},
|
2021-02-22 01:05:11 +00:00
|
|
|
WMATIC: {
|
2021-02-19 22:38:44 +00:00
|
|
|
borrowRate: oneRay.multipliedBy(0.05).toFixed(), // TEMP
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
// ----------------
|
|
|
|
// COMMON PROTOCOL ADDRESSES ACROSS POOLS
|
|
|
|
// ----------------
|
|
|
|
|
|
|
|
// If PoolAdmin/emergencyAdmin is set, will take priority over PoolAdminIndex/emergencyAdminIndex
|
|
|
|
PoolAdmin: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: undefined,
|
|
|
|
[ePolygonNetwork.matic]: undefined,
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
PoolAdminIndex: 0,
|
2021-03-15 10:52:57 +00:00
|
|
|
EmergencyAdminIndex: 0,
|
2021-02-19 21:44:27 +00:00
|
|
|
EmergencyAdmin: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: undefined,
|
|
|
|
[ePolygonNetwork.matic]: undefined,
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
2021-02-23 08:26:48 +00:00
|
|
|
LendingPool: {
|
|
|
|
[ePolygonNetwork.mumbai]: '',
|
2021-03-12 17:06:15 +00:00
|
|
|
[ePolygonNetwork.matic]: '',
|
2021-02-23 08:26:48 +00:00
|
|
|
},
|
|
|
|
LendingPoolConfigurator: {
|
|
|
|
[ePolygonNetwork.mumbai]: '',
|
2021-03-12 17:06:15 +00:00
|
|
|
[ePolygonNetwork.matic]: '',
|
2021-02-23 08:26:48 +00:00
|
|
|
},
|
2021-02-19 21:44:27 +00:00
|
|
|
ProviderRegistry: {
|
2021-03-11 15:55:04 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '0x27453A916e91Fb922d309D92e637C0b6625846dF', // TEMP
|
2021-03-26 14:23:01 +00:00
|
|
|
[ePolygonNetwork.matic]: '0xeD03247f4858E60ad682B9865d64eCb46322ECfd',
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
ProviderRegistryOwner: {
|
2021-03-11 15:55:04 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '0xa6842C2C7fece4Cdc6a4aaaD331eb1c7910e419A', // TEMP
|
2021-03-26 14:20:24 +00:00
|
|
|
[ePolygonNetwork.matic]: '0x88505CB63c1679145053c758ebb7b37ac241Bd2C',
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
LendingRateOracle: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '',
|
2021-03-26 14:23:01 +00:00
|
|
|
[ePolygonNetwork.matic]: '0x37Ce325Df9c92A994cC662443Dda6276a4BBBaf1',
|
2021-03-11 15:55:04 +00:00
|
|
|
},
|
2021-02-19 21:44:27 +00:00
|
|
|
LendingPoolCollateralManager: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '',
|
2021-03-12 17:06:15 +00:00
|
|
|
[ePolygonNetwork.matic]: '',
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
TokenDistributor: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '',
|
|
|
|
[ePolygonNetwork.matic]: '',
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
2021-03-11 15:55:04 +00:00
|
|
|
WethGateway: {
|
2021-02-22 16:51:57 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '',
|
2021-03-26 14:23:01 +00:00
|
|
|
[ePolygonNetwork.matic]: '0x8746445fF50469B406C5642763979280AFe3e426',
|
2021-02-22 16:51:57 +00:00
|
|
|
},
|
2021-02-19 21:44:27 +00:00
|
|
|
AaveOracle: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '',
|
2021-03-26 14:23:01 +00:00
|
|
|
[ePolygonNetwork.matic]: '0xA50B0505e31a2d2B47bf521e333BddE7870416FE',
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
FallbackOracle: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: ZERO_ADDRESS,
|
|
|
|
[ePolygonNetwork.matic]: ZERO_ADDRESS,
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
ChainlinkAggregator: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.matic]: {
|
2021-03-22 12:20:43 +00:00
|
|
|
AAVE: '0xbE23a3AA13038CfC28aFd0ECe4FdE379fE7fBfc4',
|
|
|
|
DAI: '0xFC539A559e170f848323e19dfD66007520510085',
|
|
|
|
USDC: '0xefb7e6be8356cCc6827799B6A7348eE674A80EaE',
|
2021-03-26 11:56:05 +00:00
|
|
|
USDT: '0xf9d5AAC6E5572AEFa6bd64108ff86a222F69B64d',
|
2021-03-22 12:20:43 +00:00
|
|
|
WBTC: '0xA338e0492B2F944E9F8C0653D3AD1484f2657a37',
|
|
|
|
WMATIC: '0x327e23A4855b6F663a28c5161541d69Af8973302',
|
2021-02-20 02:58:52 +00:00
|
|
|
},
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: {
|
2021-02-20 02:58:52 +00:00
|
|
|
DAI: ZERO_ADDRESS,
|
|
|
|
USDC: ZERO_ADDRESS,
|
|
|
|
USDT: ZERO_ADDRESS,
|
|
|
|
WBTC: ZERO_ADDRESS,
|
2021-02-22 01:05:11 +00:00
|
|
|
WMATIC: ZERO_ADDRESS,
|
2021-02-20 02:58:52 +00:00
|
|
|
},
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
ReserveAssets: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.matic]: {},
|
|
|
|
[ePolygonNetwork.mumbai]: {},
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
ReservesConfig: {},
|
|
|
|
ATokenDomainSeparator: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '',
|
|
|
|
[ePolygonNetwork.matic]: '',
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
WETH: {
|
2021-02-22 09:44:10 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889', // WMATIC address (untested)
|
2021-03-11 15:55:04 +00:00
|
|
|
[ePolygonNetwork.matic]: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', // WMATIC address
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
|
|
|
ReserveFactorTreasuryAddress: {
|
2021-03-11 15:55:04 +00:00
|
|
|
[ePolygonNetwork.mumbai]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c', // TEMP
|
2021-03-12 15:28:05 +00:00
|
|
|
[ePolygonNetwork.matic]: '0x7734280A4337F37Fbf4651073Db7c28C80B339e9',
|
2021-02-19 21:44:27 +00:00
|
|
|
},
|
2021-03-26 14:20:24 +00:00
|
|
|
IncentivesController: {
|
|
|
|
[ePolygonNetwork.mumbai]: ZERO_ADDRESS,
|
|
|
|
[ePolygonNetwork.matic]: '0x357D51124f59836DeD84c8a1730D72B749d8BC23',
|
|
|
|
},
|
2021-02-19 21:44:27 +00:00
|
|
|
};
|