generated from mitosis-org/protocol-dapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Add xMorseRewardFeed contract and integrate epoch-based reward system #8
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
Open
riemannulus
wants to merge
9
commits into
main
Choose a base branch
from
feat/xMorseStakingV2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
riemannulus
commented
Oct 28, 2025
- Introduced xMorseRewardFeed contract to manage epoch-based rewards for xMorse staking.
- Implemented storage separation following the ValidatorContributionFeed pattern.
- Added functions for initializing, finalizing, and revoking epoch rewards.
- Integrated with IEpochFeeder for epoch management and reward distribution.
- Updated xMorseStaking contract to support new reward feed functionalities and modified staking logic for epoch tracking.
- Created interfaces for xMorseRewardFeed and updated related tests to ensure functionality and correctness.
- Introduced xMorseRewardFeed contract to manage epoch-based rewards for xMorse staking. - Implemented storage separation following the ValidatorContributionFeed pattern. - Added functions for initializing, finalizing, and revoking epoch rewards. - Integrated with IEpochFeeder for epoch management and reward distribution. - Updated xMorseStaking contract to support new reward feed functionalities and modified staking logic for epoch tracking. - Created interfaces for xMorseRewardFeed and updated related tests to ensure functionality and correctness.
b60b08c to
55420b7
Compare
- Added comprehensive section on xMorseStaking V2, detailing the epoch-based rewards system and its components. - Included diagrams illustrating the architecture and weekly reward cycle for better understanding. - Highlighted key improvements and security enhancements in V2, emphasizing transparency and decentralization. - Provided a usage guide with contract addresses and step-by-step instructions for staking and claiming rewards.
…h-based reward distribution - Introduced `DeploySimpleEpochFeeder` script to deploy the EpochFeeder contract for managing epoch timing. - Added `DeployxMorseRewardFeed` script to deploy the xMorseRewardFeed contract, integrating it with the EpochFeeder for reward distribution. - Created `FeedEpochRewards` script for automated feeding of epoch rewards, detailing the process for claiming and distributing rewards. - Enhanced logging throughout the scripts for better visibility during deployment and execution. - Included error handling for missing addresses and ensured proper configuration for both Dognet and Mainnet environments. - Updated documentation to reflect new deployment processes and usage instructions for the scripts.
…distribution - Introduced xMorseStakingV2 contract for NFT staking with time-weighted average balance (TWAB) tracking. - Added xMorseContributionFeed and xMorseRewardDistributor contracts to manage epoch-based contributions and reward distribution. - Enhanced deployment configurations and updated addresses.yaml for new contract addresses and features. - Implemented comprehensive testing for new functionalities, ensuring correct behavior of staking, contribution feeding, and reward claiming. - Updated documentation to reflect the new architecture and usage instructions for the xMorse protocol.
- Upgraded xMorseStakingV2 and xMorseRewardDistributor contracts to version 2.1.0, focusing on pure NFT staking and improved reward distribution. - Introduced validator configuration storage and functions for managing validator rewards. - Removed deprecated validator-related functions from xMorseStakingV2, streamlining the contract architecture. - Added comprehensive upgrade notes and enhanced testing for new functionalities, ensuring robust behavior in the updated system. - Updated addresses-dognet.yaml to reflect new implementations and deployment details.
- Introduced mapping for total rewards per epoch in xMorseRewardDistributorStorageV1. - Implemented getEpochReward and setEpochReward functions in xMorseRewardDistributor for retrieving and setting epoch rewards. - Updated ValidatorRewardsClaimed event to include epoch information for better tracking of claimed rewards. - Enhanced internal reward calculation to utilize epoch-specific rewards, improving accuracy in reward distribution.
- Added mint function for owner to mint tokens, linking 1 NFT to 10^decimals tokens. - Introduced approveNFT and batchApprove functions for single and multiple NFT approvals. - Implemented token enumeration functions: tokenByIndex, tokenOfOwnerByIndex, and tokensOfOwner for better NFT management. - Added supportsInterface function to check for interface support, enhancing contract interoperability. - Updated xMorseContributionFeed and xMorseRewardDistributor to accommodate changes in data types for weight and rewards.
taeguk
approved these changes
Nov 27, 2025
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a quick look. lgtm.
- Integrated AccessControlUpgradeable to manage roles within xMorseRewardDistributor. - Introduced CLAIMER_ROLE for claiming validator rewards, enhancing security and flexibility. - Updated initialization functions to grant roles to the initial owner and added a reinitializer for V2 upgrades. - Modified claimFromValidator function to restrict access to users with the CLAIMER_ROLE, ensuring proper authorization. - Improved documentation and comments for clarity on new functionalities and role management.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.