DittoETH

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

Potential Reentrancy on Short Record Updates

Summary

Updating short records via fillShortRecord() can be vulnerable to reentrancy.

Vulnerability Details

fillShortRecord() calls external contracts for yield rates. If these contracts are malicious, they could reenter fillShortRecord() before state is updated.

For example:

function fillShortRecord(
// ...
) external {
// Interaction
assetYieldRate = s.asset[asset].zethYieldRate;
// State changes
short.collateral += eth;
// Vulnerable to reentrancy here
}

Impact

Reentrancy could lead to collateral being drained or unexpected state changes.

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.