20,000 USDC
View results
Submission Details
Severity: medium

claim() may fail

Summary

claim() may fail

Vulnerability Details

claim() defaults to take out all the value of the user's claimable, but if the WEth in the contract is insufficient, then the user can't take out 1wei.

function claim() external {
updateFor(msg.sender);
WETH.transfer(msg.sender, claimable[msg.sender]);//@audit
claimable[msg.sender] = 0;
balance = WETH.balanceOf(address(this));
}

Impact

claim() may fail

Tools Used

vscode

Recommendations

it is recommended to modify it to specify the reward value to be taken out

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.