From db1c94edde8bc0982b075431307816dc9fd5f390 Mon Sep 17 00:00:00 2001 From: Cody Butz Date: Sun, 1 Dec 2024 13:12:08 -0500 Subject: [PATCH] iSOL Distirbution --- .DS_Store | Bin 8196 -> 0 bytes indy_rewards/config.py | 1 + indy_rewards/models.py | 1 + indy_rewards/sp/distribution.py | 18 +++++++++++++++--- 4 files changed, 17 insertions(+), 3 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 4f59de6cc2fa06e754a1bd0bc202e975da0da002..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMU2GIp6u#fIzzh>%s4XqnVOLgYZE0L8;1621f3by@f^F>&KV^4kY$r}<%FgVT zYBcpp1U2zRqoTeU^#L_nqP{9o6XOG^M0pWo;uA0a;e(0s+_|$YrSwtL$lT=KZ_c^r z+`IS8cka!dWsIREZ)|6*iZLcr<*2FD+@SD&UKbT9)RYi{{8^zjW4jr~N_sOBi>xC> z6oDuLQ3Rq0L=lK0upA;lXErbL66e0?joK&zQ3P(v2=M(OPL*RS#A$)S)F!kzT-&@L6?v_Rp`5MDkI&W!Mef?#$UKOUGf zqy$E76oDuLizC4A?j@|i(ky3t*WTZ4%kz`TOOQ%RSFBtmE2~xY7JXoFX!y|K5lzc` z=EJ6)_N{{1miA3=L|f~Pxs#n)*Ex_g3zj)Kkag|+xI;bbvS~Y;Cu6hOwtKC|g>^RP z+V%n0vwX{Sh6a7}gwOl}Ww(TsjOoiS}OntK0kQtcZk zh!uy*iaoM2n03d;X)#_nZEKq>YhNDa6L+OOzh}a9=6+IZhb#|!W9gjPGwGPQqDPl3 z2d|Oz+@;;Hd^Z^%F1U1XQp z&+HfWEBlRIWq+X*t5J?>Y(WibaVHvaH+EnbTG54W?8h*&FkoU7Hu5N75>t2z&)_7U z#c8~VSMeIo;0?Tm_wYVGz^C{OpW{5fz(xFk%lHvj@CUBqPf3x=q-sf*Hc2&7tyCw~ zOHI-qsY5y_4ND`^m{@@no=@z^!j(x=B+n<>g!oVS%g?0YlvwQ<){#ou|`!Zp$t?4-<`1rRf8;q z`_$d4R!X@j#3prbV4yTHC9j$a{;|BVvJs6-rFkt9wxA%$kN zp`Cbr00+^FJ{-Xajv+%Vx8cCWapdp>o+OS><7u42b9f#v;AOl*Oh1FyiRW+Q9lVPV zF@tmX7@q`;{~F)o5`Mal!`%xxjNj)uT dict[IAsset, float]: + if day >= datetime.date(2024, 11, 26): + return { + IAsset.from_str("ibtc"): (2469.29 / 19664.35), + IAsset.from_str("ieth"): (1504.89 / 19664.35), + IAsset.from_str("iusd"): (14690.17 / 19664.35), + IAsset.from_str("isol"): (1000.00 / 19664.35), + } if day >= datetime.date(2024, 7, 14): return { IAsset.from_str("ibtc"): (2469.29 / 18664.35), @@ -334,6 +341,11 @@ def _get_unique_iassets(accounts: list[dict]) -> set[IAsset]: def _is_at_least_24h_old(account: dict, snapshot_day: datetime.date) -> bool: + """Ignore iSOL accounts opened before 2024-11-27 (first day of asset + whitelisting).""" + if snapshot_day < datetime.date(2024, 11, 27) and account["asset"] == "iSOL": + return True + """Returns whether the SP account was opened within 24h relative to the snapshot.""" snap = time_utils.get_snapshot_time(snapshot_day) open = datetime.datetime.utcfromtimestamp(account["opened_at"]).replace( @@ -343,6 +355,9 @@ def _is_at_least_24h_old(account: dict, snapshot_day: datetime.date) -> bool: def sp_epoch_emission(epoch: int) -> float: + if epoch >= 524: + return 19664.35 + if epoch >= 497: return 18664.35 @@ -353,9 +368,6 @@ def sp_epoch_emission(epoch: int) -> float: def gov_epoch_emission(epoch: int) -> float: - if epoch >= 524: - return 5315 - if epoch >= 488: return 6046.11