Base ETH Native Bridge
- Level: Beginner
- Estimated Time: 15 minutes
- Last Updated: 2024-11-20
The SkyLink Ethereum-Base Native Bridge is designed to simplify the process of transferring tokens between the Ethereum and Base networks. This guide explains how you can deposit and withdraw supported tokens—specifically USDS and sUSDS—using this bridge. Customizations made to the bridge (from the original OP Stack bridge codebase) allow Sky Ecosystem governance to manage token support and add new features when needed. By following this guide, you will learn how to use the bridge effectively, including specific steps for token transfers and how SkyLink governance can adapt the bridge to meet future needs.
Learning objectives
Section titled “Learning objectives”- Understand the purpose and functionality of the SkyLink Ethereum-Base Native Bridge
- Learn how to deposit and withdraw USDS and sUSDS between Ethereum and Base
- Identify the tokens currently supported by the bridge
- Gain familiarity with the governance mechanisms that control bridge operations and updates
Pre-requisites
Section titled “Pre-requisites”- Familiarity with ERC20 tokens.
Deployment Details
Section titled “Deployment Details”Tokens
Section titled “Tokens”| Component | Network | Address |
|---|---|---|
| USDS Token | Ethereum | 0xdC035D45d973E3EC169d2276DDab16f1e407384F |
| USDS Token | Base | 0x820C137fa70C8691f0e44Dc420a5e53c168921Dc |
| sUSDS Token | Ethereum | 0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD |
| sUSDS Token | Base | 0x5875eEE11Cf8398102FdAd704C9E96607675467a |
Core Base Components
Section titled “Core Base Components”| Component | Network | Address |
|---|---|---|
| MESSENGER | Ethereum | 0x866E82a600A1414e583f7F13623F1aC5d58b0Afa |
| MESSENGER | Base | 0x4200000000000000000000000000000000000007 |
SkyLink Bridge
Section titled “SkyLink Bridge”| Component | Network | Address |
|---|---|---|
| BASE_TOKEN_BRIDGE | Ethereum | 0xA5874756416Fa632257eEA380CAbd2E87cED352A |
| BASE_TOKEN_BRIDGE Implementation | Ethereum | 0xaeFd31c2e593Dc971f9Cb42cBbD5d4AD7F1970b6 |
| BASE_TOKEN_BRIDGE | Base | 0xee44cdb68D618d58F75d9fe0818B640BD7B8A7B7 |
| BASE_TOKEN_BRIDGE Implementation | Base | 0x289A37BE5D6CCeF7A8f2b90535B3BB6bD3905f72 |
SkyLink Escrow
Section titled “SkyLink Escrow”| Component | Network | Address |
|---|---|---|
| SKY_BASE_ESCROW | Ethereum | 0x7F311a4D48377030bD810395f4CCfC03bdbe9Ef3 |
SkyLink Governance Relay
Section titled “SkyLink Governance Relay”| Component | Network | Address |
|---|---|---|
| BASE_GOV_RELAY | Ethereum | 0x1Ee0AE8A993F2f5abDB51EAF4AC2876202b65c3b |
| BASE_GOV_RELAY | Base | 0xdD0BCc201C9E47c6F6eE68E4dB05b652Bb6aC255 |
ChainLog
Section titled “ChainLog”ChainLog deployed at 0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F stores the following data on-chain for the SkyLink Ethereum-Base Native Bridge.
- BASE_GOV_RELAY
- BASE_ESCROW
- BASE_TOKEN_BRIDGE
- BASE_TOKEN_BRIDGE_IMP
Access Portals
Section titled “Access Portals”Superbridge
Section titled “Superbridge”Users can transfer USDS and sUSDS between Ethereum and Base on Suprbridge at https://superbridge.app/
Bridgg
Section titled “Bridgg”Users can transfer USDS and sUSDS between Ethereum and Base on Bridgg at https://www.brid.gg/
Depositing Tokens from Ethereum to Base
Section titled “Depositing Tokens from Ethereum to Base”To deposit tokens from Ethereum to Base, follow these steps:
- Approve the Bridge Contract: Allow the L1TokenBridge contract on Ethereum (BASE_TOKEN_BRIDGE) to spend the desired amount of tokens.
IERC20(USDS).approve(l1TokenBridge, amount);- Initiate the Deposit: Call the
bridgeERC20Tofunction on theL1TokenBridgecontract to begin the deposit.
l1TokenBridge.bridgeERC20To( l1Token, // Address of the L1 token l2Token, // Address of the corresponding L2 token recipient, // Address receiving tokens on L2 amount, // Amount of tokens to deposit minGasLimit, // Minimum gas limit for the L2 execution extraData // Optional extra data );-
Token Locking: The tokens are transferred to the Escrow contract on Ethereum.
-
Message Relay: A cross-chain message is sent to the
L2TokenBridgevia theL1CrossDomainMessenger. -
Token Minting: The
L2TokenBridgemints the equivalent amount of tokens on Base for the recipient.
Withdrawing Tokens from Base to Ethereum
Section titled “Withdrawing Tokens from Base to Ethereum”To withdraw tokens from Base back to Ethereum, follow these steps:
- Approve the
L2TokenBridgeContract: Allow theL2TokenBridgecontract on Base (BASE_TOKEN_BRIDGE) to spend the desired amount of tokens.
IERC20(l2Token).approve(l2TokenBridge, amount);- Initiate the Withdrawal: Call the
bridgeERC20Tofunction on theL2TokenBridgecontract to begin the withdrawal.
l2TokenBridge.bridgeERC20To( l2Token, // Address of the L2 token l1Token, // Address of the corresponding L1 token recipient, // Address receiving tokens on L1 amount, // Amount of tokens to withdraw minGasLimit, // Minimum gas limit for the L1 execution extraData // Optional extra data );-
Token Burning: This token amount is burned on Base.
-
Message Relay: A cross-chain message is sent to the
L1TokenBridgevia theL2CrossDomainMessenger. -
Security Period: Withdrawals are subject to a ~7-day security delay due to the OP Stack architecture. After this period, the withdrawal can be finalized.
-
Token Release: The
L1TokenBridgereleases the tokens from theEscrowback to the recipient on Ethereum.
Check Token Support
Section titled “Check Token Support”To verify if a token on Ethereum is supported by the bridge and has a counterpart on Base, use the l1ToL2Token function available on the bridge contracts deployed on both Ethereum and Base networks.
Limits
Section titled “Limits”Currently, there are no limits on the amount of tokens that users can transfer between Ethereum and Base.
A maximum withdrawal limit (maxWithdraw) can be set by governance on the bridge contract deployed to Base, for each supported token individually. This limit restricts the maximum amount that can be withdrawn in a single transaction. However, users can submit multiple transactions, as the maxWithdraw limit does not decrease after each withdrawal. Currently, the maxWithdraw limit is set to UINT_MAX for all supported tokens, allowing users to transfer any amount from Base to Ethereum in a single transaction.
In the future, Sky Ecosystem governance may adjust the maxWithdraw limit for transfers from Base to Ethereum.
Users are responsible for paying gas fees for transactions on both the Ethereum and Base networks. This includes the cost of cross-chain messaging through Base’s cross-domain messengers on both networks.
Your wallet or user interface may also charge fees for using their infrastructure during deposit and withdrawal transactions.
The bridge contracts do not charge any additional fees.
Escrow
Section titled “Escrow”When tokens are deposited from Ethereum to Base, they are transferred to the Escrow contract on Ethereum, where they are held securely. During withdrawals from Base back to Ethereum, once the cross-chain message is confirmed and finalized, the tokens are released from the Escrow contract to the user’s address on Ethereum.
Sky Ecosystem Governance
Section titled “Sky Ecosystem Governance”Sky Ecosystem Governance manages all aspects of bridge governance.
Token Support
Section titled “Token Support”Governance can add support for new tokens by using the registerToken() function, which allows onboarding an existing token on Ethereum along with its counterpart on Base, or vice versa. This function is executed in the bridge contracts on both networks.
Bridge Upgrades
Section titled “Bridge Upgrades”Governance can use the UUPS upgradeability feature on the bridge contracts on Ethereum and Base to update their respective implementations and add new features as needed.
Governance can also close the existing bridge deployments with the close() function. After closing, a new bridge contract can be deployed to interact with the existing Escrow contract that holds token balances.
Governance Relay
Section titled “Governance Relay”Governance can directly exert control over contracts deployed on Base by sending cross-chain messages through L1GovernanceRelay and L1GovernanceRelay. These governance relay contracts utilize the messaging infrastructure that Base provides. Governance can send a message using L1GovernanceRelay to L2GovernanceRelay which receives it and executes governance actions on Base.
Closing a Bridge
Section titled “Closing a Bridge”Governance can call the close() function on either the Ethereum or Base side of the bridge independently. This changes the isOpen status from 1 to 0 on the bridge contract where close() is executed, preventing any further transactions. If the bridge contract on Ethereum is closed, users cannot initiate new deposits to Base. If the bridge contract on Base is closed, users cannot initiate withdrawals from Base to Ethereum.
Summary
Section titled “Summary”The SkyLink Ethereum-Base Native Bridge allows users to easily transfer USDS and sUSDS tokens between Ethereum and Base networks. This guide covered the essential steps for depositing and withdrawing tokens, including contract approvals, cross-chain messaging, and understanding the governance that controls bridge operations. Governance features provide flexibility for adding new tokens, making updates, and setting limits for withdrawals, ensuring the bridge remains functional and adaptable.
Users can utilize either Superbridge or Bridgg to facilitate these transfers, both offering easy and secure interfaces. Be aware that standard gas fees apply for transactions on both networks, and cross-chain messaging fees may also apply.
Resources
Section titled “Resources” Released into the public domain (CC0 1.0 Universal) – trademarks remain with their owners; no warranty. See full license.