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

feat!: add investors module #250

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

hallazzang
Copy link
Contributor

Description

This PR introduces a new module, x/investors, designed to limit the staking rewards allocated to vesting investors.

Closes: MILK-220


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@hallazzang hallazzang self-assigned this Feb 11, 2025
Copy link

github-actions bot commented Feb 11, 2025

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 14, 2025, 10:56 AM

this way we can simplify InitGenesis logic by not re-calculating
validators investors shares.
when investors' vesting periods end, they'll be removed in the begin
blocker anyway
@hallazzang hallazzang marked this pull request as ready for review February 12, 2025 12:13
@RiccardoM
Copy link
Contributor

@hallazzang Can you rebase your changes on top of main please?

@hallazzang hallazzang force-pushed the hallazzang/limit-vesting-acc-rewards-poc branch from b035a69 to 6c4cd3d Compare February 13, 2025 07:32
staking keeper's Unbond already calls BeforeDelegationSharesModified so
calling it inside BeforeDelegationRemoved hook results in decrementing
vesting investor's shares twice
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.

2 participants