Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 9b0c464

Browse files
committed
add cutoff date for backfill scan
1 parent 3c3b92f commit 9b0c464

3 files changed

Lines changed: 66 additions & 10 deletions

File tree

backfill_recon_aura_split.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
INCENTIVES_DIR = PROJECT_ROOT / "fee_allocator" / "allocations" / "incentives"
1515
BRIBES_DIR = PROJECT_ROOT / "fee_allocator" / "allocations" / "output_for_msig"
1616

17+
STAKEDAO_MIGRATION_PERIOD_START = 1767225600
18+
1719

1820
def _ts_to_date_str(ts: int) -> str:
1921
return datetime.datetime.fromtimestamp(ts, tz=datetime.timezone.utc).strftime("%Y-%m-%d")
@@ -36,7 +38,7 @@ def _load_gauge_data_from_bribe_csv(csv_path: Path) -> pd.DataFrame:
3638
bribe_rows = bribe_rows[bribe_rows["amount"] > 0].copy()
3739
if bribe_rows.empty:
3840
return None
39-
bribe_rows = bribe_rows.rename(columns={"target": "gauge_address"})
41+
bribe_rows = bribe_rows.rename(columns={"target": "gauge_address", "amount": "total_incentives"})
4042
if "voting_pool_override" not in bribe_rows.columns:
4143
bribe_rows["voting_pool_override"] = ""
4244
bribe_rows["voting_pool_override"] = bribe_rows["voting_pool_override"].fillna("")
@@ -89,10 +91,24 @@ def backfill(dry_run: bool = False):
8991

9092
modified = False
9193
for entry in data:
94+
if entry["periodStart"] < STAKEDAO_MIGRATION_PERIOD_START:
95+
continue
96+
9297
total_incentives = _get_total_incentives(entry)
9398
aura_incentives = entry.get("auraIncentives", 0) or 0
99+
bal_incentives = entry.get("balIncentives", 0) or 0
100+
101+
if (aura_incentives + bal_incentives) != 0:
102+
continue
94103

95-
if aura_incentives != 0 or total_incentives == 0:
104+
if total_incentives == 0:
105+
if "auraIncentives" not in entry:
106+
entry["auraIncentives"] = 0.0
107+
entry["balIncentives"] = 0.0
108+
entry["auravebalShare"] = 0
109+
entry["auraIncentivesPct"] = 0.0
110+
entry["balIncentivesPct"] = 0.0
111+
modified = True
96112
continue
97113

98114
period_start = entry["periodStart"]

fee_allocator/summaries/v2_recon.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,12 @@
429429
"createdAt": 1768484870,
430430
"periodStart": 1767225600,
431431
"periodEnd": 1768435200,
432-
"bribeThreshold": 490
432+
"bribeThreshold": 490,
433+
"auraIncentives": 0.0,
434+
"balIncentives": 0.0,
435+
"auravebalShare": 0,
436+
"auraIncentivesPct": 0.0,
437+
"balIncentivesPct": 0.0
433438
},
434439
{
435440
"feesCollected": 17576.73,
@@ -450,7 +455,12 @@
450455
"createdAt": 1769701777,
451456
"periodStart": 1768435200,
452457
"periodEnd": 1769644800,
453-
"bribeThreshold": 490
458+
"bribeThreshold": 490,
459+
"auraIncentives": 0.0,
460+
"balIncentives": 0.0,
461+
"auravebalShare": 0,
462+
"auraIncentivesPct": 0.0,
463+
"balIncentivesPct": 0.0
454464
},
455465
{
456466
"feesCollected": 31650.06,
@@ -471,7 +481,12 @@
471481
"createdAt": 1770995647,
472482
"periodStart": 1769644800,
473483
"periodEnd": 1770854400,
474-
"bribeThreshold": 390
484+
"bribeThreshold": 390,
485+
"auraIncentives": 0.0,
486+
"balIncentives": 410.32,
487+
"auravebalShare": 0.0,
488+
"auraIncentivesPct": 0.0,
489+
"balIncentivesPct": 0.013
475490
},
476491
{
477492
"feesCollected": 18497.17,
@@ -492,6 +507,11 @@
492507
"createdAt": 1772132372,
493508
"periodStart": 1770854400,
494509
"periodEnd": 1772064000,
495-
"bribeThreshold": 410
510+
"bribeThreshold": 410,
511+
"auraIncentives": 0.0,
512+
"balIncentives": 0.0,
513+
"auravebalShare": 0,
514+
"auraIncentivesPct": 0.0,
515+
"balIncentivesPct": 0.0
496516
}
497517
]

fee_allocator/summaries/v3_recon.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,12 @@
429429
"createdAt": 1768484931,
430430
"periodStart": 1767225600,
431431
"periodEnd": 1768435200,
432-
"bribeThreshold": 490
432+
"bribeThreshold": 490,
433+
"auraIncentives": 0.0,
434+
"balIncentives": 11025.66,
435+
"auravebalShare": 0.0,
436+
"auraIncentivesPct": 0.0,
437+
"balIncentivesPct": 0.398
433438
},
434439
{
435440
"feesCollected": 26068.38,
@@ -450,7 +455,12 @@
450455
"createdAt": 1769701824,
451456
"periodStart": 1768435200,
452457
"periodEnd": 1769644800,
453-
"bribeThreshold": 490
458+
"bribeThreshold": 490,
459+
"auraIncentives": 4111.32,
460+
"balIncentives": 9761.36,
461+
"auravebalShare": 0.3,
462+
"auraIncentivesPct": 0.1577,
463+
"balIncentivesPct": 0.3745
454464
},
455465
{
456466
"feesCollected": 42204.24,
@@ -471,7 +481,12 @@
471481
"createdAt": 1770995685,
472482
"periodStart": 1769644800,
473483
"periodEnd": 1770854400,
474-
"bribeThreshold": 390
484+
"bribeThreshold": 390,
485+
"auraIncentives": 5957.27,
486+
"balIncentives": 12529.01,
487+
"auravebalShare": 0.32,
488+
"auraIncentivesPct": 0.1412,
489+
"balIncentivesPct": 0.2969
475490
},
476491
{
477492
"feesCollected": 24064.52,
@@ -492,6 +507,11 @@
492507
"createdAt": 1772132433,
493508
"periodStart": 1770854400,
494509
"periodEnd": 1772064000,
495-
"bribeThreshold": 410
510+
"bribeThreshold": 410,
511+
"auraIncentives": 5496.92,
512+
"balIncentives": 5487.9,
513+
"auravebalShare": 0.5,
514+
"auraIncentivesPct": 0.2284,
515+
"balIncentivesPct": 0.228
496516
}
497517
]

0 commit comments

Comments
 (0)