From ba5d325ccb0316253720ac9afd972d436491c55c Mon Sep 17 00:00:00 2001 From: dhadrien Date: Thu, 21 Jan 2021 15:33:24 +0100 Subject: [PATCH] Added CRV configs --- helpers/types.ts | 3 +++ markets/aave/commons.ts | 1 + markets/aave/index.ts | 5 +++++ markets/aave/reservesConfigs.ts | 21 +++++++++++++++++++-- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/helpers/types.ts b/helpers/types.ts index 7b2e6662..d5d25cf9 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -203,6 +203,7 @@ export interface iAssetBase { USD: T; REN: T; ENJ: T; + CRV: T; } export type iAssetsWithoutETH = Omit, 'ETH'>; @@ -231,6 +232,7 @@ export type iAavePoolAssets = Pick< | 'UNI' | 'REN' | 'ENJ' + | 'CRV' >; export type iMultiPoolsAssets = iAssetCommon | iAavePoolAssets; @@ -261,6 +263,7 @@ export enum TokenContractId { YFI = 'YFI', UNI = 'UNI', ENJ = 'ENJ', + CRV = 'CRV', } export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams { diff --git a/markets/aave/commons.ts b/markets/aave/commons.ts index f2fdb6f3..701af782 100644 --- a/markets/aave/commons.ts +++ b/markets/aave/commons.ts @@ -23,6 +23,7 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = { WBTC: oneEther.multipliedBy('47.332685').toFixed(), YFI: oneEther.multipliedBy('22.407436').toFixed(), ZRX: oneEther.multipliedBy('0.001151').toFixed(), + CRV: oneEther.multipliedBy('0.00087505').toFixed(), USD: '5848466240000000', }; // ---------------- diff --git a/markets/aave/index.ts b/markets/aave/index.ts index eefcdd3b..263fb568 100644 --- a/markets/aave/index.ts +++ b/markets/aave/index.ts @@ -22,6 +22,7 @@ import { strategyWBTC, strategyWETH, strategyYFI, + strategyCRV, } from './reservesConfigs'; // ---------------- @@ -53,6 +54,7 @@ export const AaveConfig: IAaveConfiguration = { WETH: strategyWETH, YFI: strategyYFI, ZRX: strategyZRX, + CRV: strategyCRV, }, ReserveAssets: { [eEthereumNetwork.buidlerevm]: {}, @@ -79,6 +81,7 @@ export const AaveConfig: IAaveConfiguration = { WETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', YFI: '0xb7c325266ec274fEb1354021D27FA3E3379D840d', ZRX: '0xD0d76886cF8D952ca26177EB7CfDf83bad08C00C', + CRV: '0x47a0B839f62555b2E9c5684cbb734941c6AfdCc2', }, [EthereumNetwork.ropsten]: { AAVE: '', @@ -123,6 +126,7 @@ export const AaveConfig: IAaveConfiguration = { WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', YFI: '0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e', ZRX: '0xE41d2489571d322189246DaFA5ebDe1F4699F498', + CRV: '0xD533a949740bb3306d119CC777fa900bA034cd52', }, [EthereumNetwork.tenderlyMain]: { AAVE: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', @@ -145,6 +149,7 @@ export const AaveConfig: IAaveConfiguration = { WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', YFI: '0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e', ZRX: '0xE41d2489571d322189246DaFA5ebDe1F4699F498', + CRV: '0xD533a949740bb3306d119CC777fa900bA034cd52', }, }, }; diff --git a/markets/aave/reservesConfigs.ts b/markets/aave/reservesConfigs.ts index 68ec93d6..16a4f20e 100644 --- a/markets/aave/reservesConfigs.ts +++ b/markets/aave/reservesConfigs.ts @@ -339,5 +339,22 @@ export const strategyZRX: IReserveParams = { stableBorrowRateEnabled: true, reserveDecimals: '18', aTokenImpl: eContractid.AToken, - reserveFactor: '2000' -}; \ No newline at end of file + reserveFactor: '2000', +}; + +export const strategyCRV: IReserveParams = { + 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: new BigNumber(0.1).multipliedBy(oneRay).toFixed(), + stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(), + baseLTVAsCollateral: '4000', + liquidationThreshold: '5500', + liquidationBonus: '11500', + borrowingEnabled: true, + stableBorrowRateEnabled: true, + reserveDecimals: '18', + aTokenImpl: eContractid.AToken, + reserveFactor: '2000', +};