@stake-dao/reader 0.4.17 → 0.4.19

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stake-dao/reader",
3
3
  "description": "",
4
- "version": "0.4.17",
4
+ "version": "0.4.19",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
7
7
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "graphql-request": "^6.0.0",
36
36
  "lodash-es": "^4.17.21",
37
37
  "viem": "^2.9.31",
38
- "@stake-dao/constants": "0.4.10"
38
+ "@stake-dao/constants": "0.4.11"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/lodash-es": "^4.17.12"
@@ -158,9 +158,9 @@ export const fetchCurve = async ({
158
158
  const streaming = periodFinish > Math.floor(Date.now() / 1000)
159
159
 
160
160
  const rewardApr =
161
- streaming && rewardPrice && tvl > 0
161
+ streaming && rewardPrice
162
162
  ? (Number(formatUnits(r.rate * BigInt(ONE_YEAR), 18)) * rewardPrice.usdPrice) /
163
- tvl /
163
+ (tvl > 0 ? tvl : 1) /
164
164
  (equalTlc(rewardToken.symbol, 'SDT') ? 2.5 : 1)
165
165
  : 0
166
166
 
@@ -95,7 +95,7 @@ export const getPancakeV3Vaults = async (
95
95
  let tvl = 0
96
96
  let boost = 2
97
97
  const poolPositionData = positionsData.filter((p) => Number(p.pid) === strat.poolId)
98
- const fees24H = ((feesApr[strat.pool.toLowerCase()]?.volumeUSD24h || 0) * strat.fee) / 10000
98
+ const fees24H = ((feesApr[strat.pool.toLowerCase()]?.volumeUSD24h || 0) * strat.fee) / 1000000
99
99
 
100
100
  const positions = poolPositionData.map((p) => {
101
101
  const computedPositionData = computePositionData(