feat: content curation vote, reputation decay, validator rewards, NFT fractionalization - #349
Merged
Rickyy1017 merged 2 commits intoJul 29, 2026
Conversation
… fractionalization - Content curation: stake-weighted voting on off-chain content items with submit, vote, close, and read-only queries (max 100 open items) - Reputation decay: time-based score reduction for inactive stakers with admin-configurable decay rate and epoch length - Validator rewards: validator node integration with deposit, proportional distribution, and separate claim path - NFT fractionalization: split NFT receipt into fungible fraction tokens, position locked until all fractions returned for reconstruction
|
@Joeloo1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
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.
Summary
Implements four new features for the Stellar DeFi Vault:
Content Curation Voting — Stake-weighted voting on off-chain content items (identified by hash). Stakers submit, vote (weight = staked amount), and admin closes voting. Max 100 open items, one vote per address per item.
Reputation Decay — Time-based decay mechanism for reputation scores. Scores gradually decrease when stakers are inactive. Admin-configurable decay rate (bps per epoch) and epoch length. Decay applied lazily via
get_reputation_score.Validator Rewards — Integration layer for Stellar validator nodes. Validator rewards are deposited separately, distributed proportionally to stakers by position size, and claimed via a dedicated path. Separate from base staking rewards.
NFT Fractionalization — Splits NFT receipt into N fungible fraction tokens (2–1000). Position is locked while fractionalized — unstake blocked until all fractions returned and NFT reconstructed.
Acceptance Criteria
Content Curation (Issue #295)
ContentItemstruct with all required fieldssubmit_content(user, content_hash)— max 100 open itemsvote_on_content(user, content_hash, approve)— weight = position.amountclose_content_vote(admin, content_hash)— admin closes votingget_content_item(hash)/get_all_content_items()read-only queriescontent_approvedevent when votes_for > votes_against on closeReputation Decay (Issue #296)
set_reputation_decay_rate(admin, decay_bps_per_epoch, epoch_ledgers)get_reputation_decay_config()read-only queryapply_reputation_decay(user)public functionget_reputation_scoreapplies decay lazilyreputation_decayedeventValidator Rewards (Issue #297)
set_validator_node(admin, node_address)/get_validator_node()ValidatorRewardPoolbalance tracked separatelydeposit_validator_rewards(validator_node, amount)— only node can calldistribute_validator_rewards(admin)— proportional to position sizeValidatorRewardBalance(Address)persistent per-userclaim_validator_rewards(user) -> i128validator_rewards_distributedeventNFT Fractionalization (Issue #303)
FractionalizedNFTstruct with owner and total_fractionsfractionalize_nft(user, num_fractions)— min 2, max 1000reconstruct_nft(user)— burns all fractions, restores NFTFractionalRegistrypersistent storagenft_fractionalized/nft_reconstructedeventsCloses #295
Closes #296
Closes #297
Closes #303