DeFiHardhatOracleProxyUpdates
100,000 USDC
View results
Submission Details
Severity: low
Invalid

Cross Contract reentrancy between `SiloFacet` and `Silo`

Summary

Cross Contract reentrancy

Vulnerability Details

The account state avariable in _claimPlenty is updated after the transfer, this can lead to reentrancy

Impact

users can claim more funds than they deposited . Also be used to steal funds

Tools Used

manual

Recommendations

  1. Use check effect interaction when making transfers

  2. make this code changes

function _claimPlenty(address account) internal {
// Plenty is earned in the form of the sop token.
uint256 plenty = s.a[account].sop.plenty;
IWell well = IWell(s.sopWell);
IERC20[] memory tokens = well.tokens();
IERC20 sopToken = tokens[0] != C.bean() ? tokens[0] : tokens[1];
+ delete s.a[account].sop.plenty;
- sopToken.safeTransfer(account, plenty);
emit ClaimPlenty(account, address(sopToken), plenty);
}
Updates

Lead Judging Commences

giovannidisiena Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
Assigned finding tags:

Informational/Invalid

Support

FAQs

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