Skip to content

Commit

Permalink
Add LUSD
Browse files Browse the repository at this point in the history
  • Loading branch information
bingen committed Jan 20, 2022
1 parent 988ece8 commit 1e765e9
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
5 changes: 4 additions & 1 deletion helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export interface iAssetBase<T> {
REN: T;
ENJ: T;
xSUSHI: T;
LUSD: T;
}

export type iAssetsWithoutETH<T> = Omit<iAssetBase<T>, 'ETH'>;
Expand Down Expand Up @@ -234,6 +235,7 @@ export type iAavePoolAssets<T> = Pick<
| 'REN'
| 'ENJ'
| 'xSUSHI'
| 'LUSD'
>;

export type iMultiPoolsAssets<T> = iAssetCommon<T> | iAavePoolAssets<T>;
Expand Down Expand Up @@ -264,7 +266,8 @@ export enum TokenContractId {
YFI = 'YFI',
UNI = 'UNI',
ENJ = 'ENJ',
xSUSHI = 'xSUSHI'
xSUSHI = 'xSUSHI',
LUSD = 'LUSD',
}

export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {
Expand Down
1 change: 1 addition & 0 deletions markets/aave/commons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
YFI: oneEther.multipliedBy('22.407436').toFixed(),
ZRX: oneEther.multipliedBy('0.001151').toFixed(),
xSUSHI: oneEther.multipliedBy('0.00913428586').toFixed(),
LUSD: oneEther.multipliedBy('0.00369068412860').toFixed(),
USD: '5848466240000000',
};
// ----------------
Expand Down
6 changes: 6 additions & 0 deletions markets/aave/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
strategyWETH,
strategyYFI,
strategyXSUSHI,
strategyLUSD,
} from './reservesConfigs';

// ----------------
Expand Down Expand Up @@ -55,6 +56,7 @@ export const AaveConfig: IAaveConfiguration = {
YFI: strategyYFI,
ZRX: strategyZRX,
xSUSHI: strategyXSUSHI,
LUSD: strategyLUSD,
},
ReserveAssets: {
[eEthereumNetwork.buidlerevm]: {},
Expand All @@ -81,6 +83,7 @@ export const AaveConfig: IAaveConfiguration = {
WETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
YFI: '0xb7c325266ec274fEb1354021D27FA3E3379D840d',
ZRX: '0xD0d76886cF8D952ca26177EB7CfDf83bad08C00C',
LUSD: '0x0b02b94638daa719290b5214825dA625af08A02F',
},
[EthereumNetwork.ropsten]: {
AAVE: '',
Expand All @@ -103,6 +106,7 @@ export const AaveConfig: IAaveConfiguration = {
WETH: '0xc778417e063141139fce010982780140aa0cd5ab',
YFI: ZERO_ADDRESS,
ZRX: '0x02d7055704EfF050323A2E5ee4ba05DB2A588959',
LUSD: '0x99Fda92878c1d2f1e0971D1937C50CC578A33E3D',
},
[EthereumNetwork.main]: {
AAVE: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9',
Expand All @@ -126,6 +130,7 @@ export const AaveConfig: IAaveConfiguration = {
YFI: '0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e',
ZRX: '0xE41d2489571d322189246DaFA5ebDe1F4699F498',
xSUSHI: '0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272',
LUSD: '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0',
},
[EthereumNetwork.tenderlyMain]: {
AAVE: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9',
Expand All @@ -149,6 +154,7 @@ export const AaveConfig: IAaveConfiguration = {
YFI: '0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e',
ZRX: '0xE41d2489571d322189246DaFA5ebDe1F4699F498',
xSUSHI: '0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272',
LUSD: '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0',
},
},
};
Expand Down
19 changes: 18 additions & 1 deletion markets/aave/reservesConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,21 @@ export const strategyXSUSHI: IReserveParams = {
reserveDecimals: '18',
aTokenImpl: eContractid.AToken,
reserveFactor: '3500',
};
};

export const strategyLUSD: IReserveParams = {
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: '0',
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '0',
liquidationThreshold: '0',
liquidationBonus: '0',
borrowingEnabled: true,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
aTokenImpl: eContractid.AToken,
reserveFactor: '2000'
};

0 comments on commit 1e765e9

Please sign in to comment.