Feature/sc 009 reputation decay - #336
Open
Tobi-8 wants to merge 2 commits into
Open
Conversation
added 2 commits
July 28, 2026 21:16
- Add VerificationAggregation contract with ClaimOutcome enum, AggregationResult struct - Implement deterministic weighted consensus: TRUE/FALSE weight calculation, confidence scoring - Add configurable thresholds: min verification count, min total stake, min confidence - Handle ties deterministically (INCONCLUSIVE) - Emit ClaimAggregated event for indexers - Add IVerificationSource interface for future extensibility (reputation weighting, quadratic voting, etc.) - Add view functions to TruthBountyWeighted for voter iteration: getClaimVoterCount, getClaimVoterAt, getVerificationWeight, getVerificationSupport, getClaimVerificationWindowEnd, getClaimSubmitter - Write comprehensive Foundry tests: successful cases, tie handling, determinism, stress tests, gas benchmarks - Pure integer arithmetic, no floating-point - Order-independent aggregation guarantees identical output across all nodes
…SC-009) - Rewrite ReputationDecay.sol: inherit GovernanceOwnable, minimum reputation floor, inactivity tracking, linear decay, recordActivity, applyDecay, view functions, full IReputationOracle compliance. - Rewrite tests (ReputationDecay.ts, RBAC.test.ts): 57 tests across deployment, decay, governance, access control, edge cases. - Add Foundry fuzz tests (test/fuzz/ReputationDecayFuzz.t.sol). - Fix pre-existing compilation errors in BootstrapController.sol and MigrationManager.sol (missing PAUSER_ROLE). Enable viaIR in hardhat config for stack-too-deep in RewardEngine.sol.
Contributor
|
resolve conflicts @Tobi-8 |
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
Implement Reputation Decay Engine (SC-009) with governance-configurable decay parameters,
inactivity tracking, activity reset, minimum reputation floor, and full IReputationOracle
integration.
applyDecaydecayInterval,decayPercentage(basis points),minimumReputation,enabled— all governance-configurable viasetDecayConfigrecordActivitycalculateDecay,isDecayRequired,nextDecayTimestampIReputationOracle:getReputationScore,isActive,getLastReputationUpdateReputationDecayed,ReputationUpdated,ActivityRecorded,DecayConfigUpdated__gap[50]for upgrade-safe storageMigrationManager.sol (PAUSER_ROLE), hardhat viaIR for RewardEngine.sol
closes #289