Open code423n4 opened 1 year ago
Picodes marked the issue as primary issue
MikeHathaway marked the issue as sponsor confirmed
Picodes marked the issue as selected for report
Picodes marked the issue as satisfactory
MikeHathaway marked the issue as sponsor acknowledged
Lines of code
https://github.com/code-423n4/2023-05-ajna/blob/fc70fb9d05b13aee2b44be2cb652478535a90edd/ajna-core/src/RewardsManager.sol#L310-L318
Vulnerability details
Impact
This vulnerability allows malicious actors to exploit the reward system by frontrunning transactions and unfairly claiming rewards, thereby disincentivizing honest users from updating the bucket exchange rates and contributing to the system.
Proof of Concept
The
updateBucketExchangeRatesAndClaim
function is publicly callable and serves two main purposes:If eligible, the caller can claim
5%
of the rewards accumulated to each bucket since the last burn event, if it hasn't already been updated. https://github.com/code-423n4/2023-05-ajna/blob/fc70fb9d05b13aee2b44be2cb652478535a90edd/ajna-core/src/RewardsManager.sol#L310-L318