Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

unforgiven - [Low] comments says that if bridging fails in other chain then tokens would be returned but code is not returning the funds if the bridging fails #160

Closed
github-actions bot opened this issue Feb 20, 2023 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Reward A payout will be made for this issue Specification An issue related to the specification (low severity)

Comments

@github-actions
Copy link

github-actions bot commented Feb 20, 2023

unforgiven

low

[Low] comments says that if bridging fails in other chain then tokens would be returned but code is not returning the funds if the bridging fails

Summary

the comments for functions bridgeERC20To() and bridgeERC20() in StandardBridge says that "Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain." but code wouldn't return the ERC20 tokens if the bridge operation fails in the other chain.

Vulnerability Detail

se the Summary

Impact

an uninformed user who reads the comments in the code can lose funds.

Code Snippet

https://github.com/ethereum-optimism/optimism/blob/3f4b3c328153a8aa03611158b6984d624b17c1d9/packages/contracts-bedrock/contracts/universal/StandardBridge.sol#L250-L265

https://github.com/ethereum-optimism/optimism/blob/3f4b3c328153a8aa03611158b6984d624b17c1d9/packages/contracts-bedrock/contracts/universal/StandardBridge.sol#L218-L232

Tool used

Manual Review

Recommendation

update the comments

Duplicate of #264

@github-actions github-actions bot added Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Specification An issue related to the specification (low severity) labels Feb 20, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Feb 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Reward A payout will be made for this issue Specification An issue related to the specification (low severity)
Projects
None yet
Development

No branches or pull requests

1 participant