@haven-fi/solauto-sdk 1.0.646 → 1.0.647
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.
@@ -120,7 +120,7 @@ function getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps, offsetFromMaxLt
|
|
120
120
|
1); // -1 to account for any rounding issues
|
121
121
|
}
|
122
122
|
function maxRepayFromBps(maxLtvBps, liqThresholdBps) {
|
123
|
-
return Math.min(
|
123
|
+
return Math.min(8750, getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps - 1000, constants_1.OFFSET_FROM_MAX_LTV));
|
124
124
|
}
|
125
125
|
function maxRepayToBps(maxLtvBps, liqThresholdBps) {
|
126
126
|
return Math.min(maxRepayFromBps(maxLtvBps, liqThresholdBps) - constants_1.MIN_REPAY_GAP_BPS, getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps, constants_1.OFFSET_FROM_MAX_LTV));
|
package/package.json
CHANGED
package/src/utils/numberUtils.ts
CHANGED
@@ -168,7 +168,7 @@ export function getMaxLiqUtilizationRateBps(
|
|
168
168
|
|
169
169
|
export function maxRepayFromBps(maxLtvBps: number, liqThresholdBps: number) {
|
170
170
|
return Math.min(
|
171
|
-
|
171
|
+
8750,
|
172
172
|
getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps - 1000, OFFSET_FROM_MAX_LTV)
|
173
173
|
);
|
174
174
|
}
|