Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 776 Bytes

022.md

File metadata and controls

43 lines (25 loc) · 776 Bytes

Melted Shadow Otter

Medium

No Fallback Function

Summary

The absence of a fallback function means that the contract cannot handle unexpected Ether transfers, which could lead to loss of funds if Ether is sent to the contract. I think it would be good to implement a fallback function that either rejects incoming Ether or handles it appropriately.

    receive() external payable {
        revert("This contract does not accept Ether");
    }

Root Cause

https://github.com/sherlock-audit/2024-12-numa-audit/blob/main/Numa/contracts/Numa.sol#L75

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

No response