TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: medium
Invalid

The `bid` function should not assume that `safeTranasferFrom` is successful.

Summary

DaiGoldAuction.sol: 132

The Function bid `safeTransferFrom` assumes that the transfer of tokens is always succesful. It lacks a transfer success check. We should not always assume that a transfer is successful. There should be checks that check if the transfer was a success then the function should continue with its subsiquent logic otherwise, revert.

Vulnerability Details

The function does not verify if the safeTransferFrom call succeeded. If the transfer fails, subsequent logic will be executed under the false assumption that the tokens were successfully transferred.

Impact

If the transfer fails, the depositors mapping and EpochInfo storage will still be updated and the `deposit` event will still be emitted.

Tools Used

Recommendations

`bool success = bidToken.transferFrom(msg.sender, treasury, amount);

if (!success) { revert CommonEventsAndErrors.TransferFailed();

}`

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Appeal created

Newt Submitter
11 months ago
inallhonesty Lead Judge
11 months ago
inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.