Skip to content

Confusing naming: calculate_credits vs get_credits for different staking systems #190

Description

@ritaifeoluwa

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdocumentationImprovements or additions to documentationfarming-poolFarmingPool contractgood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions