transfer()
is incorrectly being used within bid()
to deposit tokens from bidders.
On line 113 transfer()
is being used to deposit ERC20 tokens from bidders into the contract. This means that the sender is actually the smart contract and not the bidder who is trying to deposit tokens.
If the contract has no preexisting balance this will result in the call failing with an INSUFFICIENT_BALANCE
error. This means that all calls to bid()
would fail. However, if the contract had a preexisting balance, it means that bidders would be able to bid using the contracts balance and not use their own tokens. This would essentially allow them to withdraw this amount from the contract upon completion of the auction. Also, it would allow the winning bidder to win the NFT and have the contract pay for it.
Manual Review
Update line 113 to the following: erc20_dispatcher.transferFrom(sender, receiver, amount.into());
In the `bid` function is wrongly used `transfer` function instead `transfer_from`.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.