Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predictoor 5X Boost #824

Merged
merged 25 commits into from
Mar 27, 2024
Merged

Predictoor 5X Boost #824

merged 25 commits into from
Mar 27, 2024

Conversation

trizin
Copy link
Contributor

@trizin trizin commented Mar 22, 2024

Fixes #822

Changes proposed in this PR:

  • Predictoor 5X Boost

Copy link

codeclimate bot commented Mar 24, 2024

Code Climate has analyzed commit 36d46f2 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 93.1% (0.1% change).

View more on Code Climate.

@trizin trizin marked this pull request as ready for review March 24, 2024 21:22
@trizin trizin requested review from trentmc and alexcos20 March 24, 2024 21:22
Copy link
Member

@trentmc trentmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I proposed a simplifying change. Sorry for the delay.

@trizin are you able to change in time?

If urgent, we can merge this and then put my proposal in afterwards.

df_py/volume/reward_calculator.py Outdated Show resolved Hide resolved
Comment on lines 216 to 233
rewards = perc_at_j * perc_at_ij * self.OCEAN_avail
apy_bound = TARGET_WPY * ocean_locked_ij
dcv_bound = DCV_OCEAN_j * perc_at_ij * multiplier

# check if predictoor asset and apply boost
# NOTE another asset might have the same multiplier value in the future
# Find a better way to check if the asset is a predictoor asset
if multiplier == PREDICTOOR_MULTIPLIER:
# amount of dcv boosted
boosted_dcv = min(OCEAN_boost_limit_predictoor, DCV_OCEAN_j)
# amount of dcv remaining
remaining_dcv = max(0, DCV_OCEAN_j - OCEAN_boost_limit_predictoor)
boosted_reward_bound = boosted_dcv * multiplier * 5 # 5X BOOST
remaining_reward_bound = remaining_dcv * multiplier # Remaining
dcv_bound = (
boosted_reward_bound + remaining_reward_bound
) * perc_at_ij

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Like mentioned above, remove all these changes.)

df_py/volume/test/test_calc_rewards.py Outdated Show resolved Hide resolved
@trizin trizin requested a review from trentmc March 27, 2024 12:45
@trizin
Copy link
Contributor Author

trizin commented Mar 27, 2024

Please ignore the failing Coingecko tests, not related to this PR. Here's the issue for that: #825

Copy link
Member

@trentmc trentmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@trizin trizin merged commit 789f9b3 into main Mar 27, 2024
6 of 7 checks passed
@trizin trizin deleted the issue822-5x-predictoor-boost branch March 27, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement 5x Predictoor Boost for df-py
2 participants