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

Usage of address.transfer #191

Closed
code423n4 opened this issue Dec 19, 2021 · 1 comment
Closed

Usage of address.transfer #191

code423n4 opened this issue Dec 19, 2021 · 1 comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

cmichel

Vulnerability details

The address.transfer function is used to send ETH to an account.
It is restricted to a low amount of GAS and might fail if GAS costs change in the future or if a smart contract's fallback function handler implements anything non-trivial.

See:

  • SingleNativeTokenExit.exitEth
  • SingleNativeTokenExitV2.exitEth
  • EthSingleTokenJoin.joinTokenEth
  • EthSingleTokenJoinV2.joinTokenEth

Recommended Mitigation Steps

Consider using the lower-level .call{value: value} instead and check its success return value.

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 19, 2021
code423n4 added a commit that referenced this issue Dec 19, 2021
@loki-sama
Copy link
Collaborator

duplicate #175

@loki-sama loki-sama added the duplicate This issue or pull request already exists label Jan 3, 2022
@ghost ghost closed this as completed Jan 10, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants