SkyLink

Overview

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 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

  • 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

  • Familiarity with ERC20 tokens.

Guide

Deployment Details

Tokens

Core Base Components

SkyLink Bridge

Component

Network

Address

BASE_TOKEN_BRIDGE Implementation

Ethereum

BASE_TOKEN_BRIDGE Implementation

Base

SkyLink Escrow

Component

Network

Address

SkyLink Governance Relay

Component

Network

Address

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

Usage

Access Portals

Superbridge

Users can transfer USDS and sUSDS between Ethereum and Base on Suprbridge at https://superbridge.app/

Bridgg

Users can transfer USDS and sUSDS between Ethereum and Base on Bridgg at https://www.brid.gg/

Depositing Tokens from Ethereum to Base

To deposit tokens from Ethereum to Base, follow these steps:

  1. 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);
  1. Initiate the Deposit: Call the bridgeERC20To function on the L1TokenBridge contract 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
   );
  1. Token Locking: The tokens are transferred to the Escrow contract on Ethereum.

  2. Message Relay: A cross-chain message is sent to the L2TokenBridge via the L1CrossDomainMessenger.

  3. Token Minting: The L2TokenBridge mints the equivalent amount of tokens on Base for the recipient.

Withdrawing Tokens from Base to Ethereum

To withdraw tokens from Base back to Ethereum, follow these steps:

  1. Approve the L2TokenBridge Contract: Allow the L2TokenBridge contract on Base (BASE_TOKEN_BRIDGE) to spend the desired amount of tokens.

   IERC20(l2Token).approve(l2TokenBridge, amount);
  1. Initiate the Withdrawal: Call the bridgeERC20To function on the L2TokenBridge contract 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
   );
  1. Token Burning: This token amount is burned on Base.

  2. Message Relay: A cross-chain message is sent to the L1TokenBridge via the L2CrossDomainMessenger.

  3. 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.

  4. Token Release: The L1TokenBridge releases the tokens from the Escrow back to the recipient on Ethereum.

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

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 Governance may adjust the maxWithdraw limit for transfers from Base to Ethereum.

Fees

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

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 Governance

Sky Governance manages all aspects of bridge governance.

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

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

Sky 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. Sky Governacne can send a message using L1GovernanceRelay to L2GovernanceRelay which receives it and executes governance actions on Base.

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

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

Last updated