Description
The FarmingPool's calculate_credits and get_credits functions have overlapping functionality. calculate_credits is for Position-based staking, get_credits is for UserStake-based staking. The naming is confusing.
Current behavior
calculate_credits(user): returns credits for Position
get_credits(user): returns credits for UserStake
Expected behavior
Either:
- Rename to
get_position_credits and get_stake_credits
- Or merge into a single function that handles both
- Or document the distinction clearly
Why this matters
Developers may call the wrong function and get unexpected results.
Labels
documentation, farming-pool, good first issue
Description
The FarmingPool's
calculate_creditsandget_creditsfunctions have overlapping functionality.calculate_creditsis for Position-based staking,get_creditsis for UserStake-based staking. The naming is confusing.Current behavior
calculate_credits(user): returns credits for Positionget_credits(user): returns credits for UserStakeExpected behavior
Either:
get_position_creditsandget_stake_creditsWhy this matters
Developers may call the wrong function and get unexpected results.
Labels
documentation, farming-pool, good first issue