Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low

Contracts are designed to receive ETH but do not implement function for

Summary

Contracts are designed to receive ETH but do not implement function for

Vulnerability Details

The following contracts can receive ETH but can not withdraw, ETH is occasionally sent by users will be stuck in those contracts. This functionality also applies to baseTokens resulting in locked tokens and loss of funds.

Impact

File: src/Proxy.sol
51: fallback() external {
52: address implementation = _implementation;
53: assembly {
54: let ptr := mload(0x40)
55: calldatacopy(ptr, 0, calldatasize())
56: let result := delegatecall(gas(), implementation, ptr, calldatasize(), 0, 0)
57: let size := returndatasize()
58: returndatacopy(ptr, 0, size)
59:
60: switch result
61: case 0 { revert(ptr, size) }
62: default { return(ptr, size) }
63: }
64: }

51-64

Tools Used

Personal bot

Recommendations

Provide a rescue ETH and rescueTokens function

Support

FAQs

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