Users will not able to get another redeemreward if they didnt withdraw
Summary
Users will not able to get another redeemRewardsGame if they didn't withdraw
Vulnerability Detail
withdraw function deletes the user.rewardAllowance value and makes it 0 every time if you have it the problem is if someone didn't want to withdraw will not able to redeemRewardsGame because of this require
Avci
medium
Users will not able to get another redeemreward if they didnt withdraw
Summary
Users will not able to get another redeemRewardsGame if they didn't withdraw
Vulnerability Detail
withdraw function deletes the user.rewardAllowance value and makes it 0 every time if you have it the problem is if someone didn't want to withdraw will not able to redeemRewardsGame because of this require
withdraw function
Impact
f someone didn't want to withdraw will not able to redeemRewardsGame because of this require
Code Snippet
https://github.com/sherlock-audit/2023-01-derby/blob/main/derby-yield-optimiser/contracts/MainVault.sol#L199
Tool used
Manual Review
Recommendation
consider adding fixing this logic to the way user could redeemRewardsGame without withdrawing every time