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

166 lines
5.3 KiB
TypeScript
Raw Normal View History

2021-07-16 08:47:16 +00:00
import BigNumber from 'bignumber.js';
import {
oneEther,
oneRay,
RAY,
ZERO_ADDRESS,
MOCK_CHAINLINK_AGGREGATORS_PRICES,
oneUsd,
2021-07-16 08:47:16 +00:00
} from '../../helpers/constants';
import { ICommonConfiguration, eAvalancheNetwork } from '../../helpers/types';
// ----------------
// PROTOCOL GLOBAL PARAMS
// ----------------
export const CommonsConfig: ICommonConfiguration = {
MarketId: 'Commons',
ATokenNamePrefix: 'Aave Avalanche Market',
StableDebtTokenNamePrefix: 'Aave Avalanche Market stable debt',
VariableDebtTokenNamePrefix: 'Aave Avalanche Market variable debt',
2021-08-27 11:22:07 +00:00
SymbolPrefix: 'v',
2021-07-16 08:47:16 +00:00
ProviderId: 0, // Overriden in index.ts
OracleQuoteCurrency: 'USD',
OracleQuoteUnit: oneUsd.toString(),
2021-07-16 08:47:16 +00:00
ProtocolGlobalParams: {
TokenDistributorPercentageBase: '10000',
MockUsdPriceInWei: '5848466240000000',
UsdAddress: '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96', // TODO: what is this?
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(),
},
AAVE: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
WBTC: {
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
},
2021-08-27 11:22:07 +00:00
WAVAX: {
2021-07-16 08:47:16 +00:00
borrowRate: oneRay.multipliedBy(0.05).toFixed(), // TODO: fix borrowRate?
2021-08-27 11:22:07 +00:00
},
2021-07-16 08:47:16 +00:00
},
// ----------------
// COMMON PROTOCOL ADDRESSES ACROSS POOLS
// ----------------
// If PoolAdmin/emergencyAdmin is set, will take priority over PoolAdminIndex/emergencyAdminIndex
PoolAdmin: {
[eAvalancheNetwork.avalanche]: undefined,
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: undefined,
2021-07-16 08:47:16 +00:00
},
PoolAdminIndex: 0,
EmergencyAdminIndex: 0,
EmergencyAdmin: {
[eAvalancheNetwork.avalanche]: undefined,
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: undefined,
2021-07-16 08:47:16 +00:00
},
ProviderRegistry: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '0x06eC0BDC3997EE32Cb5B66a1B9C11d92e2C27Aab',
2021-07-16 08:47:16 +00:00
},
ProviderRegistryOwner: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '0x1128d177BdaA74Ae68EB06e693f4CbA6BF427a5e',
2021-07-16 08:47:16 +00:00
},
LendingRateOracle: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '0xEbBD998B7Dc2a8E675F0859d907c8Fa6027aBc7b',
2021-07-16 08:47:16 +00:00
},
LendingPoolCollateralManager: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '0x6242bE2fB5591FA1e81a99e6DD55Ff667fa82a71',
2021-07-16 08:47:16 +00:00
},
LendingPoolConfigurator: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '',
2021-07-16 08:47:16 +00:00
},
LendingPool: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '0x5f3968A2E41C95A95329333d44AB989de6c43f8E',
2021-07-16 08:47:16 +00:00
},
WethGateway: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '0x62AF6258d26838f33BADFbb33cf1De8FaB8EB19f',
2021-07-16 08:47:16 +00:00
},
TokenDistributor: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '',
2021-07-16 08:47:16 +00:00
},
AaveOracle: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '0xD217DdD9f0Af84644dEFe84a0b634621D4617a29',
2021-07-16 08:47:16 +00:00
},
FallbackOracle: {
[eAvalancheNetwork.avalanche]: ZERO_ADDRESS,
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: ZERO_ADDRESS,
2021-07-16 08:47:16 +00:00
},
ChainlinkAggregator: {
[eAvalancheNetwork.avalanche]: {
WETH: '0x976B3D034E162d8bD72D6b9C989d545b839003b0',
DAI: '0x51D7180edA2260cc4F6e4EebB82FEF5c3c2B8300',
2021-08-27 11:22:07 +00:00
USDC: '0xF096872672F44d6EBA71458D74fe67F9a77a23B9',
USDT: '0xEBE676ee90Fe1112671f19b6B7459bC678B67e8a',
2021-07-30 12:59:24 +00:00
AAVE: '0x3CA13391E9fb38a75330fb28f8cc2eB3D9ceceED',
WBTC: '0x2779D32d5166BAaa2B2b658333bA7e6Ec0C65743',
2021-08-27 11:22:07 +00:00
WAVAX: '0x0A77230d17318075983913bC2145DB16C7366156',
2021-07-16 08:47:16 +00:00
},
[eAvalancheNetwork.fuji]: {
WETH: '0x86d67c3D38D2bCeE722E601025C25a575021c6EA',
USDT: '0x7898AcCC83587C3C55116c5230C17a6Cd9C71bad',
WBTC: '0x31CF013A08c6Ac228C94551d535d5BAfE19c602a',
2021-08-27 11:22:07 +00:00
WAVAX: '0x5498BB86BC934c8D34FDA08E81D444153d0D06aD',
USD: '0x86d67c3D38D2bCeE722E601025C25a575021c6EA',
2021-07-16 08:47:16 +00:00
},
},
ReserveAssets: {
[eAvalancheNetwork.avalanche]: {},
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: {},
2021-07-16 08:47:16 +00:00
},
ReservesConfig: {},
ATokenDomainSeparator: {
[eAvalancheNetwork.avalanche]: '',
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.fuji]: '',
2021-07-16 08:47:16 +00:00
},
WETH: {
[eAvalancheNetwork.avalanche]: '',
[eAvalancheNetwork.fuji]: '',
2021-07-16 08:47:16 +00:00
},
WrappedNativeToken: {
2021-08-27 11:22:07 +00:00
[eAvalancheNetwork.avalanche]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', // Official WAVAX
[eAvalancheNetwork.fuji]: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c', // Official WAVAX
2021-07-16 08:47:16 +00:00
},
ReserveFactorTreasuryAddress: {
[eAvalancheNetwork.avalanche]: '', // TO BE DEPLOYED
[eAvalancheNetwork.fuji]: '0xB45F5C501A22288dfdb897e5f73E189597e09288', // Self-controlled EOA for testing
2021-07-16 08:47:16 +00:00
},
IncentivesController: {
[eAvalancheNetwork.avalanche]: '0x01D83Fe6A10D2f2B7AF17034343746188272cAc9',
[eAvalancheNetwork.fuji]: '0xa1EF206fb9a8D8186157FC817fCddcC47727ED55',
2021-07-16 08:47:16 +00:00
},
};