mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
config: revised risk config
This commit is contained in:
parent
2d3bcf29f9
commit
984e19cdf3
|
@ -31,7 +31,8 @@ export const MOCK_USD_PRICE_IN_WEI = '5848466240000000';
|
||||||
export const USD_ADDRESS = '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96';
|
export const USD_ADDRESS = '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96';
|
||||||
export const AAVE_REFERRAL = '0';
|
export const AAVE_REFERRAL = '0';
|
||||||
|
|
||||||
export const MOCK_CHAINLINK_AGGREGATORS_PRICES = { // Update to USD-based price feeds
|
export const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
||||||
|
// Update to USD-based price feeds
|
||||||
AAVE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
AAVE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||||
BAT: oneEther.multipliedBy('0.00137893825230').toFixed(),
|
BAT: oneEther.multipliedBy('0.00137893825230').toFixed(),
|
||||||
BUSD: oneEther.multipliedBy('0.00736484').toFixed(),
|
BUSD: oneEther.multipliedBy('0.00736484').toFixed(),
|
||||||
|
@ -71,6 +72,6 @@ export const MOCK_CHAINLINK_AGGREGATORS_PRICES = { // Update to USD-based price
|
||||||
WMATIC: oneEther.multipliedBy('0.003620948469').toFixed(),
|
WMATIC: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||||
STAKE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
STAKE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||||
xSUSHI: oneEther.multipliedBy('0.00913428586').toFixed(),
|
xSUSHI: oneEther.multipliedBy('0.00913428586').toFixed(),
|
||||||
AVAX: oneEther.multipliedBy('0.006051936629').toFixed(),
|
WAVAX: oneEther.multipliedBy('0.006051936629').toFixed(),
|
||||||
USD: '5848466240000000',
|
USD: '5848466240000000',
|
||||||
};
|
};
|
||||||
|
|
|
@ -247,7 +247,7 @@ export interface iAssetBase<T> {
|
||||||
WMATIC: T;
|
WMATIC: T;
|
||||||
STAKE: T;
|
STAKE: T;
|
||||||
xSUSHI: T;
|
xSUSHI: T;
|
||||||
AVAX: T;
|
WAVAX: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type iAssetsWithoutETH<T> = Omit<iAssetBase<T>, 'ETH'>;
|
export type iAssetsWithoutETH<T> = Omit<iAssetBase<T>, 'ETH'>;
|
||||||
|
@ -316,7 +316,7 @@ export type iXDAIPoolAssets<T> = Pick<
|
||||||
|
|
||||||
export type iAvalanchePoolAssets<T> = Pick<
|
export type iAvalanchePoolAssets<T> = Pick<
|
||||||
iAssetsWithoutUSD<T>,
|
iAssetsWithoutUSD<T>,
|
||||||
'WETH' | 'DAI' | 'USDC' | 'USDT' | 'AAVE' | 'WBTC' | 'AVAX'
|
'WETH' | 'DAI' | 'USDT' | 'AAVE' | 'WBTC' | 'WAVAX' | 'USDC'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
export type iMultiPoolsAssets<T> = iAssetCommon<T> | iAavePoolAssets<T>;
|
export type iMultiPoolsAssets<T> = iAssetCommon<T> | iAavePoolAssets<T>;
|
||||||
|
@ -366,7 +366,7 @@ export enum TokenContractId {
|
||||||
WMATIC = 'WMATIC',
|
WMATIC = 'WMATIC',
|
||||||
STAKE = 'STAKE',
|
STAKE = 'STAKE',
|
||||||
xSUSHI = 'xSUSHI',
|
xSUSHI = 'xSUSHI',
|
||||||
AVAX = 'AVAX',
|
WAVAX = 'WAVAX',
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {
|
export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
||||||
ATokenNamePrefix: 'Aave Avalanche Market',
|
ATokenNamePrefix: 'Aave Avalanche Market',
|
||||||
StableDebtTokenNamePrefix: 'Aave Avalanche Market stable debt',
|
StableDebtTokenNamePrefix: 'Aave Avalanche Market stable debt',
|
||||||
VariableDebtTokenNamePrefix: 'Aave Avalanche Market variable debt',
|
VariableDebtTokenNamePrefix: 'Aave Avalanche Market variable debt',
|
||||||
SymbolPrefix: 'ava',
|
SymbolPrefix: 'v',
|
||||||
ProviderId: 0, // Overriden in index.ts
|
ProviderId: 0, // Overriden in index.ts
|
||||||
OracleQuoteCurrency: 'USD',
|
OracleQuoteCurrency: 'USD',
|
||||||
OracleQuoteUnit: oneUsd.toString(),
|
OracleQuoteUnit: oneUsd.toString(),
|
||||||
|
@ -60,9 +60,9 @@ export const CommonsConfig: ICommonConfiguration = {
|
||||||
WBTC: {
|
WBTC: {
|
||||||
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
|
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
|
||||||
},
|
},
|
||||||
AVAX: {
|
WAVAX: {
|
||||||
borrowRate: oneRay.multipliedBy(0.05).toFixed(), // TODO: fix borrowRate?
|
borrowRate: oneRay.multipliedBy(0.05).toFixed(), // TODO: fix borrowRate?
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// ----------------
|
// ----------------
|
||||||
// COMMON PROTOCOL ADDRESSES ACROSS POOLS
|
// COMMON PROTOCOL ADDRESSES ACROSS POOLS
|
||||||
|
@ -71,98 +71,95 @@ export const CommonsConfig: ICommonConfiguration = {
|
||||||
// If PoolAdmin/emergencyAdmin is set, will take priority over PoolAdminIndex/emergencyAdminIndex
|
// If PoolAdmin/emergencyAdmin is set, will take priority over PoolAdminIndex/emergencyAdminIndex
|
||||||
PoolAdmin: {
|
PoolAdmin: {
|
||||||
[eAvalancheNetwork.avalanche]: undefined,
|
[eAvalancheNetwork.avalanche]: undefined,
|
||||||
[eAvalancheNetwork.fuji]: undefined
|
[eAvalancheNetwork.fuji]: undefined,
|
||||||
},
|
},
|
||||||
PoolAdminIndex: 0,
|
PoolAdminIndex: 0,
|
||||||
EmergencyAdminIndex: 0,
|
EmergencyAdminIndex: 0,
|
||||||
EmergencyAdmin: {
|
EmergencyAdmin: {
|
||||||
[eAvalancheNetwork.avalanche]: undefined,
|
[eAvalancheNetwork.avalanche]: undefined,
|
||||||
[eAvalancheNetwork.fuji]: undefined
|
[eAvalancheNetwork.fuji]: undefined,
|
||||||
},
|
},
|
||||||
ProviderRegistry: {
|
ProviderRegistry: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0x06eC0BDC3997EE32Cb5B66a1B9C11d92e2C27Aab'
|
[eAvalancheNetwork.fuji]: '0x06eC0BDC3997EE32Cb5B66a1B9C11d92e2C27Aab',
|
||||||
},
|
},
|
||||||
ProviderRegistryOwner: {
|
ProviderRegistryOwner: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0x1128d177BdaA74Ae68EB06e693f4CbA6BF427a5e'
|
[eAvalancheNetwork.fuji]: '0x1128d177BdaA74Ae68EB06e693f4CbA6BF427a5e',
|
||||||
},
|
},
|
||||||
LendingRateOracle: {
|
LendingRateOracle: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0xEbBD998B7Dc2a8E675F0859d907c8Fa6027aBc7b'
|
[eAvalancheNetwork.fuji]: '0xEbBD998B7Dc2a8E675F0859d907c8Fa6027aBc7b',
|
||||||
},
|
},
|
||||||
LendingPoolCollateralManager: {
|
LendingPoolCollateralManager: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0x6242bE2fB5591FA1e81a99e6DD55Ff667fa82a71'
|
[eAvalancheNetwork.fuji]: '0x6242bE2fB5591FA1e81a99e6DD55Ff667fa82a71',
|
||||||
},
|
},
|
||||||
LendingPoolConfigurator: {
|
LendingPoolConfigurator: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: ''
|
[eAvalancheNetwork.fuji]: '',
|
||||||
},
|
},
|
||||||
LendingPool: {
|
LendingPool: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0x5f3968A2E41C95A95329333d44AB989de6c43f8E'
|
[eAvalancheNetwork.fuji]: '0x5f3968A2E41C95A95329333d44AB989de6c43f8E',
|
||||||
},
|
},
|
||||||
WethGateway: {
|
WethGateway: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0x62AF6258d26838f33BADFbb33cf1De8FaB8EB19f'
|
[eAvalancheNetwork.fuji]: '0x62AF6258d26838f33BADFbb33cf1De8FaB8EB19f',
|
||||||
},
|
},
|
||||||
TokenDistributor: {
|
TokenDistributor: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: ''
|
[eAvalancheNetwork.fuji]: '',
|
||||||
},
|
},
|
||||||
AaveOracle: {
|
AaveOracle: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: '0xD217DdD9f0Af84644dEFe84a0b634621D4617a29'
|
[eAvalancheNetwork.fuji]: '0xD217DdD9f0Af84644dEFe84a0b634621D4617a29',
|
||||||
},
|
},
|
||||||
FallbackOracle: {
|
FallbackOracle: {
|
||||||
[eAvalancheNetwork.avalanche]: ZERO_ADDRESS,
|
[eAvalancheNetwork.avalanche]: ZERO_ADDRESS,
|
||||||
[eAvalancheNetwork.fuji]: ZERO_ADDRESS
|
[eAvalancheNetwork.fuji]: ZERO_ADDRESS,
|
||||||
},
|
},
|
||||||
ChainlinkAggregator: {
|
ChainlinkAggregator: {
|
||||||
[eAvalancheNetwork.avalanche]: {
|
[eAvalancheNetwork.avalanche]: {
|
||||||
WETH: '0x976B3D034E162d8bD72D6b9C989d545b839003b0',
|
WETH: '0x976B3D034E162d8bD72D6b9C989d545b839003b0',
|
||||||
DAI: '0x51D7180edA2260cc4F6e4EebB82FEF5c3c2B8300',
|
DAI: '0x51D7180edA2260cc4F6e4EebB82FEF5c3c2B8300',
|
||||||
USDC: ' 0xF096872672F44d6EBA71458D74fe67F9a77a23B9',
|
USDC: '0xF096872672F44d6EBA71458D74fe67F9a77a23B9',
|
||||||
USDT: '0xEBE676ee90Fe1112671f19b6B7459bC678B67e8a',
|
USDT: '0xEBE676ee90Fe1112671f19b6B7459bC678B67e8a',
|
||||||
AAVE: '0x3CA13391E9fb38a75330fb28f8cc2eB3D9ceceED',
|
AAVE: '0x3CA13391E9fb38a75330fb28f8cc2eB3D9ceceED',
|
||||||
WBTC: '0x2779D32d5166BAaa2B2b658333bA7e6Ec0C65743',
|
WBTC: '0x2779D32d5166BAaa2B2b658333bA7e6Ec0C65743',
|
||||||
AVAX: '0x0A77230d17318075983913bC2145DB16C7366156',
|
WAVAX: '0x0A77230d17318075983913bC2145DB16C7366156',
|
||||||
},
|
},
|
||||||
[eAvalancheNetwork.fuji]: {
|
[eAvalancheNetwork.fuji]: {
|
||||||
WETH: '0x86d67c3D38D2bCeE722E601025C25a575021c6EA',
|
WETH: '0x86d67c3D38D2bCeE722E601025C25a575021c6EA',
|
||||||
// DAI: '',
|
|
||||||
// USDC: '',
|
|
||||||
USDT: '0x7898AcCC83587C3C55116c5230C17a6Cd9C71bad',
|
USDT: '0x7898AcCC83587C3C55116c5230C17a6Cd9C71bad',
|
||||||
// AAVE: '',
|
|
||||||
WBTC: '0x31CF013A08c6Ac228C94551d535d5BAfE19c602a',
|
WBTC: '0x31CF013A08c6Ac228C94551d535d5BAfE19c602a',
|
||||||
AVAX: '0x5498BB86BC934c8D34FDA08E81D444153d0D06aD',
|
WAVAX: '0x5498BB86BC934c8D34FDA08E81D444153d0D06aD',
|
||||||
USD: '0x86d67c3D38D2bCeE722E601025C25a575021c6EA'
|
USD: '0x86d67c3D38D2bCeE722E601025C25a575021c6EA',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ReserveAssets: {
|
ReserveAssets: {
|
||||||
[eAvalancheNetwork.avalanche]: {},
|
[eAvalancheNetwork.avalanche]: {},
|
||||||
[eAvalancheNetwork.fuji]: {}
|
[eAvalancheNetwork.fuji]: {},
|
||||||
},
|
},
|
||||||
ReservesConfig: {},
|
ReservesConfig: {},
|
||||||
ATokenDomainSeparator: {
|
ATokenDomainSeparator: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '',
|
||||||
[eAvalancheNetwork.fuji]: ''
|
[eAvalancheNetwork.fuji]: '',
|
||||||
},
|
},
|
||||||
WETH: {
|
WETH: {
|
||||||
[eAvalancheNetwork.avalanche]: '0xf20d962a6c8f70c731bd838a3a388D7d48fA6e15', // WETH Address
|
[eAvalancheNetwork.avalanche]: '0xf20d962a6c8f70c731bd838a3a388D7d48fA6e15', // WETH Address
|
||||||
[eAvalancheNetwork.fuji]: '0x3b8b3fc85ccA720809Af2dA4B58cF4ce84bcbdd0' // MintableERC20 WETH
|
[eAvalancheNetwork.fuji]: '0x3b8b3fc85ccA720809Af2dA4B58cF4ce84bcbdd0', // MintableERC20 WETH
|
||||||
},
|
},
|
||||||
WrappedNativeToken: {
|
WrappedNativeToken: {
|
||||||
[eAvalancheNetwork.avalanche]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', // Official WAVAX
|
[eAvalancheNetwork.avalanche]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', // Official WAVAX
|
||||||
[eAvalancheNetwork.fuji]: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c' // Official WAVAX
|
[eAvalancheNetwork.fuji]: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c', // Official WAVAX
|
||||||
},
|
},
|
||||||
ReserveFactorTreasuryAddress: {
|
ReserveFactorTreasuryAddress: {
|
||||||
[eAvalancheNetwork.avalanche]: '',
|
[eAvalancheNetwork.avalanche]: '0xBDEE917d2BDE529eDEc5b20e0B770F56EDFE8e74', // Not Final, only for test purposes
|
||||||
[eAvalancheNetwork.fuji]: '0xB45F5C501A22288dfdb897e5f73E189597e09288' // Self-controlled EOA
|
[eAvalancheNetwork.fuji]: '0xB45F5C501A22288dfdb897e5f73E189597e09288', // Self-controlled EOA
|
||||||
},
|
},
|
||||||
IncentivesController: {
|
IncentivesController: {
|
||||||
[eAvalancheNetwork.avalanche]: ZERO_ADDRESS,
|
[eAvalancheNetwork.avalanche]: ZERO_ADDRESS, // Not final, no incentives proxy for test purposes
|
||||||
[eAvalancheNetwork.fuji]: '0xa1EF206fb9a8D8186157FC817fCddcC47727ED55' // AVAX Incentives Controller
|
[eAvalancheNetwork.fuji]: '0xa1EF206fb9a8D8186157FC817fCddcC47727ED55', // WAVAX Incentives Controller
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import { oneRay, ZERO_ADDRESS } from '../../helpers/constants';
|
import { oneRay, ZERO_ADDRESS } from '../../helpers/constants';
|
||||||
import { IAaveConfiguration, eEthereumNetwork, eAvalancheNetwork, IAvalancheConfiguration } from '../../helpers/types';
|
import {
|
||||||
|
IAaveConfiguration,
|
||||||
|
eEthereumNetwork,
|
||||||
|
eAvalancheNetwork,
|
||||||
|
IAvalancheConfiguration,
|
||||||
|
} from '../../helpers/types';
|
||||||
|
|
||||||
import { CommonsConfig } from './commons';
|
import { CommonsConfig } from './commons';
|
||||||
import {
|
import {
|
||||||
|
@ -9,7 +14,7 @@ import {
|
||||||
strategyUSDT,
|
strategyUSDT,
|
||||||
strategyAAVE,
|
strategyAAVE,
|
||||||
strategyWBTC,
|
strategyWBTC,
|
||||||
strategyAVAX,
|
strategyWAVAX,
|
||||||
} from './reservesConfigs';
|
} from './reservesConfigs';
|
||||||
|
|
||||||
// ----------------
|
// ----------------
|
||||||
|
@ -23,30 +28,29 @@ export const AvalancheConfig: IAvalancheConfiguration = {
|
||||||
ReservesConfig: {
|
ReservesConfig: {
|
||||||
WETH: strategyWETH,
|
WETH: strategyWETH,
|
||||||
DAI: strategyDAI,
|
DAI: strategyDAI,
|
||||||
USDC: strategyUSDC,
|
|
||||||
USDT: strategyUSDT,
|
USDT: strategyUSDT,
|
||||||
|
USDC: strategyUSDC,
|
||||||
AAVE: strategyAAVE,
|
AAVE: strategyAAVE,
|
||||||
WBTC: strategyWBTC,
|
WBTC: strategyWBTC,
|
||||||
AVAX: strategyAVAX,
|
WAVAX: strategyWAVAX,
|
||||||
},
|
},
|
||||||
ReserveAssets: {
|
ReserveAssets: {
|
||||||
[eAvalancheNetwork.avalanche]: { // TODO: Check this
|
[eAvalancheNetwork.avalanche]: {
|
||||||
WETH: '0xf20d962a6c8f70c731bd838a3a388D7d48fA6e15',
|
WETH: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
||||||
// DAI: '0xbA7dEebBFC5fA1100Fb055a87773e1E99Cd3507a',
|
DAI: '0xd586e7f844cea2f87f50152665bcbc2c279d8d70',
|
||||||
// USDC: '', // TODO: Not yet deployed by Circle
|
USDT: '0xc7198437980c041c805a1edcba50c1ce5db95118',
|
||||||
USDT: '0xde3A24028580884448a5397872046a019649b084',
|
USDC: '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664',
|
||||||
// AAVE: '0x8cE2Dee54bB9921a2AE0A63dBb2DF8eD88B91dD9', // TODO: What we are going to do?
|
AAVE: '0x63a72806098bd3d9520cc43356dd78afe5d386d9',
|
||||||
WBTC: '0x408D4cD0ADb7ceBd1F1A1C33A0Ba2098E1295bAB',
|
WBTC: '0x50b7545627a5162f82a992c33b87adc75187b218',
|
||||||
// AVAX: '' // TODO: Use WAVAX?
|
WAVAX: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
|
||||||
},
|
},
|
||||||
[eAvalancheNetwork.fuji]: {
|
[eAvalancheNetwork.fuji]: {
|
||||||
WETH: '0x9668f5f55f2712Dd2dfa316256609b516292D554', // MintableERC20 token
|
WETH: '0x9668f5f55f2712Dd2dfa316256609b516292D554', // MintableERC20 token
|
||||||
// DAI: '0x51BC2DfB9D12d9dB50C855A5330fBA0faF761D15',
|
DAI: '0x51BC2DfB9D12d9dB50C855A5330fBA0faF761D15',
|
||||||
// USDC: '0x7804D7f48f6E5749AF5c8Fa87b20702C34a7f5c2',
|
|
||||||
USDT: '0x02823f9B469960Bb3b1de0B3746D4b95B7E35543', // MintableERC20 token
|
USDT: '0x02823f9B469960Bb3b1de0B3746D4b95B7E35543', // MintableERC20 token
|
||||||
// AAVE: '0x47183584aCbc1C45608d7B61cce1C562Ee180E7e',
|
AAVE: '0x47183584aCbc1C45608d7B61cce1C562Ee180E7e',
|
||||||
WBTC: '0x9C1DCacB57ADa1E9e2D3a8280B7cfC7EB936186F', // MintableERC20 token
|
WBTC: '0x9C1DCacB57ADa1E9e2D3a8280B7cfC7EB936186F', // MintableERC20 token
|
||||||
AVAX: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c' // Official WAVAX
|
WAVAX: '0xd00ae08403B9bbb9124bB305C09058E32C39A48c', // Official WAVAX
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,104 +2,22 @@ import BigNumber from 'bignumber.js';
|
||||||
import { oneRay } from '../../helpers/constants';
|
import { oneRay } from '../../helpers/constants';
|
||||||
import { IInterestRateStrategyParams } from '../../helpers/types';
|
import { IInterestRateStrategyParams } from '../../helpers/types';
|
||||||
|
|
||||||
// BUSD SUSD
|
export const rateStrategyVolatileOne: IInterestRateStrategyParams = {
|
||||||
export const rateStrategyStableOne: IInterestRateStrategyParams = {
|
name: 'rateStrategyVolatileOne',
|
||||||
name: "rateStrategyStableOne",
|
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
|
||||||
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
||||||
stableRateSlope1: '0',
|
stableRateSlope1: '0',
|
||||||
stableRateSlope2: '0',
|
stableRateSlope2: '0',
|
||||||
};
|
};
|
||||||
|
|
||||||
// DAI TUSD
|
export const rateStrategyStableOne: IInterestRateStrategyParams = {
|
||||||
export const rateStrategyStableTwo: IInterestRateStrategyParams = {
|
name: 'rateStrategyStableOne',
|
||||||
name: "rateStrategyStableTwo",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
|
||||||
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
|
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
|
||||||
stableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
|
stableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
|
||||||
}
|
};
|
||||||
|
|
||||||
// USDC USDT
|
|
||||||
export const rateStrategyStableThree: IInterestRateStrategyParams = {
|
|
||||||
name: "rateStrategyStableThree",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.9).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope2: new BigNumber(0.60).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope2: new BigNumber(0.60).multipliedBy(oneRay).toFixed(),
|
|
||||||
}
|
|
||||||
|
|
||||||
// WETH
|
|
||||||
export const rateStrategyWETH: IInterestRateStrategyParams = {
|
|
||||||
name: "rateStrategyWETH",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
|
|
||||||
}
|
|
||||||
|
|
||||||
// AAVE
|
|
||||||
export const rateStrategyAAVE: IInterestRateStrategyParams = {
|
|
||||||
name: "rateStrategyAAVE",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: '0',
|
|
||||||
variableRateSlope1: '0',
|
|
||||||
variableRateSlope2: '0',
|
|
||||||
stableRateSlope1: '0',
|
|
||||||
stableRateSlope2: '0',
|
|
||||||
}
|
|
||||||
|
|
||||||
// BAT ENJ LINK MANA MKR REN YFI ZRX
|
|
||||||
export const rateStrategyVolatileOne: IInterestRateStrategyParams = {
|
|
||||||
name: "rateStrategyVolatileOne",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
|
||||||
}
|
|
||||||
|
|
||||||
// KNC WBTC
|
|
||||||
export const rateStrategyVolatileTwo: IInterestRateStrategyParams = {
|
|
||||||
name: "rateStrategyVolatileTwo",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
|
||||||
}
|
|
||||||
|
|
||||||
// SNX
|
|
||||||
export const rateStrategyVolatileThree: IInterestRateStrategyParams = {
|
|
||||||
name: "rateStrategyVolatileThree",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export const rateStrategyVolatileFour: IInterestRateStrategyParams = {
|
|
||||||
name: "rateStrategyVolatileFour",
|
|
||||||
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
|
|
||||||
baseVariableBorrowRate: '0',
|
|
||||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
|
||||||
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
|
||||||
stableRateSlope1: '0',
|
|
||||||
stableRateSlope2: '0',
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,87 +1,8 @@
|
||||||
import { eContractid, IReserveParams } from '../../helpers/types';
|
import { eContractid, IReserveParams } from '../../helpers/types';
|
||||||
|
|
||||||
import {
|
import { rateStrategyStableOne, rateStrategyVolatileOne } from './rateStrategies';
|
||||||
rateStrategyStableTwo,
|
|
||||||
rateStrategyStableThree,
|
|
||||||
rateStrategyWETH,
|
|
||||||
rateStrategyAAVE,
|
|
||||||
rateStrategyVolatileOne,
|
|
||||||
rateStrategyVolatileTwo,
|
|
||||||
} from './rateStrategies';
|
|
||||||
|
|
||||||
export const strategyDAI: IReserveParams = {
|
export const strategyWAVAX: IReserveParams = {
|
||||||
strategy: rateStrategyStableTwo,
|
|
||||||
baseLTVAsCollateral: '7500',
|
|
||||||
liquidationThreshold: '8000',
|
|
||||||
liquidationBonus: '10500',
|
|
||||||
borrowingEnabled: true,
|
|
||||||
stableBorrowRateEnabled: true,
|
|
||||||
reserveDecimals: '18',
|
|
||||||
aTokenImpl: eContractid.AToken,
|
|
||||||
reserveFactor: '1000'
|
|
||||||
};
|
|
||||||
|
|
||||||
export const strategyUSDC: IReserveParams = {
|
|
||||||
strategy: rateStrategyStableThree,
|
|
||||||
baseLTVAsCollateral: '8000',
|
|
||||||
liquidationThreshold: '8500',
|
|
||||||
liquidationBonus: '10500',
|
|
||||||
borrowingEnabled: true,
|
|
||||||
stableBorrowRateEnabled: true,
|
|
||||||
reserveDecimals: '6',
|
|
||||||
aTokenImpl: eContractid.AToken,
|
|
||||||
reserveFactor: '1000'
|
|
||||||
};
|
|
||||||
|
|
||||||
export const strategyUSDT: IReserveParams = {
|
|
||||||
strategy: rateStrategyStableThree,
|
|
||||||
baseLTVAsCollateral: '0',
|
|
||||||
liquidationThreshold: '0',
|
|
||||||
liquidationBonus: '0',
|
|
||||||
borrowingEnabled: true,
|
|
||||||
stableBorrowRateEnabled: true,
|
|
||||||
reserveDecimals: '6',
|
|
||||||
aTokenImpl: eContractid.AToken,
|
|
||||||
reserveFactor: '1000'
|
|
||||||
};
|
|
||||||
|
|
||||||
export const strategyAAVE: IReserveParams = {
|
|
||||||
strategy: rateStrategyAAVE,
|
|
||||||
baseLTVAsCollateral: '5000',
|
|
||||||
liquidationThreshold: '6500',
|
|
||||||
liquidationBonus: '11000',
|
|
||||||
borrowingEnabled: false,
|
|
||||||
stableBorrowRateEnabled: false,
|
|
||||||
reserveDecimals: '18',
|
|
||||||
aTokenImpl: eContractid.AToken,
|
|
||||||
reserveFactor: '0'
|
|
||||||
};
|
|
||||||
|
|
||||||
export const strategyWETH: IReserveParams = {
|
|
||||||
strategy: rateStrategyWETH,
|
|
||||||
baseLTVAsCollateral: '8000',
|
|
||||||
liquidationThreshold: '8250',
|
|
||||||
liquidationBonus: '10500',
|
|
||||||
borrowingEnabled: true,
|
|
||||||
stableBorrowRateEnabled: true,
|
|
||||||
reserveDecimals: '18',
|
|
||||||
aTokenImpl: eContractid.AToken,
|
|
||||||
reserveFactor: '1000'
|
|
||||||
};
|
|
||||||
|
|
||||||
export const strategyWBTC: IReserveParams = {
|
|
||||||
strategy: rateStrategyVolatileTwo,
|
|
||||||
baseLTVAsCollateral: '7000',
|
|
||||||
liquidationThreshold: '7500',
|
|
||||||
liquidationBonus: '11000',
|
|
||||||
borrowingEnabled: true,
|
|
||||||
stableBorrowRateEnabled: true,
|
|
||||||
reserveDecimals: '8',
|
|
||||||
aTokenImpl: eContractid.AToken,
|
|
||||||
reserveFactor: '2000'
|
|
||||||
};
|
|
||||||
|
|
||||||
export const strategyAVAX: IReserveParams = {
|
|
||||||
strategy: rateStrategyVolatileOne,
|
strategy: rateStrategyVolatileOne,
|
||||||
baseLTVAsCollateral: '5000',
|
baseLTVAsCollateral: '5000',
|
||||||
liquidationThreshold: '6500',
|
liquidationThreshold: '6500',
|
||||||
|
@ -92,3 +13,75 @@ export const strategyAVAX: IReserveParams = {
|
||||||
aTokenImpl: eContractid.AToken,
|
aTokenImpl: eContractid.AToken,
|
||||||
reserveFactor: '2000',
|
reserveFactor: '2000',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const strategyWETH: IReserveParams = {
|
||||||
|
strategy: rateStrategyVolatileOne,
|
||||||
|
baseLTVAsCollateral: '8000',
|
||||||
|
liquidationThreshold: '8250',
|
||||||
|
liquidationBonus: '10500',
|
||||||
|
borrowingEnabled: true,
|
||||||
|
stableBorrowRateEnabled: false,
|
||||||
|
reserveDecimals: '18',
|
||||||
|
aTokenImpl: eContractid.AToken,
|
||||||
|
reserveFactor: '1000',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const strategyWBTC: IReserveParams = {
|
||||||
|
strategy: rateStrategyVolatileOne,
|
||||||
|
baseLTVAsCollateral: '0',
|
||||||
|
liquidationThreshold: '0',
|
||||||
|
liquidationBonus: '0',
|
||||||
|
borrowingEnabled: true,
|
||||||
|
stableBorrowRateEnabled: false,
|
||||||
|
reserveDecimals: '8',
|
||||||
|
aTokenImpl: eContractid.AToken,
|
||||||
|
reserveFactor: '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const strategyAAVE: IReserveParams = {
|
||||||
|
strategy: rateStrategyVolatileOne,
|
||||||
|
baseLTVAsCollateral: '5000',
|
||||||
|
liquidationThreshold: '6500',
|
||||||
|
liquidationBonus: '11000',
|
||||||
|
borrowingEnabled: false,
|
||||||
|
stableBorrowRateEnabled: false,
|
||||||
|
reserveDecimals: '18',
|
||||||
|
aTokenImpl: eContractid.AToken,
|
||||||
|
reserveFactor: '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const strategyDAI: IReserveParams = {
|
||||||
|
strategy: rateStrategyStableOne,
|
||||||
|
baseLTVAsCollateral: '0',
|
||||||
|
liquidationThreshold: '0',
|
||||||
|
liquidationBonus: '0',
|
||||||
|
borrowingEnabled: true,
|
||||||
|
stableBorrowRateEnabled: false,
|
||||||
|
reserveDecimals: '18',
|
||||||
|
aTokenImpl: eContractid.AToken,
|
||||||
|
reserveFactor: '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const strategyUSDT: IReserveParams = {
|
||||||
|
strategy: rateStrategyStableOne,
|
||||||
|
baseLTVAsCollateral: '0',
|
||||||
|
liquidationThreshold: '0',
|
||||||
|
liquidationBonus: '0',
|
||||||
|
borrowingEnabled: true,
|
||||||
|
stableBorrowRateEnabled: false,
|
||||||
|
reserveDecimals: '6',
|
||||||
|
aTokenImpl: eContractid.AToken,
|
||||||
|
reserveFactor: '0',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const strategyUSDC: IReserveParams = {
|
||||||
|
strategy: rateStrategyStableOne,
|
||||||
|
baseLTVAsCollateral: '0',
|
||||||
|
liquidationThreshold: '0',
|
||||||
|
liquidationBonus: '0',
|
||||||
|
borrowingEnabled: true,
|
||||||
|
stableBorrowRateEnabled: false,
|
||||||
|
reserveDecimals: '6',
|
||||||
|
aTokenImpl: eContractid.AToken,
|
||||||
|
reserveFactor: '0',
|
||||||
|
};
|
||||||
|
|
|
@ -194,7 +194,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
||||||
USD: USD_ADDRESS,
|
USD: USD_ADDRESS,
|
||||||
STAKE: mockTokens.STAKE.address,
|
STAKE: mockTokens.STAKE.address,
|
||||||
xSUSHI: mockTokens.xSUSHI.address,
|
xSUSHI: mockTokens.xSUSHI.address,
|
||||||
AVAX: mockTokens.AVAX.address
|
WAVAX: mockTokens.WAVAX.address,
|
||||||
},
|
},
|
||||||
fallbackOracle
|
fallbackOracle
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user