@defisaver/positions-sdk 0.0.166-dev3-liquity-v2 → 0.0.166-dev4-liquity-v2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/liquityV2/index.js +1 -0
- package/cjs/moneymarket/moneymarketCommonService.js +1 -1
- package/cjs/types/liquityV2.d.ts +1 -0
- package/esm/liquityV2/index.js +1 -0
- package/esm/moneymarket/moneymarketCommonService.js +1 -1
- package/esm/types/liquityV2.d.ts +1 -0
- package/package.json +1 -1
- package/src/liquityV2/index.ts +1 -0
- package/src/moneymarket/moneymarketCommonService.ts +1 -1
- package/src/types/liquityV2.ts +1 -0
package/cjs/liquityV2/index.js
CHANGED
|
@@ -82,6 +82,7 @@ const getLiquityV2TroveData = (web3, network, { selectedMarket, assetsData, mark
|
|
|
82
82
|
borrowedUsd: '0',
|
|
83
83
|
isBorrowed: false,
|
|
84
84
|
isSupplied: true,
|
|
85
|
+
collateral: true,
|
|
85
86
|
};
|
|
86
87
|
const collRatio = new decimal_js_1.default(data.TCRatio).div(1e16).toString();
|
|
87
88
|
const interestRate = new decimal_js_1.default(data.annualInterestRate).div(1e16).toString();
|
|
@@ -27,7 +27,7 @@ const calcLeverageLiqPrice = (leverageType, assetPrice, borrowedUsd, borrowLimit
|
|
|
27
27
|
exports.calcLeverageLiqPrice = calcLeverageLiqPrice;
|
|
28
28
|
const calculateBorrowingAssetLimit = (assetBorrowedUsd, borrowLimitUsd) => new decimal_js_1.default(assetBorrowedUsd).div(borrowLimitUsd).times(100).toString();
|
|
29
29
|
exports.calculateBorrowingAssetLimit = calculateBorrowingAssetLimit;
|
|
30
|
-
exports.STABLE_ASSETS = ['DAI', 'USDC', 'USDT', 'TUSD', 'USDP', 'GUSD', 'BUSD', 'SUSD', 'FRAX', 'LUSD', 'USDC.e', 'GHO', 'sDAI', 'crvUSD'];
|
|
30
|
+
exports.STABLE_ASSETS = ['DAI', 'USDC', 'USDT', 'TUSD', 'USDP', 'GUSD', 'BUSD', 'SUSD', 'FRAX', 'LUSD', 'USDC.e', 'GHO', 'sDAI', 'crvUSD', 'BOLD'];
|
|
31
31
|
const isLeveragedPos = (usedAssets, dustLimit = 5) => {
|
|
32
32
|
let borrowUnstable = 0;
|
|
33
33
|
let supplyStable = 0;
|
package/cjs/types/liquityV2.d.ts
CHANGED
package/esm/liquityV2/index.js
CHANGED
|
@@ -75,6 +75,7 @@ export const getLiquityV2TroveData = (web3, network, { selectedMarket, assetsDat
|
|
|
75
75
|
borrowedUsd: '0',
|
|
76
76
|
isBorrowed: false,
|
|
77
77
|
isSupplied: true,
|
|
78
|
+
collateral: true,
|
|
78
79
|
};
|
|
79
80
|
const collRatio = new Dec(data.TCRatio).div(1e16).toString();
|
|
80
81
|
const interestRate = new Dec(data.annualInterestRate).div(1e16).toString();
|
|
@@ -16,7 +16,7 @@ export const calcLeverageLiqPrice = (leverageType, assetPrice, borrowedUsd, borr
|
|
|
16
16
|
return '0';
|
|
17
17
|
};
|
|
18
18
|
export const calculateBorrowingAssetLimit = (assetBorrowedUsd, borrowLimitUsd) => new Dec(assetBorrowedUsd).div(borrowLimitUsd).times(100).toString();
|
|
19
|
-
export const STABLE_ASSETS = ['DAI', 'USDC', 'USDT', 'TUSD', 'USDP', 'GUSD', 'BUSD', 'SUSD', 'FRAX', 'LUSD', 'USDC.e', 'GHO', 'sDAI', 'crvUSD'];
|
|
19
|
+
export const STABLE_ASSETS = ['DAI', 'USDC', 'USDT', 'TUSD', 'USDP', 'GUSD', 'BUSD', 'SUSD', 'FRAX', 'LUSD', 'USDC.e', 'GHO', 'sDAI', 'crvUSD', 'BOLD'];
|
|
20
20
|
export const isLeveragedPos = (usedAssets, dustLimit = 5) => {
|
|
21
21
|
let borrowUnstable = 0;
|
|
22
22
|
let supplyStable = 0;
|
package/esm/types/liquityV2.d.ts
CHANGED
package/package.json
CHANGED
package/src/liquityV2/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const calcLeverageLiqPrice = (leverageType: string, assetPrice: string, b
|
|
|
20
20
|
|
|
21
21
|
export const calculateBorrowingAssetLimit = (assetBorrowedUsd: string, borrowLimitUsd: string) => new Dec(assetBorrowedUsd).div(borrowLimitUsd).times(100).toString();
|
|
22
22
|
|
|
23
|
-
export const STABLE_ASSETS = ['DAI', 'USDC', 'USDT', 'TUSD', 'USDP', 'GUSD', 'BUSD', 'SUSD', 'FRAX', 'LUSD', 'USDC.e', 'GHO', 'sDAI', 'crvUSD'];
|
|
23
|
+
export const STABLE_ASSETS = ['DAI', 'USDC', 'USDT', 'TUSD', 'USDP', 'GUSD', 'BUSD', 'SUSD', 'FRAX', 'LUSD', 'USDC.e', 'GHO', 'sDAI', 'crvUSD', 'BOLD'];
|
|
24
24
|
|
|
25
25
|
export const isLeveragedPos = (usedAssets: MMUsedAssets, dustLimit = 5) => {
|
|
26
26
|
let borrowUnstable = 0;
|