csm-dashboard 0.3.6__py3-none-any.whl → 0.3.6.1__py3-none-any.whl
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.
- {csm_dashboard-0.3.6.dist-info → csm_dashboard-0.3.6.1.dist-info}/METADATA +1 -1
- {csm_dashboard-0.3.6.dist-info → csm_dashboard-0.3.6.1.dist-info}/RECORD +6 -6
- src/services/operator_service.py +11 -9
- src/web/app.py +1 -1
- {csm_dashboard-0.3.6.dist-info → csm_dashboard-0.3.6.1.dist-info}/WHEEL +0 -0
- {csm_dashboard-0.3.6.dist-info → csm_dashboard-0.3.6.1.dist-info}/entry_points.txt +0 -0
|
@@ -23,11 +23,11 @@ src/data/onchain.py,sha256=2eLGAI0URz1JuNZi2JmLWN-h_UDfkDlbT30rXpoqbts,25252
|
|
|
23
23
|
src/data/rewards_tree.py,sha256=a-MO14b4COjOvy59FPd0jaf1dkgidlqCQKAFDinwRJU,1894
|
|
24
24
|
src/data/strikes.py,sha256=b68exKntZpzjiEBftiI3AcvEclHp7vg5lsOiG2a7Kzo,9046
|
|
25
25
|
src/services/__init__.py,sha256=MC7blFLAMazErCWuyYXvS6sO3uZm1z_RUOtnlIK0kSo,38
|
|
26
|
-
src/services/operator_service.py,sha256=
|
|
26
|
+
src/services/operator_service.py,sha256=KkuWihW8sRuDf7rvSnFLeqWysg4YoMlHI1ZVSOBBHO0,30234
|
|
27
27
|
src/web/__init__.py,sha256=iI2c5xxXmzsNxIetm0P2qE3uVsT-ClsMfzn620r5YTU,40
|
|
28
|
-
src/web/app.py,sha256=
|
|
28
|
+
src/web/app.py,sha256=rXXoqNZVBAtLu5QW3QebeQdS7zj0DmY2m_hub-Rvkh4,47946
|
|
29
29
|
src/web/routes.py,sha256=UydCD7DMWBYv_lbQQjeHI82l8gLZkZ2lEy4OayPxNiU,10716
|
|
30
|
-
csm_dashboard-0.3.6.dist-info/METADATA,sha256=
|
|
31
|
-
csm_dashboard-0.3.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
32
|
-
csm_dashboard-0.3.6.dist-info/entry_points.txt,sha256=P1Ul8ALIPBwDlVlXqTPuzJ64xxRpIJsYW8U73Tyjgtg,37
|
|
33
|
-
csm_dashboard-0.3.6.dist-info/RECORD,,
|
|
30
|
+
csm_dashboard-0.3.6.1.dist-info/METADATA,sha256=ieTgZaq6G73b9xHLpEYmpmp9DQlN7hUDk7dy_hugzug,12554
|
|
31
|
+
csm_dashboard-0.3.6.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
32
|
+
csm_dashboard-0.3.6.1.dist-info/entry_points.txt,sha256=P1Ul8ALIPBwDlVlXqTPuzJ64xxRpIJsYW8U73Tyjgtg,37
|
|
33
|
+
csm_dashboard-0.3.6.1.dist-info/RECORD,,
|
src/services/operator_service.py
CHANGED
|
@@ -279,22 +279,16 @@ class OperatorService:
|
|
|
279
279
|
steth_data = await self.lido_api.get_steth_apr()
|
|
280
280
|
bond_apy = steth_data.get("apr")
|
|
281
281
|
|
|
282
|
-
# 3. Net APY calculations
|
|
282
|
+
# 3. Net APY calculations (initialized here, calculated after historical APR section)
|
|
283
283
|
net_apy_28d = None
|
|
284
284
|
net_apy_ltd = None
|
|
285
285
|
|
|
286
|
-
# Current frame net APY (historical_reward_apy_28d is basically current frame APY)
|
|
287
|
-
if historical_reward_apy_28d is not None and bond_apy is not None:
|
|
288
|
-
net_apy_28d = round(historical_reward_apy_28d + bond_apy, 2)
|
|
289
|
-
elif bond_apy is not None:
|
|
290
|
-
net_apy_28d = round(bond_apy, 2)
|
|
291
|
-
|
|
292
286
|
# Lifetime net APY - intentionally NOT calculated
|
|
293
287
|
# (same reason as historical_reward_apy_ltd - can't accurately calculate without historical bond)
|
|
294
288
|
# net_apy_ltd remains None
|
|
295
289
|
|
|
296
|
-
#
|
|
297
|
-
#
|
|
290
|
+
# Current frame net APY and Previous frame net APY are calculated in section 4b/4c
|
|
291
|
+
# after we have historical APR values (current_bond_apr, previous_bond_apy)
|
|
298
292
|
|
|
299
293
|
# 4. Calculate bond stETH earnings (from stETH rebasing)
|
|
300
294
|
# Formula: bond_eth * (apr / 100) * (duration_days / 365)
|
|
@@ -431,6 +425,14 @@ class OperatorService:
|
|
|
431
425
|
if prev_bond_apy_to_use is not None:
|
|
432
426
|
previous_net_apy = round(previous_distribution_apy + prev_bond_apy_to_use, 2)
|
|
433
427
|
|
|
428
|
+
# 4c. Current frame net APY (using historical APR when available, like previous frame)
|
|
429
|
+
if historical_reward_apy_28d is not None:
|
|
430
|
+
curr_bond_apy_to_use = current_bond_apr if current_bond_apr is not None else bond_apy
|
|
431
|
+
if curr_bond_apy_to_use is not None:
|
|
432
|
+
net_apy_28d = round(historical_reward_apy_28d + curr_bond_apy_to_use, 2)
|
|
433
|
+
elif bond_apy is not None:
|
|
434
|
+
net_apy_28d = round(bond_apy, 2)
|
|
435
|
+
|
|
434
436
|
# 5. Calculate net totals (Rewards + Bond)
|
|
435
437
|
if previous_distribution_eth is not None or previous_bond_eth is not None:
|
|
436
438
|
previous_net_total_eth = round(
|
src/web/app.py
CHANGED
|
File without changes
|
|
File without changes
|