Skip to content

Commit

Permalink
Merge pull request #174 from degengami/Bridge
Browse files Browse the repository at this point in the history
Updated how-to bridge docs
  • Loading branch information
lolmcshizz committed Oct 3, 2023
2 parents d79b695 + bb44665 commit bdcd846
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 74 deletions.
129 changes: 55 additions & 74 deletions docs/howto_bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,123 +5,104 @@ title: Bridge Assets

import useBaseUrl from '@docusaurus/useBaseUrl';

On this page you will find a step-by-step guide on bridging tokens from the Ethereum ecosystem using Acala's Wormhole implementation.
On this page you will find a step-by-step guide on bridging tokens from the Ethereum ecosystem. Currently there are two methods to bridging to and from Ethereum (via Wormhole):

Wormhole’s Portal Bridge allows you to bridge tokens across different chains. Instead of swapping or converting assets directly, Wormhole locks your source assets in a smart contract and mints new Wormhole-wrapped assets on the target chain. You can then swap Wormhole-wrapped assets on an exchange for other assets on the target chain.

## Prerequisites
* A Polkadot wallet (Talisman or Polkadot.js/apps);
* An Ethereum wallet (Metamask);
* Bind your two wallets following [Acala's guide](https://guide.acalaapps.wiki/general/address-binding). Completing this action will require a small amount ACA.

- [Moonbeam routed liquidity](#moonbeam)
- [Acala](#acala)

:::caution
Make sure to have enough tokens (ETH and ACA) in your wallets to pay for fees. Remember that fees will be charged for sending and redeeming tokens, and for binding your wallet addresses. In the interim, HydraDX has created an ACA faucet to help faciliate initial bridging activities. The faucet can be accessed via directly messaging the **Bridge Fee Faucet** bot located at the top of the member list on [Discord](https://discord.gg/kkmY35UxAG). Note that DMs must be enabled.
:::
Wormhole’s Portal Bridge allows you to bridge tokens across different chains. Instead of swapping or converting assets directly, Wormhole locks your source assets in a smart contract and mints new Wormhole-wrapped assets on the target chain. You can then swap Wormhole-wrapped assets on an exchange for other assets on the target chain.

## Bridging Assets ETH -> Acala
### 01 Navigate to Wormhole Token Bridge
[https://www.portalbridge.com/#/transfer](https://www.portalbridge.com/#/transfer)
## To/From Ethereum via Moonbeam {#moonbeam}

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/inbound_1.jpg')} width="800px" />
</div>
### Prerequisites

### 02 Select Networks and Connect to Your Account
- A Polkadot wallet (Talisman or Polkadot.js/apps);
- An Ethereum wallet (Talisman or Metamask);

* Once you have redirected to the Token Bridge Page, select the chains you intend to bridge to and from **(1).** In our case, it will be **Ethereum** as the Source Chain and **Acala** as the Target Chain;
* Connect to your Metamask account that you are bridging from **(2)**.
:::caution
Make sure to have enough tokens (ETH) in your wallets to pay for fees. Remember that fees will be charged for sending and redeeming tokens.
:::

### 03 Select Asset to Bridge
### 01 Navigate to Carrier.so

* Once Metamask is connected, select the token asset you would like to bridge **(3)**. If the token is not found in the dropdown, you can paste in the token contract address (which can be confirmed via Etherscan);
* Enter the amount of tokens you would like to bridge **(4)**;
* Click **Next (5)**. This will prompt Metamask to request a network switch from Ethereum to Acala.
https://www.carrier.so/

:::caution
Note that the only asset currently able to be bridged to Acala from Ethereum are:
* ETH: Native
* DAI: 0x6B175474E89094C44Da98b954EedeAC495271d0F (always double check contract address)
Use with caution. All crypto applications can potentially carry risks related to smart contracts/pallets.
:::

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/inbound_2.jpg')} width="800px" />
<img alt="metadata" src={useBaseUrl('/howto_bridge/mb1.jpg')} width="600px" />
</div>

### 04 Select Payment for Gas
* Following the network switch to Acala, select the payment method for gas **(6).** Note that the bridge minimum for feeless bridge (on Acala side) is ≥10 $DAI;
* Click **Next** **(7)** to proceed. This will prompt Metamask to request a network switch back to Ethereum from Acala.
### 02 Add the Wallets from Source and Destination Network

- Once you have navigated to Carrier.so, add the wallets needed to allow for bridging to and from the desired networks **(1 in image above).**
- In the example above, Metamask was selected as the wallet for Ethereum and Talisman for HydraDX.

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/inbound_3.jpg')} width="800px" />
<img alt="metadata" src={useBaseUrl('/howto_bridge/mb2.jpg')} width="600px" />
</div>

### Step 5: Bridge Tokens
* Following the network switch back to Ethereum, click **Approve** **(8)** to proceed. This will prompt a first transaction within your Metamask wallet to approve the tokens to be transferred;
* Once this has been executed, click **Transfer** **(8)** (which will appear in place of Approve). This will prompt a second transaction within your Metamask wallet to execute the bridge transfer.
### 03 Select Networks and Wallets to Bridge

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/inbound_4.jpg')} width="800px" />
<img alt="metadata" src={useBaseUrl('/howto_bridge/mb3.jpg')} width="600px" />
</div>

Once the transaction has been processed by Wormhole, click Redeem (9). This action results in you receiving the tokens on the Acala chain.
- Once Metamask and Talisman are connected, select the network chains **(2)** and select the previously connected wallets **(3)**.

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/inbound_5.jpg')} width="800px" />
</div>
### 04 Select Asset to Bridge

You are all set!
- Select the token asset and amount of tokens you would like to bridge **(4)**.

## Bridging Assets Acala -> ETH
After transferring bridged assets back to Acala (using [cross-chain transfers](/howto_xcm)), you can bridge them back to the Ethereum ecosystem following
### 05 Bridge Tokens

### 01 Navigate to Wormhole Token Bridge Page
[https://www.portalbridge.com/#/transfer](https://www.portalbridge.com/#/transfer)
- Within **Settings** **(5)**, you can select whether to Auto Relay the transaction. It is recommended that this is toggled on.

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/outbound_1.jpg')} width="800px" />
<img alt="metadata" src={useBaseUrl('/howto_bridge/mb4.jpg')} width="600px" />
</div>

### 02 Select Networks and Connect to Your Account
* Once you have redirected to the Token Bridge Page, select the chains you intend to bridge to and from **(1).** In this case, it will be **Acala** as the Source Chain and **Ethereum** as the Target Chain;
* Connect to your Metamask account that you are bridging from **(2)**.
- Click **Confirm & Begin Transaction** **(6)** to proceed. This will prompt your wallet to sign the transactions. Once confirmed, you are all done!

### 03 Select Asset to Bridge
* Once Metamask is connected, select the token asset you would like to bridge **(3)**. If the token is not found in the dropdown, you can paste in the token contract address (which can be confirmed via [Acala Blockscout](https://blockscout.acala.network/)).
In the example above, bridging from Ethereum to HydraDX, your assets will automatically appear in your wallet on HydraDX network. If you are bridging out of HydraDX to Ethereum, your assets should appear in your Metamask wallet afterwards.



## To/From Ethereum via Acala {#acala}

### Prerequisites

- A Polkadot wallet (Talisman or Polkadot.js/apps);
- An Ethereum wallet (Metamask);
- Bind your two wallets following [Acala's guide](https://guide.acalaapps.wiki/general/address-binding). Completing this action will require a small amount of ACA.

:::caution
Note that the only asset(s) currently able to be bridged to Acala from Ethereum is:
* ETH: Native
* DAI: 0x54A37A01cD75B616D63E0ab665bFfdb0143c52AE (always double check contract address)
Make sure to have enough tokens (ETH and ACA) in your wallets to pay for fees. Remember that fees will be charged for sending and redeeming tokens, and for binding your wallet addresses.
:::

* Enter the amount of tokens you would like to bridge **(4)**;
* Click **Next (5)**. This will prompt Metamask to request a network switch from Acala to Ethereum.
### 01 Navigate to Acala Bridge Page

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/outbound_2.jpg')} width="800px" />
</div>
https://apps.acala.network/bridge

### 04 Select Payment for Gas
* Following the network switch to Ethereum, select the payment method for gas **(6).** Note that Manual Payment is the only option bridging from Acala to Ethereum;
* Click **Next** **(7)** to proceed. This will prompt Metamask to request a network switch back to Acala from Ethereum.
Once you have been directed to Acala bridge page, follow the actions below:

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/outbound_3.jpg')} width="800px" />
<img alt="metadata" src={useBaseUrl('/howto_bridge/aca1.jpg')} width="600px" />
</div>

### 05 Bridge Tokens
* Following the network switch back to Acala, click **Approve** **(8)** to proceed. This will prompt a first transaction within your Metamask wallet to approve the tokens to be transferred;
* Once this has been executed, click **Transfer** **(8)** (which will appear in place of Approve). This will prompt a second transaction within your Metamask wallet to execute the bridge transfer.
### Step 2: Connect to Your Account

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/outbound_4.jpg')} width="800px" />
</div>
- Connect your account **(1)**.
- Select the chains you intend to bridge to and from **(2)**, in this case, it will be **Ethereum** as the Origin Chain and **HydraDX** as the Destination Chain.
- Connect to your Metamask account that you are bridging from **(3)**.

Once the transaction has been processed by Wormhole, click Redeem (9). This action results in you receiving the tokens on the Ethereum chain.
### Step 3: Bridge Tokens

<div style={{textAlign: 'center'}}>
<img alt="metadata" src={useBaseUrl('/howto_bridge/outbound_5.jpg')} width="800px" />
</div>
- Enter the amount of tokens and the token for bridging **(4)**.
- To commence the bridge, click **Approve Tokens (5)** and sign the transaction using your Metamask wallet app.
- Once the tokens are approved for transfer, click **Send Tokens (5)**. This starts the bridging process cross-chain.
- Once the transaction has been processed by Wormhole, click **Redeem & Route Tokens (5).** This action results in you receiving the tokens on the destination chain.

You are all done!
In the example above, bridging from Ethereum to HydraDX, your assets will automatically appear in your wallet on HydraDX network. If you are bridging out of HydraDX to Ethereum, your assets should appear in your Metamask wallet afterwards.
Binary file added static/howto_bridge/aca1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/howto_bridge/inbound_1.jpg
Binary file not shown.
Binary file removed static/howto_bridge/inbound_2.jpg
Binary file not shown.
Binary file removed static/howto_bridge/inbound_3.jpg
Binary file not shown.
Binary file removed static/howto_bridge/inbound_4.jpg
Binary file not shown.
Binary file removed static/howto_bridge/inbound_5.jpg
Binary file not shown.
Binary file added static/howto_bridge/mb1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/howto_bridge/mb2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/howto_bridge/mb3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/howto_bridge/mb4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/howto_bridge/outbound_1.jpg
Binary file not shown.
Binary file removed static/howto_bridge/outbound_2.jpg
Binary file not shown.
Binary file removed static/howto_bridge/outbound_3.jpg
Binary file not shown.
Binary file removed static/howto_bridge/outbound_4.jpg
Binary file not shown.
Binary file removed static/howto_bridge/outbound_5.jpg
Binary file not shown.

0 comments on commit bdcd846

Please sign in to comment.