Closed code423n4 closed 1 year ago
Picodes marked the issue as primary issue
MikeHathaway marked the issue as sponsor confirmed
Picodes marked issue #132 as primary and marked this issue as a duplicate of 132
Picodes marked the issue as satisfactory
Picodes changed the severity to 3 (High Risk)
Lines of code
https://github.com/code-423n4/2023-05-ajna/blob/276942bc2f97488d07b887c8edceaaab7a5c3964/ajna-core/src/RewardsManager.sol#L135
Vulnerability details
Severity
Medium
Rewards may be claimed multiple times using the
moveStakedLiquidity()
function.Summary
The
RewardsManager.moveStakedLiquidity()
function does not check if rewards has already been claimed.Vulnerability Details
The
moveStakedLiquidity
function after running some checks and initializing some variables, calls the_claimRewards
function but does not check if rewards has already been claimed.Link To Code
An Attacker may use this to their advantage by calling the
moveStakedLiquidity()
function multiple times thereby collecting rewards each time.Impact
Rewards may be claimed multiple times by a lender through moving liquidity.
Tools Used
Manual Review
Recommended Mitigation Step
The check done in the
claimRewards
function to stop this kind of vulnerability, should be implemented in the moveStakedLiquidity function.Assessed type
Invalid Validation