Skip to content

feat: content curation vote, reputation decay, validator rewards, NFT fractionalization - #349

Merged
Rickyy1017 merged 2 commits into
Rickyy1017:mainfrom
drips-projects:feat/content-curation-vote
Jul 29, 2026
Merged

feat: content curation vote, reputation decay, validator rewards, NFT fractionalization#349
Rickyy1017 merged 2 commits into
Rickyy1017:mainfrom
drips-projects:feat/content-curation-vote

Conversation

@Joeloo1

@Joeloo1 Joeloo1 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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)

  • ContentItem struct with all required fields
  • submit_content(user, content_hash) — max 100 open items
  • vote_on_content(user, content_hash, approve) — weight = position.amount
  • One vote per address per item — overwrite not allowed
  • close_content_vote(admin, content_hash) — admin closes voting
  • get_content_item(hash) / get_all_content_items() read-only queries
  • content_approved event when votes_for > votes_against on close
  • Tests: vote weight, double vote rejected, close outcome, max items

Reputation Decay (Issue #296)

  • set_reputation_decay_rate(admin, decay_bps_per_epoch, epoch_ledgers)
  • get_reputation_decay_config() read-only query
  • apply_reputation_decay(user) public function
  • get_reputation_score applies decay lazily
  • Score never decays below 0
  • reputation_decayed event
  • Tests: inactive decays, active unchanged, floors at 0, rate 0 disables

Validator Rewards (Issue #297)

  • set_validator_node(admin, node_address) / get_validator_node()
  • ValidatorRewardPool balance tracked separately
  • deposit_validator_rewards(validator_node, amount) — only node can call
  • distribute_validator_rewards(admin) — proportional to position size
  • ValidatorRewardBalance(Address) persistent per-user
  • claim_validator_rewards(user) -> i128
  • validator_rewards_distributed event
  • Tests: deposits, proportional distribution, non-validator rejected, claims

NFT Fractionalization (Issue #303)

  • FractionalizedNFT struct with owner and total_fractions
  • fractionalize_nft(user, num_fractions) — min 2, max 1000
  • reconstruct_nft(user) — burns all fractions, restores NFT
  • Position locked while fractionalized — unstake blocked
  • FractionalRegistry persistent storage
  • nft_fractionalized / nft_reconstructed events
  • Tests: locks position, reconstruction unlocks, partial burn fails, non-owner rejected

Closes #295
Closes #296
Closes #297
Closes #303

… 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
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Rickyy1017
Rickyy1017 merged commit 5352791 into Rickyy1017:main Jul 29, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment