code-423n4 / 2022-01-yield-findings

1 stars 0 forks source link

Miscalculation of rewards due to removal of vaults #137

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

hack3r-0m

Vulnerability details

Location: https://github.com/code-423n4/2022-01-yield/blob/main/contracts/ConvexYieldWrapper.sol#L100

the worst-case scenario is the user is not able to claim any rewards because a frontrunning bot can always remove all vaults of the user before the call to wrap, unwrap, or getRewards function

Tools Used

Manual Review

Recommended Mitigation Steps

Put a condition so that only the user can remove his/her vaults.

iamsahu commented 2 years ago

Refer to #4