Attacker can DoS auction as bidder #121
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-1785
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L104-L120
Vulnerability details
Impact
Lets imagine the following scenario. An auction is started and a Alice(a malicious user) sees that. She creates a smart contract with no
receive()
function. She enters the auction through her smart contract with1 ether
. After that Bob decides to enter the auction with2 ether
. So does Eve with3 ether
. The admin callsclaimAuction()
. This function is used to send the nft to the highest bidder(in our case Eve). Yes but that function will always revert because of Alice's smart contract and therefore all users funds are lost.Proof of Concept
This is a well know issue.
Tools Used
Manual Review
Recommended Mitigation Steps
Use
pull over push
method.Assessed type
DoS
The text was updated successfully, but these errors were encountered: