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
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)
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()
andbridgeERC20()
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
The text was updated successfully, but these errors were encountered: