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

[MEX-514] compute user boosted apr #1457

Merged
merged 8 commits into from
Sep 11, 2024

Conversation

claudiulataretu
Copy link
Collaborator

Reasoning

  • move compute for user current boosted APR and maximum boosted APR in backend side

Proposed Changes

  • added new fields currentBoostedAPR and maximumBoostedAPR for BoostedRewardsModel
  • updated computes methods in farm and staking for current and maximum boosted APR specific for users
  • added options to put arbitrary values for user farm amount and energy to compute APRs

How to test

query StakingBoostedRewards {
    getStakingBoostedRewardsBatch(
        stakingAddresses: [
            "erd1qqqqqqqqqqqqqpgqcedkmj8ezme6mtautj79ngv7fez978le2jps8jtawn"
        ]
    ) {
        curentBoostedAPR(
            additionalUserFarmAmount: <amount(can be negative)>
            additionalUserEnergy: <amount(can be negative)>
        )
        maximumBoostedAPR(
            additionalUserFarmAmount: <amount(can be negative)>    
        )
    }
}

@mad2sm0key mad2sm0key self-requested a review September 11, 2024 05:30
@claudiulataretu claudiulataretu merged commit 7a7f65f into feat/xexchange-v3 Sep 11, 2024
1 check failed
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.

3 participants