mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge branch 'master' into feat/light-deployments
This commit is contained in:
commit
12cda094b4
|
@ -68,5 +68,6 @@ export const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
|||
BptBALWETH: oneEther.multipliedBy('22.407436').toFixed(),
|
||||
WMATIC: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
STAKE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
xSUSHI: oneEther.multipliedBy('0.00913428586').toFixed(),
|
||||
USD: '5848466240000000',
|
||||
};
|
||||
|
|
|
@ -72,6 +72,9 @@ export const setInitialAssetPricesInOracle = async (
|
|||
priceOracleInstance: PriceOracle
|
||||
) => {
|
||||
for (const [assetSymbol, price] of Object.entries(prices) as [string, string][]) {
|
||||
|
||||
console.log("Trying for ", assetsAddresses, assetSymbol);
|
||||
|
||||
const assetAddressIndex = Object.keys(assetsAddresses).findIndex(
|
||||
(value) => value === assetSymbol
|
||||
);
|
||||
|
|
|
@ -238,6 +238,7 @@ export interface iAssetBase<T> {
|
|||
BptBALWETH: T;
|
||||
WMATIC: T;
|
||||
STAKE: T;
|
||||
xSUSHI: T;
|
||||
}
|
||||
|
||||
export type iAssetsWithoutETH<T> = Omit<iAssetBase<T>, 'ETH'>;
|
||||
|
@ -266,6 +267,7 @@ export type iAavePoolAssets<T> = Pick<
|
|||
| 'UNI'
|
||||
| 'REN'
|
||||
| 'ENJ'
|
||||
| 'xSUSHI'
|
||||
>;
|
||||
|
||||
export type iLpPoolAssets<T> = Pick<
|
||||
|
@ -349,6 +351,7 @@ export enum TokenContractId {
|
|||
BptBALWETH = 'BptBALWETH',
|
||||
WMATIC = 'WMATIC',
|
||||
STAKE = 'STAKE',
|
||||
xSUSHI = 'xSUSHI'
|
||||
}
|
||||
|
||||
export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {
|
||||
|
|
|
@ -22,6 +22,7 @@ import {
|
|||
strategyWBTC,
|
||||
strategyWETH,
|
||||
strategyYFI,
|
||||
strategyXSUSHI,
|
||||
} from './reservesConfigs';
|
||||
|
||||
// ----------------
|
||||
|
@ -53,6 +54,7 @@ export const AaveConfig: IAaveConfiguration = {
|
|||
WETH: strategyWETH,
|
||||
YFI: strategyYFI,
|
||||
ZRX: strategyZRX,
|
||||
xSUSHI: strategyXSUSHI,
|
||||
},
|
||||
ReserveAssets: {
|
||||
[eEthereumNetwork.buidlerevm]: {},
|
||||
|
@ -123,6 +125,7 @@ export const AaveConfig: IAaveConfiguration = {
|
|||
WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
||||
YFI: '0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e',
|
||||
ZRX: '0xE41d2489571d322189246DaFA5ebDe1F4699F498',
|
||||
xSUSHI: '0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
AAVE: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9',
|
||||
|
@ -145,6 +148,7 @@ export const AaveConfig: IAaveConfiguration = {
|
|||
WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
||||
YFI: '0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e',
|
||||
ZRX: '0xE41d2489571d322189246DaFA5ebDe1F4699F498',
|
||||
xSUSHI: '0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -89,3 +89,17 @@ export const rateStrategyVolatileThree: IInterestRateStrategyParams = {
|
|||
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,6 +1,5 @@
|
|||
// import BigNumber from 'bignumber.js';
|
||||
// import { oneRay } from '../../helpers/constants';
|
||||
import { eContractid, IReserveParams } from '../../helpers/types';
|
||||
|
||||
import {
|
||||
rateStrategyStableOne,
|
||||
rateStrategyStableTwo,
|
||||
|
@ -10,6 +9,7 @@ import {
|
|||
rateStrategyVolatileOne,
|
||||
rateStrategyVolatileTwo,
|
||||
rateStrategyVolatileThree,
|
||||
rateStrategyVolatileFour,
|
||||
} from './rateStrategies';
|
||||
|
||||
export const strategyBUSD: IReserveParams = {
|
||||
|
@ -251,4 +251,16 @@ export const strategyZRX: IReserveParams = {
|
|||
reserveDecimals: '18',
|
||||
aTokenImpl: eContractid.AToken,
|
||||
reserveFactor: '2000'
|
||||
};
|
||||
|
||||
export const strategyXSUSHI: IReserveParams = {
|
||||
strategy: rateStrategyVolatileFour,
|
||||
baseLTVAsCollateral: '2500',
|
||||
liquidationThreshold: '4500',
|
||||
liquidationBonus: '11500',
|
||||
borrowingEnabled: true,
|
||||
stableBorrowRateEnabled: false,
|
||||
reserveDecimals: '18',
|
||||
aTokenImpl: eContractid.AToken,
|
||||
reserveFactor: '3500',
|
||||
};
|
25523
package-lock.json
generated
25523
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -191,6 +191,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
WMATIC: mockTokens.WMATIC.address,
|
||||
USD: USD_ADDRESS,
|
||||
STAKE: mockTokens.STAKE.address,
|
||||
xSUSHI: mockTokens.xSUSHI.address
|
||||
},
|
||||
fallbackOracle
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user