DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Invalid

Potential Reentrancy on Withdrawals

Summary

The withdraw functions could be vulnerable to reentrancy attacks.

Vulnerability Details

withdraw calls external token contracts which could make malicious callback calls before state is updated.

For example:

function withdraw(uint88 amount) external {
VaultUser.ethEscrowed -= amount;
IERC20(token).mint(msg.sender, amount); // External call
// State updated here
}

Impact

Possible double withdrawal of tokens.

Tools Used

Manual

Recommendations

  • Use checks-effects-interactions pattern

  • Add reentrancy guard

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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