@scallop-io/sui-scallop-sdk 2.3.11 → 2.3.12
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/README.md +7 -7
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +20 -20
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/models/scallopAddress.ts +1 -1
- package/src/models/scallopQuery.ts +7 -6
- package/src/models/scallopUtils.ts +9 -7
- package/src/queries/borrowIncentiveQuery.ts +21 -14
- package/src/queries/coreQuery.ts +9 -3
- package/src/queries/isolatedAssetQuery.ts +5 -2
- package/src/queries/portfolioQuery.ts +123 -109
- package/src/queries/priceQuery.ts +2 -130
- package/src/queries/vescaQuery.ts +9 -4
- package/src/types/query/portfolio.ts +10 -0
- package/src/utils/query.ts +5 -10
package/src/utils/query.ts
CHANGED
|
@@ -524,22 +524,17 @@ export const calculateBorrowIncentivePoolPointData = (
|
|
|
524
524
|
.multipliedBy(rewardCoinPrice);
|
|
525
525
|
|
|
526
526
|
const weightScale = BigNumber(1_000_000_000_000);
|
|
527
|
+
const rewardScale = BigNumber(
|
|
528
|
+
parsedBorrowIncentivePoolPointData.baseWeight
|
|
529
|
+
).dividedBy(weightScale);
|
|
527
530
|
|
|
528
531
|
const rewardRate =
|
|
529
532
|
rewardValueForYear
|
|
530
|
-
.multipliedBy(
|
|
531
|
-
BigNumber(parsedBorrowIncentivePoolPointData.baseWeight).dividedBy(
|
|
532
|
-
weightScale
|
|
533
|
-
)
|
|
534
|
-
)
|
|
533
|
+
.multipliedBy(rewardScale)
|
|
535
534
|
.dividedBy(weightedStakedValue)
|
|
536
535
|
.isFinite() && parsedBorrowIncentivePoolPointData.points > 0
|
|
537
536
|
? rewardValueForYear
|
|
538
|
-
.multipliedBy(
|
|
539
|
-
BigNumber(parsedBorrowIncentivePoolPointData.baseWeight).dividedBy(
|
|
540
|
-
weightScale
|
|
541
|
-
)
|
|
542
|
-
)
|
|
537
|
+
.multipliedBy(rewardScale)
|
|
543
538
|
.dividedBy(weightedStakedValue)
|
|
544
539
|
.toNumber()
|
|
545
540
|
: Infinity;
|