Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/evm-tutorials/bridge-vtao.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: "Token Bridging"
# Token Bridging

This guide provides an overview of two related topics:

- how to moves TAO between Substrate-style wallets (SS58) and the Etherum style wallets on Bittensor EVM
- how to use vTAO as a token bridge between Bittensor EVM and other EVM chains.

Expand All @@ -22,10 +23,10 @@ If TAO is transferred to an Ethereum-style h160 wallet, it can be used in Bitten

You can move TAO back and forth between Substrate and EVM wallets several ways:
Use example scripts:
- [Transfer TAO from H160 to SS58](./convert-h160-to-ss58)
- [Transfer TAO from SS58 to H160](./transfer-from-metamask-to-ss58)
- Using [`tao.app/bridge`](https://tao.app/bridge).

- [Transfer TAO from H160 to SS58](./convert-h160-to-ss58)
- [Transfer TAO from SS58 to H160](./transfer-from-metamask-to-ss58)
- Using [`tao.app/bridge`](https://tao.app/bridge).
- Using OTF's EVM Bridge: [`bridge.bittensor.com/`](https://bridge.bittensor.com/)

## Bridge to other EVM Chains with vTAO
Expand All @@ -37,7 +38,5 @@ vTAO is a liquid-staked TAO token on the Subtensor EVM, available through ['tao.
- vTAO can be bridged between supported EVM chains.

:::tip
vTAO conceptually similar to [Lido's wstETH](https://docs.lido.fi/contracts/wsteth/).
vTAO conceptually similar to [Lido's wstETH](https://docs.lido.fi/contracts/wsteth/). For more information on how to bridge and wrap vTAO, see [Bridging and Wrapping vTAO](./vtao-bridge-tutorial.md)
:::


86 changes: 86 additions & 0 deletions docs/evm-tutorials/vtao-bridge-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: "Bridging and Wrapping vTAO"
---

import SubstrateWallet from '/img/docs/connect-ss58-wallet.png';
import EVMWallet from '/img/docs/connect-evm-wallet.png';
import VTAOBridge from '/img/docs/wrap-vtao.png';

# Bridging and Wrapping vTAO

This page explains how to move native TAO from the Bittensor Substrate layer to the Bittensor EVM and wrap it into vTAO.

## Introduction

TAO, the native token of the Bittensor network, exists on Subtensor, a Substrate-based platform. Hence, TAO is normally held in Substrate-style, ss58-format wallets.

If TAO is transferred to an Ethereum-style h160 wallet, it can be used in Bittensor's EVM layer. The process of moving TAO between Substrate and EVM wallets is referred to as _TAO bridging_.

## Prerequisites

To follow along with the rest of the tutorial, you will need the following:

- A Talisman browser extension with a Substrate wallet—or "Polkadot account"—containing native TAO on Bittensor mainnet.
- An EVM Wallet extension, e.g. Talisman or Metamask.

For simplicity, we will be using the Talisman browser extension for this tutorial.

## Step 1: Connect your wallets

To begin, you must first connect your Substrate and EVM wallet to the [TAO.app](https://www.tao.app/explorer) Bittensor explorer. This step requires that you have the Talisman wallet extension installed on your browser.

### Connect your Substrate wallet

1. Visit the [TAO.app](https://www.tao.app/explorer) explorer page. If you do not already have a connected wallet, you will be redirected to the Talisman extension pop-up to connect a wallet
2. Select your preferred Substrate account and then click **Connect**.

<img src={SubstrateWallet} alt="Connect Substrate wallet" style={{width: 300, display: "flex", justifySelf: "center"}} />

<br/>

### Connect your EVM wallet

1. Navigate to the [TAO.app](https://www.tao.app/bridge) bridge page.
2. On the **TAO EVM** tab, input the amount of native TAO to transfer from your Substrate wallet to the Bittensor EVM.
3. Click **Connect Wallet** and continue the process on the Talisman extension.

<img src={EVMWallet} alt="Connect EVM wallet" style={{width: 700, display: "flex", justifySelf: "center"}} />

<br/>

## Step 2: Bridge TAO to Bittensor EVM

Now, you can conver native TAO to EVM-compatible TAO. To do this:

1. Ensure that you are on the **TAO EVM** tab within the [TAO.app](https://www.tao.app/bridge) bridge page.
2. Input the amount of TAO you want to transfer.
3. Click **Bridge** and then approve the transaction on the Talisman extension.

:::warning Gas fees
Ensure you have enough TAO in your native Substrate wallet to cover the gas fees for the transaction.
:::

Once the transaction is processed, verify that the TAO balance is now reflected in your Talisman EVM wallet.

## Step 3: Wrap TAO to vTAO

After the TAO arrives on the Talisman EVM wallet, you can begin the process of wrapping TAO to vTAO.

1. Navigate to the **Bridge** tab within the [TAO.app](https://www.tao.app/bridge) bridge page to open the cross-chain bridge modal.
2. Click the **Sign & Accept** button to confirm the disclaimer and then approve with your Talisman wallet.
3. On the **From** dropdown, select TAO under **Bittensor (EVM)** and input the amount of TAO you want to wrap.
4. On the **To** dropdown, select vTAO under **Bittensor (EVM)**.
5. Click **Bridge** and sign the pop-up on the Talisman extension.

<img src={VTAOBridge} alt="vTAO bridge" style={{width: 700, display: "flex", justifySelf: "center"}} />
<br/>

This converts your TAO into vTAO, the wrapped version compatible with cross-chain activity. Once the transaction is processed, verify that the vTAO balance is now reflected in your Talisman EVM wallet.

:::warning Gas fees
Ensure you have enough TAO in your EVM wallet to cover the gas fees for the transaction.
:::

## Next steps

After converting your TAO to vTAO, you can use it to earn staking rewards while using your TAO anywhere. For more information, see [Providing vTAO liquidity to Aerodrome](./vtao-liquidity-on-aerodrome.md).
93 changes: 93 additions & 0 deletions docs/evm-tutorials/vtao-liquidity-on-aerodrome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "Providing vTAO liquidity to Aerodrome"
---

import ConvertVTAO from '/img/docs/convert-vtao.png';
import AerodromeDeposit from '/img/docs/aerodrome-deposit.png';
import vTAODeposit from '/img/docs/vtao-deposit.png';
import ConfirmDeposit from '/img/docs/confirm-deposit.png';

# Providing vTAO liquidity to Aerodrome

This page walks through how to move vTAO from the Bittensor EVM to the Base network to provide liquidity on Aerodrome.

:::danger Understanding liquidity positions
Providing liquidity in a Concentrated Volatile pool involves significant risk, including Impermanent Loss. Before following this tutorial, ensure you understand how price ranges affect your asset ratio.

For more information on how liquidity positions work, see [Understanding Liquidity Provision in DeFi](https://blog.uniswap.org/how-liquidity-provision-in-defi-works).
:::

## Prerequisites

To continue with the rest of this tutorial,, you will need the following:

- An EVM Wallet browser extension containing some vTAO.
- Some ETH and USDC on the Base network in your EVM wallet.

To learn about how to convert native TAO to vTAO, see [Bridging and Wrapping vTAO](./vtao-bridge-tutorial.md).

## Step 1: Bridge vTAO to Base

Bridging vTAO to Base is a two-step process: first, approve the smart contract to access your tokens, then execute the final transaction to confirm. To do this:

1. Navigate to the [TAO.app](https://www.tao.app/bridge) bridge page.
2. Switch to the **Bridge** tab within the [TAO.app](https://www.tao.app/bridge) bridge page to open the cross-chain bridge modal.
3. On the **From** dropdown, select vTAO under **Bittensor (EVM)** and input the amount of vTAO you want to bridge.
4. On the **To** dropdown, select vTAO under **Base**.
5. Click the **Approve vTAO** button and sign the pop-up on the browser extension.

<img src={ConvertVTAO} alt="Convert vTAO" style={{width: 700, display: "flex", justifySelf: "center"}} />
<br/>

Once the approval is confirmed, click the **Bridge** button and then sign the pop-up on the browser extension to finalize the transaction.

:::warning Gas fees
Bridging vTAO from the Bittensor EVM to Base requires native TAO for gas. Ensure your EVM wallet holds a sufficient TAO balance to cover these transaction fees.
:::

## Step 2: Connect EVM wallet to Aerodrome

1. Visit to the [Aerodrome Finance](https://aero.drome.eth.limo/connect?to=%2Fdash%3F) page.
2. Click the **Browser Wallet** button to connect your EVM wallet.

:::tip
On the [TAO.app](https://www.tao.app/bridge) bridge page, retrieve the contact address for vTAO on the Base network from the **vTAO Contract Addresses** section—`0xe9f6D9898f9269B519E1435E6ebafF766c7f46BF`.
:::

## Step 3: Configure the deposit pool

1. Navigate to the [Aerodrome dashboard](https://aero.drome.eth.limo/dash).
2. Click on the **New deposit** button to open the modal.
3. In the **Token you want to deposit** dropdown, select USDC.
4. On the **Token you want to pair with** dropdown, paste the contact address for vTAO on the Base network.
5. Open the **USDC/VTAO** pair tagged `0.3% Concentrated Volatile 200` and click **Continue**.

<img src={AerodromeDeposit} alt="Aerodrome deposit" style={{width: 700, display: "flex", justifySelf: "center"}} />
<br/>

## Step 4: Deposit assets

1. Ensure that you are on the **New deposit** page
2. In the **Set price range** section, click the `USDC|vTAO` toggle to switch the view to vTAO.
3. Define your price range:
- **Low**: The lowest price in your range; below this, your position is 100% USDC.
- **High**: The highest price in your range; above this, your position becomes 100% vTAO.
4. Set the amount of vTAO to deposit.
5. Click **Deposit** and then sign the transaction in your EVM wallet.

:::warning Gas fees
Depositing assets on Aerodrome requires native ETH on the Base network for gas. Ensure your EVM wallet holds a sufficient ETH balance to cover these transaction fees.
:::

<img src={vTAODeposit} alt="vTAO deposit" style={{width: 700, display: "flex", justifySelf: "center"}} />
<br/>

:::info Two-Step Transaction Flow
To finish your deposit, you must sign two wallet prompts: first to approve the vTAO spend, and then to finalize. The second wallet pop-up will appear immediately after the first transaction clears.
:::

After signing the transaction that confirms the deposit, you can confirm the deposit by checking the [Aerodrome dashboard](https://aero.drome.eth.limo/dash).

<img src={ConfirmDeposit} alt="vTAO deposit" style={{width: 700, display: "flex", justifySelf: "center"}} />

Notice the new deposit under the **Liquidity Rewards** section.
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ const sidebars = {
"evm-tutorials/convert-h160-to-ss58",
"evm-tutorials/transfer-from-metamask-to-ss58",
"evm-tutorials/transfer-between-two-h160-accounts",
"evm-tutorials/vtao-bridge-tutorial",
"evm-tutorials/vtao-liquidity-on-aerodrome",
"evm-tutorials/withdraw-from-alice",
"evm-tutorials/ed25519-verify-precompile",
"evm-tutorials/staking-precompile",
Expand Down
Binary file added static/img/docs/aerodrome-deposit.png
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/img/docs/confirm-deposit.png
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/img/docs/connect-evm-wallet.png
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/img/docs/connect-ss58-wallet.png
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/img/docs/convert-vtao.png
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/img/docs/vtao-deposit.png
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/img/docs/wrap-vtao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.