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

145 lines
4.6 KiB
TypeScript
Raw Normal View History

2021-02-19 21:44:27 +00:00
import BigNumber from 'bignumber.js';
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(),
},
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,
EmergencyAdmin: {
2021-02-22 09:44:10 +00:00
[ePolygonNetwork.mumbai]: undefined,
[ePolygonNetwork.matic]: undefined,
2021-02-19 21:44:27 +00:00
},
LendingPool: {
[ePolygonNetwork.mumbai]: '',
[ePolygonNetwork.matic]: '0xABdC61Cd16e5111f335f4135B7A0e65Cc7F86327',
},
LendingPoolConfigurator: {
[ePolygonNetwork.mumbai]: '',
[ePolygonNetwork.matic]: '0x17c4A170FFF882862F656597889016D3a6073534',
},
2021-02-19 21:44:27 +00:00
EmergencyAdminIndex: 1,
ProviderRegistry: {
2021-02-22 09:44:10 +00:00
[ePolygonNetwork.mumbai]: '0x569859d41499B4dDC28bfaA43915051FF0A38a6F', // TEMP
[ePolygonNetwork.matic]: '0x28334e4791860a0c1eCF89a62B973ba04a5d643F', // TEMP
2021-02-19 21:44:27 +00:00
},
ProviderRegistryOwner: {
2021-02-22 09:44:10 +00:00
[ePolygonNetwork.mumbai]: '0x18d9bA2baEfBdE0FF137C4ad031427EF205f1Fd9', // TEMP
[ePolygonNetwork.matic]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F', // TEMP
2021-02-19 21:44:27 +00:00
},
LendingRateOracle: {
2021-02-22 09:44:10 +00:00
[ePolygonNetwork.mumbai]: '',
[ePolygonNetwork.matic]: '',
2021-02-19 21:44:27 +00:00
},
LendingPoolCollateralManager: {
2021-02-22 09:44:10 +00:00
[ePolygonNetwork.mumbai]: '',
[ePolygonNetwork.matic]: '0x9Af76e0575D139570D3B4c821567Fe935E8c25C5',
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-02-22 16:51:57 +00:00
WethGateway: {
[ePolygonNetwork.mumbai]: '',
[ePolygonNetwork.matic]: '0x15A46f5073789b7D16F6F46632aE50Bae838d938',
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]: '',
[ePolygonNetwork.matic]: '0x1B38fa90596F2C25bCf1B193A6c6a718349AFDfC',
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-02-20 02:58:52 +00:00
DAI: '0x4746DeC9e833A82EC7C2C1356372CcF2cfcD2F3D',
USDC: '0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7',
USDT: '0x0A6513e40db6EB1b165753AD52E80663aeA50545',
WBTC: '0xc907E116054Ad103354f2D350FD2514433D57F6f',
WETH: '0xF9680D99D6C9589e2a93a78A04A279e509205945',
WMATIC: '0xAB594600376Ec9fD91F8e885dADF0CE036862dE0',
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,
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)
[ePolygonNetwork.matic]: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', // WMATIC address
2021-02-19 21:44:27 +00:00
},
ReserveFactorTreasuryAddress: {
2021-02-22 09:44:10 +00:00
[ePolygonNetwork.mumbai]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c', // TEMP
[ePolygonNetwork.matic]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c', // TEMP
2021-02-19 21:44:27 +00:00
},
};