DittoETH

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

Front Running on Exit Short

Summary

exitShort() is vulnerable to front running.

Vulnerability Details

exitShort() creates a forced bid using msg.sender as the bidder. It does not check that msg.sender matches the short owner.

This allows an attacker to front run the transaction and place the bid themselves.

Impact

Attacker could steal funds by filling their own forced bid order.

Tools Used

Manual

Recommendations

Add a onlyShortOwner modifier:

modifier onlyShortOwner(address owner, uint8 id) {
require(shortRecords[asset][owner][id].addr == msg.sender, "Not short owner");
_;
}
function exitShort(
// ...
) external onlyShortOwner(msg.sender, id) {
// ...
}
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.