From ce7d011e207a7b01c6d6d6f71903bac03f82ba8b Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Wed, 24 Feb 2021 17:58:20 -0500 Subject: [PATCH] Initial setup for BptBALWETH --- helpers/constants.ts | 1 + helpers/types.ts | 3 +++ markets/amm/commons.ts | 6 ++++++ markets/amm/index.ts | 5 +++++ markets/amm/reservesConfigs.ts | 14 +++++++++++++- test-suites/test-aave/__setup.spec.ts | 1 + test-suites/test-amm/__setup.spec.ts | 1 + 7 files changed, 30 insertions(+), 1 deletion(-) diff --git a/helpers/constants.ts b/helpers/constants.ts index 31b255a1..f9ec7f2b 100644 --- a/helpers/constants.ts +++ b/helpers/constants.ts @@ -65,6 +65,7 @@ export const MOCK_CHAINLINK_AGGREGATORS_PRICES = { UniWBTCUSDC: oneEther.multipliedBy('22.407436').toFixed(), UniYFIWETH: oneEther.multipliedBy('22.407436').toFixed(), BptWBTCWETH: oneEther.multipliedBy('22.407436').toFixed(), + BptBALWETH: oneEther.multipliedBy('22.407436').toFixed(), WMATIC: oneEther.multipliedBy('0.003620948469').toFixed(), STAKE: oneEther.multipliedBy('0.003620948469').toFixed(), USD: '5848466240000000', diff --git a/helpers/types.ts b/helpers/types.ts index d0a5fb43..a564fc13 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -235,6 +235,7 @@ export interface iAssetBase { UniWBTCUSDC: T; UniYFIWETH: T; BptWBTCWETH: T; + BptBALWETH: T; WMATIC: T; STAKE: T; } @@ -289,6 +290,7 @@ export type iLpPoolAssets = Pick< | 'UniWBTCUSDC' | 'UniYFIWETH' | 'BptWBTCWETH' + | 'BptBALWETH' >; export type iMaticPoolAssets = Pick< @@ -344,6 +346,7 @@ export enum TokenContractId { UniWBTCUSDC = 'UniWBTCUSDC', UniYFIWETH = 'UniYFIWETH', BptWBTCWETH = 'BptWBTCWETH', + BptBALWETH = 'BptBALWETH', WMATIC = 'WMATIC', STAKE = 'STAKE', } diff --git a/markets/amm/commons.ts b/markets/amm/commons.ts index f0dadf97..ce8614a8 100644 --- a/markets/amm/commons.ts +++ b/markets/amm/commons.ts @@ -93,6 +93,9 @@ export const CommonsConfig: ICommonConfiguration = { BptWBTCWETH: { borrowRate: oneRay.multipliedBy(0.05).toFixed(), }, + BptBALWETH: { + borrowRate: oneRay.multipliedBy(0.05).toFixed(), + } }, // ---------------- // COMMON PROTOCOL ADDRESSES ACROSS POOLS @@ -234,6 +237,7 @@ export const CommonsConfig: ICommonConfiguration = { UniWBTCUSDC: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', UniYFIWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', BptWBTCWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', + BptBALWETH: '0x5699302154A020FB1DE2B1d39f4c73785A235d8F', USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', }, [eEthereumNetwork.ropsten]: { @@ -258,6 +262,7 @@ export const CommonsConfig: ICommonConfiguration = { UniWBTCUSDC: ZERO_ADDRESS, UniYFIWETH: ZERO_ADDRESS, BptWBTCWETH: ZERO_ADDRESS, + BptBALWETH: ZERO_ADDRESS, USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', }, [eEthereumNetwork.tenderlyMain]: { @@ -280,6 +285,7 @@ export const CommonsConfig: ICommonConfiguration = { UniWBTCUSDC: ZERO_ADDRESS, UniYFIWETH: ZERO_ADDRESS, BptWBTCWETH: ZERO_ADDRESS, + BptBALWETH: ZERO_ADDRESS, USD: '0x9326BFA02ADD2366b30bacB125260Af641031331', }, }, diff --git a/markets/amm/index.ts b/markets/amm/index.ts index 705e4be3..e42dbdec 100644 --- a/markets/amm/index.ts +++ b/markets/amm/index.ts @@ -22,6 +22,7 @@ import { strategyUSDCWETH, strategyWBTCUSDC, strategyYFIWETH, + strategyBALWETH, } from './reservesConfigs'; // ---------------- @@ -53,6 +54,7 @@ export const AmmConfig: IAmmConfiguration = { UniWBTCUSDC: strategyWBTCUSDC, UniYFIWETH: strategyYFIWETH, BptWBTCWETH: strategyWBTCWETH, + BptBALWETH: strategyBALWETH, }, ReserveAssets: { [eEthereumNetwork.buidlerevm]: {}, @@ -79,6 +81,7 @@ export const AmmConfig: IAmmConfiguration = { UniWBTCUSDC: '0x3d35B5F289f55A580e6F85eE22E6a8f57053b966', UniYFIWETH: '0x5af95ddFACC150a1695A3Fc606459fd0dE57b91f', BptWBTCWETH: '0x110569E3261bC0934dA637b019f6f1b6F50ec574', + BptBALWETH: '0xad01D8e0Fa9EAA8Fe76dA30CFb1BCe12707aE6c5', }, [eEthereumNetwork.ropsten]: { }, @@ -103,6 +106,7 @@ export const AmmConfig: IAmmConfiguration = { UniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', UniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', BptWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', + BptBALWETH: '0x59A19D8c652FA0284f44113D0ff9aBa70bd46fB4', }, [eEthereumNetwork.tenderlyMain]: { DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F', @@ -125,6 +129,7 @@ export const AmmConfig: IAmmConfiguration = { UniWBTCUSDC: '0x004375Dff511095CC5A197A54140a24eFEF3A416', UniYFIWETH: '0x2fDbAdf3C4D5A8666Bc06645B8358ab803996E28', BptWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5', + BptBALWETH: '0x59A19D8c652FA0284f44113D0ff9aBa70bd46fB4', }, }, }; diff --git a/markets/amm/reservesConfigs.ts b/markets/amm/reservesConfigs.ts index b4143653..79893f4d 100644 --- a/markets/amm/reservesConfigs.ts +++ b/markets/amm/reservesConfigs.ts @@ -232,4 +232,16 @@ export const strategyYFIWETH: IReserveParams = { reserveDecimals: '18', aTokenImpl: eContractid.AToken, reserveFactor: '1500' -}; \ No newline at end of file +}; + +export const strategyBALWETH: IReserveParams = { + strategy: rateStrategyAmmBase, + baseLTVAsCollateral: '6000', + liquidationThreshold: '6500', + liquidationBonus: '11500', + borrowingEnabled: true, + stableBorrowRateEnabled: false, + reserveDecimals: '18', + aTokenImpl: eContractid.AToken, + reserveFactor: '1500' +} \ No newline at end of file diff --git a/test-suites/test-aave/__setup.spec.ts b/test-suites/test-aave/__setup.spec.ts index b157610f..2f0f275b 100644 --- a/test-suites/test-aave/__setup.spec.ts +++ b/test-suites/test-aave/__setup.spec.ts @@ -187,6 +187,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { UniWBTCUSDC: mockTokens.UniWBTCUSDC.address, UniYFIWETH: mockTokens.UniYFIWETH.address, BptWBTCWETH: mockTokens.BptWBTCWETH.address, + BptBALWETH: mockTokens.BptBALWETH.address, WMATIC: mockTokens.WMATIC.address, USD: USD_ADDRESS, STAKE: mockTokens.STAKE.address, diff --git a/test-suites/test-amm/__setup.spec.ts b/test-suites/test-amm/__setup.spec.ts index 7d55702e..277998f4 100644 --- a/test-suites/test-amm/__setup.spec.ts +++ b/test-suites/test-amm/__setup.spec.ts @@ -186,6 +186,7 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => { UniWBTCUSDC: mockTokens.UniWBTCUSDC.address, UniYFIWETH: mockTokens.UniYFIWETH.address, BptWBTCWETH: mockTokens.BptWBTCWETH.address, + BptBALWETH: mockTokens.BptBALWETH.address, WMATIC: mockTokens.WMATIC.address, USD: USD_ADDRESS, STAKE: mockTokens.STAKE.address,