Skip to content

Commit

Permalink
chore: update vars
Browse files Browse the repository at this point in the history
  • Loading branch information
kgarbacinski committed Sep 23, 2024
1 parent 1d427b1 commit e5609fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions backend/app/modules/octant_rewards/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from app.engine.octant_rewards.operational_cost import OperationalCostPayload
from app.engine.octant_rewards.ppf import PPFPayload
from app.engine.octant_rewards.total_and_individual import TotalAndAllIndividualPayload
from app.modules.staking.proceeds.core import ESTIMATED_STAKING_APR
from app.modules.staking.proceeds.core import ESTIMATED_STAKING_REWARDS_RATE


@dataclass
Expand Down Expand Up @@ -73,5 +73,5 @@ def get_rewards_rate(_: int) -> float:
"""
Returns the rewards rate for the given epoch.
"""
# TODO APR is a static value for now but it may be calculated dynamically in the future: https://linear.app/golemfoundation/issue/OCT-1916/make-apr-a-dynamically-computed-one
return ESTIMATED_STAKING_APR
# TODO Staking Rewards Rate is a static value for now but it may be calculated dynamically in the future: https://linear.app/golemfoundation/issue/OCT-1916/make-apr-a-dynamically-computed-one
return ESTIMATED_STAKING_REWARDS_RATE
4 changes: 2 additions & 2 deletions backend/app/modules/staking/proceeds/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
ESTIMATED_STAKED_AMOUNT = 100000_000000000_000000000

# TODO call an API to get a real value instead of hardcoding: https://linear.app/golemfoundation/issue/OCT-902/api-call-to-get-validators-api
ESTIMATED_STAKING_APR = 0.038
ESTIMATED_STAKING_REWARDS_RATE = 0.038


def estimate_staking_proceeds(
epoch_duration_sec: int,
staked_amount=ESTIMATED_STAKED_AMOUNT,
apr=ESTIMATED_STAKING_APR,
apr=ESTIMATED_STAKING_REWARDS_RATE,
) -> int:
if epoch_duration_sec <= 0:
return 0
Expand Down
4 changes: 2 additions & 2 deletions backend/tests/modules/octant_rewards/test_apr_core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from app.modules.octant_rewards.core import get_rewards_rate
from app.modules.staking.proceeds.core import ESTIMATED_STAKING_APR
from app.modules.staking.proceeds.core import ESTIMATED_STAKING_REWARDS_RATE


@pytest.fixture(autouse=True)
Expand All @@ -12,6 +12,6 @@ def before(app):
@pytest.mark.parametrize("epoch_num", [1, 2, 3, 4, 5])
def test_get_epoch_rewards_rate_return_valid_value(epoch_num: int):
actual_result = get_rewards_rate(epoch_num)
expected_result = ESTIMATED_STAKING_APR
expected_result = ESTIMATED_STAKING_REWARDS_RATE

assert actual_result == expected_result

0 comments on commit e5609fa

Please sign in to comment.