Source: docs/threat-model.md v1.0, EoP.15 (Priority 2, Open).
Problem
WinnerSpec.reputation_bump (contracts/events/src/types.rs:150) and the reputation_bump argument of claim_milestone are u32 values chosen by the manager or owner and forwarded unchecked to profile.bump_reputation, which does saturating_add(delta as u64) (contracts/profile/src/reputation.rs:22). The profile contract only checks that the caller is the events contract. Nothing relates the bump to the award or bounds it, so the reputation score has no integrity guarantee.
Change
Source:
docs/threat-model.mdv1.0, EoP.15 (Priority 2, Open).Problem
WinnerSpec.reputation_bump(contracts/events/src/types.rs:150) and thereputation_bumpargument ofclaim_milestoneareu32values chosen by the manager or owner and forwarded unchecked toprofile.bump_reputation, which doessaturating_add(delta as u64)(contracts/profile/src/reputation.rs:22). The profile contract only checks that the caller is the events contract. Nothing relates the bump to the award or bounds it, so the reputation score has no integrity guarantee.Change
MAX_REPUTATION_BUMPconstant (or per-event config onEventRecordat the next migration, per the per-event-configuration rule) enforced inselect_winnersandclaim_milestoneMAX_DELTA_PER_CALLenforced inbump_reputation/slash_reputationas defence in depth