-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Owner will prevent the NFT claim by highest bidder. #982
Comments
141345 marked the issue as duplicate of #1653 |
141345 marked the issue as duplicate of #843 |
141345 marked the issue as duplicate of #486 |
alex-ppg marked the issue as not a duplicate |
The Warden specifies that the owner of the contract can consume gas, leading to a DoS attack on the The |
alex-ppg marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L104-L120
Vulnerability details
Impact
The highest bidder can not claim the NFT despite they paid enough amount.
Proof of Concept
Once the auction time is over, either the admin or the highest bidder can call the function
claimAuction
to claim the NFT.Firs the NFT is sent to the highest bidder and then the highest bid is sent to the owner.
The owner can intentionally consume most of the gas while receiving the highest bid amount. This will lead to a situation where the highest bidder can not claim the NFT.
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L104-L120
Since all most of the gas consumed inside the caller, the transaction would revert while trying to process further transaction in the else if block.
Tools Used
Manual review
Recommended Mitigation Steps
We suggest to add separate function for claiming the highest bid amount by the owner.
Remove the fund fund transfer call from
claimAuction
function call.Assessed type
Rug-Pull
The text was updated successfully, but these errors were encountered: