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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csm-dashboard
3
- Version: 0.3.6
3
+ Version: 0.3.6.1
4
4
  Summary: Lido CSM Operator Dashboard for tracking validator earnings
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: fastapi>=0.104
@@ -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=xncq7Z3DDUcr8cohcehvL9nqaONRUPRuvjBliEGYNd8,29985
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=AvNKmY6mNRDQaHQLDaLmf9LJxtcB0Mc-YG83XyJ7K9g,47944
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=7rgyMM56MfOPeTBY4M8TitFJOPMT70SuxqHMQhxGIwA,12552
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,,
@@ -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
- # Previous frame net APY calculation is moved after we know previous_bond_apy
297
- # (calculated in section 4 below)
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
@@ -14,7 +14,7 @@ def create_app() -> FastAPI:
14
14
  app = FastAPI(
15
15
  title="CSM Operator Dashboard",
16
16
  description="Track your Lido CSM validator earnings",
17
- version="0.3.6",
17
+ version="0.3.6.1",
18
18
  )
19
19
 
20
20
  app.include_router(router, prefix="/api")