Implement exponential decay model for reputation scores 395#661
Open
Stanley-Owoh wants to merge 13 commits into
Open
Implement exponential decay model for reputation scores 395#661Stanley-Owoh wants to merge 13 commits into
Stanley-Owoh wants to merge 13 commits into
Conversation
… snapshots - Fix badge_level computation in score_from_profile to derive dynamically from score via BadgeLevel::from_score, rather than reading stale stored value - Fix BadgeTier clone in set_badge_metadata to avoid use-after-move - Fix RoleMetrics::new() initial badge_level to match default score (Bronze) - Regenerate all Soroban test snapshots for the updated contract logic All 25 tests passing.
…ity and consistency - Removed unnecessary whitespace and adjusted formatting in `lib.rs` and `profile.rs`. - Consolidated function signatures for better clarity. - Enhanced error handling in arithmetic operations. - Streamlined badge level assignment logic in the `refresh_badges` method. - Updated function calls to maintain consistent formatting across the codebase.
…utation-system-robustness-auditing-403
…ithub.com/Stanley-Owoh/lance into reputation-system-robustness-auditing-403
|
@Stanley-Owoh is attempting to deploy a commit to the mAzI's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Stanley-Owoh 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! 🚀 |
…lement-exponential-decay-model-for-reputation-scores-395
…-395' of https://github.com/Stanley-Owoh/lance into implement-exponential-decay-model-for-reputation-scores-395
soomtochukwu
requested changes
May 29, 2026
Contributor
soomtochukwu
left a comment
There was a problem hiding this comment.
- If you could fix the merge conflict(s) ASAP
- see that the CI checks pass
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.
[SC-REP-041] Implement Exponential Decay Model for Reputation Scores
Summary
Implemented timestamp-based reputation score decay in the Reputation smart contract. Review aggregates now track the ledger timestamp of the latest review, and public score retrieval applies fixed-point daily decay so older review history gradually carries less weight.
Changes
last_reviewed_atto reputation review aggregates.get_score,query_reputation, and badge reads to reflect decayed current scores.authorize_contractdeauthorize_contractis_contract_authorizedValidation
Passed:
cargo fmt -p reputation cargo check -p reputation cargo test -p reputation --lib -- --test-threads=1 cargo build --target wasm32-unknown-unknown --release -p reputationTest result:
Scope
Touched files:
contracts/reputation/src/lib.rscontracts/reputation/src/profile.rsNo escrow or unrelated contract logic was changed for this issue.
Closes #395