Ether from highest bid in AuctionDemo contract is not transferred to the owner of the token #517
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
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-971
edited-by-warden
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/08a56bacd286ee52433670f3bb73a0e4a4525dd4/smart-contracts/AuctionDemo.sol#L113
Vulnerability details
Impact
The owner of a token being auctioned in the
DemoContract
will receive 0 ether at the end of the auction in exchange for the token.Proof of Concept
The ether from the highest bidder is transferred to the
owner()
of theAuctionDemo
contract, not to the owner of the token being auctioned, as it can be seen in these linesRecommended Mitigation Steps
Change
owner()
forownerOfToken
when sending the ether from highest bid:Assessed type
ETH-Transfer
The text was updated successfully, but these errors were encountered: