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

Low risk (L3): withdrawGasToken signals gas token will be in the contract, but no receive() method is present #29

Closed
2 of 3 tasks
petrovska-petro opened this issue Sep 13, 2024 · 3 comments
Assignees

Comments

@petrovska-petro
Copy link
Collaborator

petrovska-petro commented Sep 13, 2024

Severity: if ether is sent without defining the receive() method in the smart contract, it will throw an exception

Context: the method withdrawGasToken suggests that gas balance will be in the contract, but no proper way to received actual gas in the contract

uint256 amount = address(this).balance;
recipient.transfer(amount);

Recommendation: see documentation and add at least a receive() method if intention is to receive gas tokens into the injector.

Review stage

Balancer Maxis:

  • Acknowledge
  • Fixed

Onchainification Labs:

  • Acknowledge correction/mitigation
@Tritium-VLK
Copy link
Contributor

It is not intended for the injector to hold gas tokens. I guess then could just remove this function. This is just kind of the baseline of what I have used as a admin owned, fully controlled, max flexibillity helper.

@petrovska-petro
Copy link
Collaborator Author

Then, indeed makes sense to remove withdrawGasToken from the contract

@petrovska-petro
Copy link
Collaborator Author

approved #38

once merged into main, feel free to close this issue ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants