Skip to content

fix: reward manager fund migration bug#692

Merged
shaspitz merged 3 commits intomainfrom
fix-reward-manager
Jun 5, 2025
Merged

fix: reward manager fund migration bug#692
shaspitz merged 3 commits intomainfrom
fix-reward-manager

Conversation

@shaspitz
Copy link
Copy Markdown
Contributor

@shaspitz shaspitz commented Jun 3, 2025

Describe your changes

The RewardsManager contract allows any rewards receiver address to set an override address which will then incur rewards on behalf of the receiver. Previously the contract included the option to migrateExistingRewards to the msg.sender when calling removeOverrideAddress. This created a vulnerability where a malicious attacker could set any address as the override address, then remove that override address, allowing the attacker to steal funds from anyone.

Since this migrateExistingRewards flag was originally included only for UX purposes, we can remove it and prevent the described vulnerability.

Checklist before requesting a review

  • I have added tests that prove my fix is effective or that my feature works
  • I have made corresponding changes to the documentation

@shaspitz shaspitz requested a review from aloknerurkar June 4, 2025 01:17
@shaspitz shaspitz marked this pull request as ready for review June 4, 2025 01:17
@shaspitz shaspitz force-pushed the fix-reward-manager branch from 431e669 to af408f7 Compare June 5, 2025 21:24
@shaspitz shaspitz merged commit 04f73c6 into main Jun 5, 2025
5 checks passed
@shaspitz shaspitz deleted the fix-reward-manager branch June 5, 2025 22:30
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.

2 participants