@defisaver/positions-sdk 2.0.15-dev-4 → 2.0.15-dev-5
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.
|
@@ -68,12 +68,19 @@ const getIncentiveApys = (baseData, compPrice) => __awaiter(void 0, void 0, void
|
|
|
68
68
|
description: `Native ${baseData.symbol} yield.`,
|
|
69
69
|
}),
|
|
70
70
|
],
|
|
71
|
-
borrowIncentives: [
|
|
71
|
+
borrowIncentives: [{
|
|
72
|
+
token: 'COMP',
|
|
73
|
+
apy: (0, moneymarket_1.aprToApy)((100 * constants_1.SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(),
|
|
74
|
+
incentiveKind: common_1.IncentiveKind.Reward,
|
|
75
|
+
description: 'Eligible for protocol-level COMP incentives.',
|
|
76
|
+
},
|
|
77
|
+
...(0, utils_1.addToArrayIf)(staking_1.STAKING_ASSETS.includes(baseData.symbol), {
|
|
72
78
|
apy: new decimal_js_1.default(yield (0, staking_1.getStakingApy)(baseData.symbol)).mul(-1).toString(),
|
|
73
79
|
token: baseData.symbol,
|
|
74
80
|
incentiveKind: common_1.IncentiveKind.Staking,
|
|
75
|
-
description: `
|
|
76
|
-
})
|
|
81
|
+
description: `Due to the native yield of ${baseData.symbol}, the value of the debt would increase over time.`,
|
|
82
|
+
}),
|
|
83
|
+
],
|
|
77
84
|
});
|
|
78
85
|
});
|
|
79
86
|
exports.getIncentiveApys = getIncentiveApys;
|
|
@@ -60,12 +60,19 @@ export const getIncentiveApys = (baseData, compPrice) => __awaiter(void 0, void
|
|
|
60
60
|
description: `Native ${baseData.symbol} yield.`,
|
|
61
61
|
}),
|
|
62
62
|
],
|
|
63
|
-
borrowIncentives: [
|
|
63
|
+
borrowIncentives: [{
|
|
64
|
+
token: 'COMP',
|
|
65
|
+
apy: aprToApy((100 * SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(),
|
|
66
|
+
incentiveKind: IncentiveKind.Reward,
|
|
67
|
+
description: 'Eligible for protocol-level COMP incentives.',
|
|
68
|
+
},
|
|
69
|
+
...addToArrayIf(STAKING_ASSETS.includes(baseData.symbol), {
|
|
64
70
|
apy: new Dec(yield getStakingApy(baseData.symbol)).mul(-1).toString(),
|
|
65
71
|
token: baseData.symbol,
|
|
66
72
|
incentiveKind: IncentiveKind.Staking,
|
|
67
|
-
description: `
|
|
68
|
-
})
|
|
73
|
+
description: `Due to the native yield of ${baseData.symbol}, the value of the debt would increase over time.`,
|
|
74
|
+
}),
|
|
75
|
+
],
|
|
69
76
|
});
|
|
70
77
|
});
|
|
71
78
|
export const getCompoundV2AggregatedData = (_a) => {
|
package/package.json
CHANGED
|
@@ -105,13 +105,14 @@ export const getIncentiveApys = async (
|
|
|
105
105
|
apy: aprToApy((100 * SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(),
|
|
106
106
|
incentiveKind: IncentiveKind.Reward,
|
|
107
107
|
description: 'Eligible for protocol-level COMP incentives.',
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
}
|
|
108
|
+
},
|
|
109
|
+
...addToArrayIf(STAKING_ASSETS.includes(baseData.symbol), {
|
|
110
|
+
apy: new Dec(await getStakingApy(baseData.symbol)).mul(-1).toString(),
|
|
111
|
+
token: baseData.symbol,
|
|
112
|
+
incentiveKind: IncentiveKind.Staking,
|
|
113
|
+
description: `Due to the native yield of ${baseData.symbol}, the value of the debt would increase over time.`,
|
|
114
|
+
}),
|
|
115
|
+
],
|
|
115
116
|
});
|
|
116
117
|
|
|
117
118
|
export const getCompoundV2AggregatedData = ({
|