DittoETH

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

Withdrawal fee should not be set to 0

Summary

Withdrawal fee should not be set to 0.

Vulnerability Details

For Ditto to be profitable, withdrawal fee cannot be 0.

In the BridgeRouterFacet#withdraw function

fee = zethAmount.mulU88(withdrawalFee);
zethAmount -= fee;
s.vaultUser[vault][address(this)].ethEscrowed += fee;

When zethAmount is very small, the withdrawal fee might be 0. This means no withdrawal fee will be taken, and the escrowed value won't change.

Impact

Without collecting fees, Ditto won't earn profits. Also, users might exploit the function because it doesn't cost them anything.

Tools Used

Manual

Recommendations

Make sure withdrawal fee is always greater than 0.

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Admin Input/call validation

Support

FAQs

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