DittoETH

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

ExitShortFacet Not updating ethEscrowed

Summary

on exitShort function call Temporary accounting to enable bid to add collateral to ethEscrowed but after createForcedBid, the value will not restore when Refund the rest of the collateral if ercDebt is fully paid back

Vulnerability Details

Incorrect VaultUser.ethEscrowed

// Refund the rest of the collateral if ercDebt is fully paid back
if (e.ercDebt == e.ercFilled) {
// Full Exit
//@audit-info check why this one not reduce here
// VaultUser.ethEscrowed -= e.collateral - e.ethFilled;
LibShortRecord.disburseCollateral(
e.asset, msg.sender, e.collateral, short.zethYieldRate, short.updatedAt
);
LibShortRecord.deleteShortRecord(e.asset, msg.sender, id); // prevent re-entrancy
}

Impact

have extra ethEscrowed which should not be their

Tools Used

Manual code Review

Recommendations

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.