dashboard: hapus TOTAL VEX + perbaiki wrap mobile (V48) ; catatan stats-note dipendekkan (buang perbandingan vexascan) ; formula last_vote 52-pekan (V13/B12) ; image web rebuild + push

This commit is contained in:
proitlab committed 2026-08-07 22:04:25 +07:00
1 parent e9df89aaac
commit 0e83137b5a
8 files changed
+70 -34

No files matched your search

+9 -5
View File
@@ -28,7 +28,8 @@ LIMIT = 500
# Ambang-batas nama akun "0" (kodifikasi uint64 0) pada tabel voters
ZERO_OWNER = '...........q'
# Skala stake (×10000) dan epoch bobot suara Vexanium (1 Jan 2000)
# Skala stake (×10000) dan epoch bobot suara Vexanium (1 Jan 2000,
# block_timestamp_epoch). Eksponen bobot = PEKAN utuh sejak epoch ÷ 52.
VEX_SCALE = 10000
WEIGHT_EPOCH = datetime(2000, 1, 1)
@@ -36,8 +37,11 @@ WEIGHT_EPOCH = datetime(2000, 1, 1)
def derive_last_vote(weight, staked_vex):
"""V13: perkiraan waktu revote terakhir dari rasio bobot/stake.
Vexanium: last_vote_weight = staked_raw × 2^(tahun sejak 2000).
Maka t = log2(last_vote_weight / staked_raw) → tanggal revote.
Vexanium (sistem EOSIO): `last_vote_weight = staked_raw × 2^(pekan/52)`
— eksponen = `int64((now − 2000-01-01) / (86400×7)) / 52.0`, jadi bobot
dikuantisasi ke PEKAN UTUH sejak epoch 2000 (stake2vote). Maka
`t_pekan = round(52 × log2(last_vote_weight / staked_raw))` → tanggal
revote = epoch + t_pekan pekan (kelipatan 7 hari, 00:00:00).
Kembalikan None bila tak bisa dihitung (bobot/stake nol atau tak valid).
"""
staked_raw = staked_vex * VEX_SCALE
@@ -49,8 +53,8 @@ def derive_last_vote(weight, staked_vex):
return None
if ratio <= 0:
return None
t_years = math.log(ratio) / math.log(2)
return (WEIGHT_EPOCH + timedelta(days=t_years * 365.25)).isoformat(timespec='seconds')
t_weeks = round(52 * math.log(ratio) / math.log(2))
return (WEIGHT_EPOCH + timedelta(weeks=t_weeks)).isoformat(timespec='seconds')
def fetch_with_retry(payload, max_retries=3, timeout=30):