Skip to content

fix x/stats GetStakedAmount and rename to GetStakedBaseTokens (backport #3238)#3239

Merged
tqin7 merged 1 commit intorelease/protocol/v9.xfrom
mergify/bp/release/protocol/v9.x/pr-3238
Oct 30, 2025
Merged

fix x/stats GetStakedAmount and rename to GetStakedBaseTokens (backport #3238)#3239
tqin7 merged 1 commit intorelease/protocol/v9.xfrom
mergify/bp/release/protocol/v9.x/pr-3238

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Oct 30, 2025

Changelist

Need to convert delegator shares to tokens to get staked tokens

Test Plan

updated unit test

  • failed with original implementation (that didn't have this conversion)
  • succeeded with new

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If the PR has breaking postgres changes to the indexer add the indexer-postgres-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Summary by CodeRabbit

  • Refactor
    • Updated staking calculation system to use base token amounts instead of raw staked amounts, improving accuracy of staking-based fee tier discounts and affiliate rewards.
    • Renamed related APIs and types across stats, fee tiers, and affiliates modules for consistency.
    • Added timestamp tracking for cached base token calculations.

This is an automatic backport of pull request #3238 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner October 30, 2025 22:52
@mergify mergify bot assigned tqin7 Oct 30, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@tqin7 tqin7 merged commit e40fc8c into release/protocol/v9.x Oct 30, 2025
40 of 41 checks passed
@tqin7 tqin7 deleted the mergify/bp/release/protocol/v9.x/pr-3238 branch October 30, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant

Comments