The bid
function incorrectly attempts to transfer ERC20 tokens from the contract to itself instead of from the bidder to the contract.
The bid
function uses erc20_dispatcher.transfer(receiver, amount.into());
, which transfers tokens from the contract to the receiver
(the contract itself). This does not result in the bidder's tokens being transferred to the contract.
Bids Without Payment: Users can place bids without transferring any tokens to the contract.
Financial Loss to Owner: The auction owner may transfer the NFT without receiving payment.
Correct Transfer Function Usage: Use transfer_from
to transfer tokens from the bidder to the contract:
Require Approval: Ensure that bidders have approved the contract to spend their tokens prior to bidding.
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.