Incorrect Ether Transfer to Token Owner #432
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-971
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/AuctionDemo.sol#L113
Vulnerability details
Impact
The smart contract in question contains a critical issue related to the transfer of Ether during the auction claiming process.
When a user claims their auction winnings, Ether is meant to be transferred to the owner of the token being auctioned.
However, the current implementation mistakenly transfers Ether to the contract's owner instead.
This error can have significant consequences as it results in the incorrect distribution of funds, potentially causing financial losses for the users involved in the auction.
Additionally, it could lead to unexpected behavior and disputes regarding the ownership of tokens and funds.
Proof of Concept
Tools Used
manual review
Recommended Mitigation Steps
To address this issue, it is crucial to modify the Ether transfer mechanism in the contract's claim auction function. Specifically, replace owner() with the variable ownerOfToken in the payable call:
Assessed type
Context
The text was updated successfully, but these errors were encountered: