TwentyOne

First Flight #29
Beginner FriendlyGameFiFoundrySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

Contract Lacks Functionality for Direct ETH Funding

Summary

The contract cannot accept ETH either through direct transfers or via the script, as it lacks a receive() or fallback() function.

This could lead to potential loss of user funds, as users may be unable to claim their prize if the contract does not have sufficient ether available.

Vulnerability Details

The contract has no way to receive ether.

Impact

The vulnerability may result in users' funds being trapped. If the contract lacks sufficient ether and the transfer fails, users will be unable to claim their prize and will also lose the 1 ether they initially deposited.

Tools Used

Manual Review

Recommendations

It is recommended to implement a receive() or fallback() function to allow the contract to accept ether transfers and properly fund the contract.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Contract Lacks Mechanism to Initialize or Deposit Ether

Support

FAQs

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