Owner of the token will not receive the funds after claimAuction()
#795
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/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L113
Vulnerability details
Impact
Invariant
the owner of the token will receive the funds
broken, implementation is sending the fund toowner()
which will be the address that deployed AuctionDemo.sol. The fund will not be at direct risk, since the address belongs to the protocol will be receiving the fund.Proof of Concept
Run
forge init
in project rootsetup deployer script and test file:
Gist link: link
Assertion will pass, which proof the fund is sent to
owner()
instead of token ownerTools Used
Manual Review, Forge
Recommended Mitigation Steps
Replace
owner()
withownerOfToken
Assessed type
Context
The text was updated successfully, but these errors were encountered: