DittoETH

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

liquidate TAPP.ethEscrowed will unchanged

Summary

TAPP.ethEscrowed and Total feed will be zero in case, while liquidate when we createForcedBid no match found bidorder:152, then it will return ethFilled = 0 MarginCallPrimaryFacet :239 which will be multiple with other values make the zero

Vulnerability Details

  • on _marginFeeHandler

uint88 tappFee = m.ethFilled.mulU88(m.tappFeePct);
uint88 callerFee = m.ethFilled.mulU88(m.callerFeePct) + m.gasFee;
// VaultUser.ethEscrowed will be also zero
VaultUser.ethEscrowed += callerFee - m.gasFee + tappFee;
// totalFee and TAPP.ethEscrowed also be zero
m.totalFee -= m.gasFee;
TAPP.ethEscrowed -= m.totalFee;

on _fullorPartialLiquidation

// L274 ethFilled was zero then totalFee contain only gasfee which make it zero
// make it zero multiply make it decreaseCol zero
uint88 decreaseCol = min88(m.totalFee + m.ethFilled, m.short.collateral);

Impact

TotalFee will be zero and TAPP.ethEscrowed will be unchange

Tools Used

Manual code Dry run.

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.