diff --git a/docs/evm-tutorials/bridge-vtao.md b/docs/evm-tutorials/bridge-vtao.md index 7b43ca4f0..eccafa99d 100644 --- a/docs/evm-tutorials/bridge-vtao.md +++ b/docs/evm-tutorials/bridge-vtao.md @@ -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. @@ -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 @@ -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) ::: - - diff --git a/docs/evm-tutorials/vtao-bridge-tutorial.md b/docs/evm-tutorials/vtao-bridge-tutorial.md new file mode 100644 index 000000000..3478be90c --- /dev/null +++ b/docs/evm-tutorials/vtao-bridge-tutorial.md @@ -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**. + +Connect Substrate wallet + +
+ +### 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. + +Connect EVM wallet + +
+ +## 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. + +vTAO bridge +
+ +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). diff --git a/docs/evm-tutorials/vtao-liquidity-on-aerodrome.md b/docs/evm-tutorials/vtao-liquidity-on-aerodrome.md new file mode 100644 index 000000000..4c563bf0a --- /dev/null +++ b/docs/evm-tutorials/vtao-liquidity-on-aerodrome.md @@ -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. + +Convert vTAO +
+ +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**. + +Aerodrome deposit +
+ +## 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. +::: + +vTAO deposit +
+ +:::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). + +vTAO deposit + +Notice the new deposit under the **Liquidity Rewards** section. diff --git a/sidebars.js b/sidebars.js index dd26ca019..abbec266c 100644 --- a/sidebars.js +++ b/sidebars.js @@ -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", diff --git a/static/img/docs/aerodrome-deposit.png b/static/img/docs/aerodrome-deposit.png new file mode 100644 index 000000000..c8635fbe5 Binary files /dev/null and b/static/img/docs/aerodrome-deposit.png differ diff --git a/static/img/docs/confirm-deposit.png b/static/img/docs/confirm-deposit.png new file mode 100644 index 000000000..04a99ed5c Binary files /dev/null and b/static/img/docs/confirm-deposit.png differ diff --git a/static/img/docs/connect-evm-wallet.png b/static/img/docs/connect-evm-wallet.png new file mode 100644 index 000000000..bb6ff9471 Binary files /dev/null and b/static/img/docs/connect-evm-wallet.png differ diff --git a/static/img/docs/connect-ss58-wallet.png b/static/img/docs/connect-ss58-wallet.png new file mode 100644 index 000000000..4485f8559 Binary files /dev/null and b/static/img/docs/connect-ss58-wallet.png differ diff --git a/static/img/docs/convert-vtao.png b/static/img/docs/convert-vtao.png new file mode 100644 index 000000000..d771871c9 Binary files /dev/null and b/static/img/docs/convert-vtao.png differ diff --git a/static/img/docs/vtao-deposit.png b/static/img/docs/vtao-deposit.png new file mode 100644 index 000000000..b5e42e05d Binary files /dev/null and b/static/img/docs/vtao-deposit.png differ diff --git a/static/img/docs/wrap-vtao.png b/static/img/docs/wrap-vtao.png new file mode 100644 index 000000000..843c1f670 Binary files /dev/null and b/static/img/docs/wrap-vtao.png differ