DittoETH

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

Lack of safe downcasting used in certain places

Summary

There is a lack of safe downcasting used throughout the protocol. This can potentially result in overflows during edge cases, which should not be allowed.

Vulnerability Details

In the BridgeRouterFacet there is the following line of code:

uint88 zethAmount = uint88(IBridge(bridge).deposit(msg.sender, amount))

The return value of deposit is uint256, but we downcast it to uint88, which is not safe.

Impact

Overflows during downcasting can result in invalid logic being run.

Tools Used

Manual review

Recommendations

When downcasting use a library which enforces safe downcasting to ensure there are no overflows.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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