20,000 USDC
View results
Submission Details
Severity: low

claim function doesn't follow CEI

Summary

Vulnerability Details

The claim function in the smart contract has an issue that does not follow the "check effects interactions" pattern.

Impact

While reentrancy attack is not possible I think it's better to follow CEI

Tools Used

Manual Review

Recommendations

Change claim function:

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

Support

FAQs

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