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

USDC bridger #335

Merged
merged 13 commits into from
Jan 31, 2025
Merged

USDC bridger #335

merged 13 commits into from
Jan 31, 2025

Conversation

karacurt
Copy link
Contributor

No description provided.

Copy link

octane-security-app bot commented Jan 30, 2025

Summary by Octane

New Contracts

  • ERC20OrbitBridger.sol: ERC20OrbitBridger bridges ERC20 tokens to Orbit Chains, auto-calculating gas fees and ensuring no reentrancy.
  • USDCOrbitBridger.sol: USDCOrbitBridger bridges USDC to Orbit Chain, calculates fees, and handles token transfers via a gateway and router.
  • IERC20Bridge.sol: The smart contract facilitates bridging ERC20 tokens between L1 and L2, enqueues messages for sequencing, and includes token validation and initialization functions.
  • IGatewayRouter.sol: The contract defines a gateway router interface for token transfers, managing token-gateway mappings, and emitting related events.
  • IInboxBase.sol: A smart contract interface for an L2 messaging system, enabling message sending, transaction management, fee calculation, and access control via allowList.
  • IL1ArbitrumGateway.sol: This smart contract facilitates ERC20 token deposits from Ethereum to Arbitrum, handling L1 to L2 messaging and custom gas refund management.

Updated Contracts

No contracts were updated in this PR.


🔗 Commit Hash: 1968a73

Copy link

octane-security-app bot commented Jan 30, 2025

Overview

Vulnerabilities found: 2                                                                                
Severity breakdown: 1 Critical, 1 High

Detailed findings

web3/contracts/bridge/ERC20OrbitBridger.sol

web3/contracts/bridge/USDCOrbitBridger.sol


🔗 Commit Hash: 1968a73
🛡️ Octane Dashboard: All vulnerabilities

zomglings
zomglings previously approved these changes Jan 30, 2025
Copy link
Contributor

@zomglings zomglings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

* @author Game7 Engineering - [email protected]
* @notice This contract is used to bridge USDC to Orbit Chains in a single transaction.
*/
contract USDCOrbitBridger {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to suggest calling it ERC20Bridger or SpecificERC20Bridger but actually I ended up really liking the name USDCBridger. It's not strictly speaking accurate since you can put any ERC20 token address there, but it works. :)

/**
* @title USDCBridger
* @author Game7 Engineering - [email protected]
* @notice This contract is used to bridge USDC to Orbit Chains in a single transaction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karacurt : Just add a clarification that it can be used to bridge any specific ERC20 token - not just USDC. This address must be passed during contract construction.

/**
* @title USDCBridger
* @author Game7 Engineering - [email protected]
* @notice This contract is used to bridge any ERC20 token to Orbit Chains in a single transaction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation is the same as that of ERC20Bridger. We should note here that, unlike ERC20Bridger, this contract is for a single ERC20 token, specified when the contract is deployed.

Copy link
Contributor

@zomglings zomglings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@karacurt karacurt merged commit 13e32a2 into main Jan 31, 2025
3 checks passed
@karacurt karacurt deleted the bridge-swap branch January 31, 2025 23:38
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

Successfully merging this pull request may close these issues.

2 participants