Skip to content

Implement reputation recovery#677

Merged
soomtochukwu merged 6 commits into
DXmakers:mainfrom
Maximum-Prosper:codex/sc-rep-053-reputation-recovery
Jun 1, 2026
Merged

Implement reputation recovery#677
soomtochukwu merged 6 commits into
DXmakers:mainfrom
Maximum-Prosper:codex/sc-rep-053-reputation-recovery

Conversation

@Maximum-Prosper

@Maximum-Prosper Maximum-Prosper commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Closes #460


Title: Implement reputation recovery after inactivity

Description:
This PR adds score recovery to the reputation contract so inactive profiles gradually move back toward the default score after a defined cooldown period.

What changed:

Added last_activity tracking on profiles through the main reputation update paths.
Added a new recover_score contract API for authorized contracts.
Implemented safe recovery math that nudges scores toward the default 5_000 BPS value.
Added a ScoreRecovered event for visibility into recovery actions.
Updated profile mutation paths to refresh activity timestamps consistently.
Added unit tests covering recovery after inactivity and authorization checks.
Behavior:

Recovery only applies after 30 days of inactivity.
If the profile is still active, recovery returns the current score unchanged.
Blacklisted profiles cannot recover.
Recovery is only callable by an authorized contract.
Testing:

Added tests for recovery timing and authorization.
I could not run the Rust test suite here because cargo is not available in this environment.

@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

@Maximum-Prosper is attempting to deploy a commit to the mAzI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@soomtochukwu soomtochukwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • see that the CI checks pass
  • If you could fix the merge conflict(s) ASAP

@drips-wave

drips-wave Bot commented Jun 1, 2026

Copy link
Copy Markdown

@Maximum-Prosper 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

@soomtochukwu soomtochukwu merged commit 36f6e4f into DXmakers:main Jun 1, 2026
6 of 8 checks passed
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.

[BE-W3A-106] Web3 Signature Security and Auditing - Step 106

2 participants