Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent users sending unexpected ETH to protocol #640

Open
code423n4 opened this issue Aug 1, 2022 · 2 comments
Open

Prevent users sending unexpected ETH to protocol #640

code423n4 opened this issue Aug 1, 2022 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists old-submission-method QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/core/GolomTrader.sol#L459-L461

Vulnerability details

Impact

The protocol receives ETH by defining receive() and fallback() functions. Users will lose ETH when he/she accidentally sends ETH to the protocol.

Proof of Concept

https://github.com/code-423n4/2022-07-golom/blob/main/contracts/core/GolomTrader.sol#L459-L461

    fallback() external payable {}

    receive() external payable {}

Tools Used

None

Recommended Mitigation Steps

  receive() external payable {
    require(msg.sender == address(WETH));
  }
@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working old-submission-method labels Aug 1, 2022
code423n4 added a commit that referenced this issue Aug 1, 2022
@0xsaruman
Copy link
Collaborator

duplicate #755

@liveactionllama liveactionllama added the duplicate This issue or pull request already exists label Aug 22, 2022
@dmvt
Copy link
Collaborator

dmvt commented Oct 14, 2022

Lack of a recovery function is low risk. Downgrading to QA.

@dmvt dmvt added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Oct 14, 2022
@dmvt dmvt reopened this Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists old-submission-method QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

4 participants