Skip to content

Commit

Permalink
Set Predictoor First Date to Week Start (#758)
Browse files Browse the repository at this point in the history
* Set Predictoor First Date to Week Start

* Update volume calc tests

* Fix predictoor start week
  • Loading branch information
trizin authored Nov 16, 2023
1 parent 178af95 commit f89a5af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions df_py/challenge/test/test_challenge_calc_rewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_calc_challenge_rewards():
"0xfrom3",
]

rewards = calc_challenge_rewards(from_addrs)
rewards = calc_challenge_rewards(from_addrs, datetime(2023, 10, 15))

assert len(rewards) == 3
assert rewards[0]["OCEAN_amt"] == 2500
Expand Down Expand Up @@ -44,7 +44,7 @@ def test_calc_challenge_rewards_one_day_before_predictoor():
"0xfrom3",
]

pre_predictoor = datetime(2023, 11, 15)
pre_predictoor = datetime(2023, 11, 8)
rewards = calc_challenge_rewards(from_addrs, at_date=pre_predictoor)

assert len(rewards) == 3
Expand All @@ -60,7 +60,7 @@ def test_calc_challenge_rewards_predictoor_launch():
"0xfrom3",
]

post_predictoor = datetime(2023, 11, 16)
post_predictoor = datetime(2023, 11, 9)
rewards = calc_challenge_rewards(from_addrs, at_date=post_predictoor)

assert len(rewards) == 3
Expand Down
4 changes: 2 additions & 2 deletions df_py/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
23294: ["0x4ac2e51f9b1b0ca9e000dfe6032b24639b172703"],
23295: ["0xe02a421dfc549336d47efee85699bd0a3da7d6ff"],
}
PREDICTOOR_RELEASE_WEEK = 63
PREDICTOOR_RELEASE_WEEK = 62
PREDICTOOR_MULTIPLIER = 0.201
PREDICTOOR_OCEAN_BUDGET = 37_000
PREDICTOOR_DF_FIRST_DATE = datetime(2023, 11, 16)
PREDICTOOR_DF_FIRST_DATE = datetime(2023, 11, 9)

# challenge
CHALLENGE_FIRST_DATE = datetime(2023, 7, 27) # First round start date of Challenge DF
6 changes: 3 additions & 3 deletions df_py/util/test/test_vesting_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_get_active_reward_amount_for_week_eth_by_stream():

def test_launch_dates():
# a week before predictoor's launch
start_dt = datetime(2023, 11, 9)
start_dt = datetime(2023, 11, 2)
predictoor_rewards = (
vesting_schedule.get_active_reward_amount_for_week_eth_by_stream(
start_dt, predictoor_substream, networkutil.DEV_CHAINID
Expand All @@ -119,8 +119,8 @@ def test_launch_dates():
total_rewards = vesting_schedule.get_active_reward_amount_for_week_eth(start_dt)
assert total_rewards == predictoor_rewards + volume_rewards + challenge_rewards

# predictoor's launched - reward distribution day
start_dt = datetime(2023, 11, 16)
# predictoor's launch
start_dt = datetime(2023, 11, 9)
predictoor_rewards = (
vesting_schedule.get_active_reward_amount_for_week_eth_by_stream(
start_dt, predictoor_substream, networkutil.DEV_CHAINID
Expand Down

0 comments on commit f89a5af

Please sign in to comment.