code-423n4 / 2023-06-stader-findings

1 stars 1 forks source link

No Check on `_sdAmount` When Creating a Lot Results In Users Adding Bids On Lots With Zero SD Tokens & The Highest Bidder Losing His Ethers #309

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/Auction.sol#L51

Vulnerability details

Impact

Proof of Concept

Instances: 1

File: 2023-06-stader/contracts/Auction.sol
Line 51: lots[nextLot].sdAmount = _sdAmount;

Tools Used

Manual Testing.

Recommended Mitigation Steps

Check if _sdAmount > 0 in the createLot function before creating a lot.

Assessed type

ETH-Transfer

Picodes commented 1 year ago

What would be the difference with someone bypassing the proposed check with _sdAmount ~ 0 ?

c4-judge commented 1 year ago

Picodes marked the issue as unsatisfactory: Overinflated severity