Skip to content

Commit

Permalink
Add restake withdraw steps
Browse files Browse the repository at this point in the history
  • Loading branch information
yurixander committed Oct 24, 2024
1 parent acf8ade commit 310ab80
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 43 deletions.
14 changes: 10 additions & 4 deletions pages/restake/how_to_restake_polkadotjs/withdraw.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import Callout from "/components/Callout";

## Withdraw Using PolkadotJS

Withdraw is the process of withdrawing assets from the multiasset delegation vault. You can only withdraw your "undelegated" assets. So make sure you have undelegated your assets before withdrawing.
<Callout type="info">
You can only withdraw your "undelegated" (unstaked) assets. Make sure you have undelegated your assets before withdrawing. See the [Unstake page](./unstake.mdx) for more information.
</Callout>

Withdrawing is the process of releasing assets from the multiasset delegation vault.

The process of withdrawal is a two step process:
- First, you need to schedule a withdrawal, which will be available for execution after its unstake period.
- Then, after the unstake period, you can actually withdraw the assets.
Similar to unstaking, it is composed of two steps:
1. A withdrawal request is **scheduled**, which will be available for execution after its unstake period.
2. After the unstake period, you can **execute** the withdrawal to actually release the assets.

### Accessing the PolkadotJS Interface

Expand Down
2 changes: 1 addition & 1 deletion pages/restake/how_to_restake_tangle/delegate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Delegators are similar to stakers in a consensus system like nominated proof of

### Step 1: Access Tangle DApp & Connect Wallet

- Open [Tangle DApp's Restaking page](https://app.tangle.tools/restake/stake).
- Open [Tangle DApp's Restaking: Delegate page](https://app.tangle.tools/restake/stake).
- Connect your wallet to the DApp by clicking on the **Connect Wallet** button on the top right and selecting your preferred wallet provider.

### Step 2: Delegate
Expand Down
2 changes: 1 addition & 1 deletion pages/restake/how_to_restake_tangle/deposit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Users can deposit LST assets to the multiasset delegation vault.

### Step 1: Access Tangle DApp & Connect Wallet

- Open [Tangle DApp's Restaking page](https://app.tangle.tools/restake/deposit).
- Open [Tangle DApp's Restaking: Deposit page](https://app.tangle.tools/restake/deposit).
- Connect your wallet to the DApp by clicking on the **Connect Wallet** button on the top right and selecting your preferred wallet provider.

### Step 2: Deposit Assets
Expand Down
6 changes: 3 additions & 3 deletions pages/restake/how_to_restake_tangle/unstake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The unstake is a two step process:

### Step 1: Access Tangle DApp & Connect Wallet

- Open [Tangle DApp's Restaking page](https://app.tangle.tools/restake/unstake).
- Open [Tangle DApp's Restaking: Unstake page](https://app.tangle.tools/restake/unstake).
- Connect your wallet to the DApp by clicking on the **Connect Wallet** button on the top right and selecting your preferred wallet provider.

### Step 2: Schedule Unstake
Expand All @@ -30,13 +30,13 @@ Once you're at the **Unstake** tab, you'll see a table on the right listing the
- Sign and submit the transaction. Make sure the account you are using has enough balance to cover the transaction fee.
- If successful, you should see the following confirmation toast notification:

![Deposit Transaction Confirmation Toast](/images/restake/unstake/unstake-tx-confirmation.png)
![Unstake Transaction Confirmation Toast](/images/restake/unstake/unstake-tx-confirmation.png)

### Cancel an Unstaking Request

If you've scheduled an unstake request, you can choose to **cancel** it if you change your mind. To cancel an unstake request, use the unstake requests table on the right side of the page. Note that you can cancel an unstake request even if it has reached its maturity, but as long as it hasn't been executed yet.

Simply select the unstake request(s) that you'd like to cancel, and click on the **Cancel Unstake** button to initiate the transaction.
Simply select the unstake request(s) that you'd like to cancel, then click on the **Cancel Unstake** button to initiate the transaction.

![Unstake Requests Table: Cancel Unstake](/images/restake/unstake/cancel-unstake.png)

Expand Down
64 changes: 30 additions & 34 deletions pages/restake/how_to_restake_tangle/withdraw.mdx
Original file line number Diff line number Diff line change
@@ -1,57 +1,53 @@
import Callout from "/components/Callout";

## Withdraw Using Tangle DApp

Withdraw is the process of withdrawing assets from the multiasset delegation vault. You can only withdraw your "undelegated" assets. So make sure you have undelegated your assets before withdrawing.
<Callout type="info">
You can only withdraw your "undelegated" (unstaked) assets. Make sure you have undelegated your assets before withdrawing. See the [Unstake page](./unstake.mdx) for more information.
</Callout>

Withdrawing is the process of releasing assets from the multiasset delegation vault.

The process of withdrawal is a two step process. First you need to schedule a withdrawal, which will be available after the unstake period. Then after the unstake period, you can actually withdraw the assets.
Similar to unstaking, it is composed of two steps:
1. A withdrawal request is **scheduled**, which will be available for execution after its unstake period.
2. After the unstake period, you can **execute** the withdrawal to actually release the assets.

### Schedule Withdraw

The first step to complete a withdraw is to schedule a withdrawal. This is done by calling the `schedule_withdraw` function.

### Step 1: Access the PolkadotJS Interface

- Open [PolkadotJS Apps](https://polkadot.js.org/apps/).
- Connect to the Tangle Network by selecting the appropriate network from the dropdown list.
### Step 1: Access Tangle DApp & Connect Wallet

For convenience, here are the PolkadotJS direct links for Tangle Testnet and Mainnet:

- Tangle Testnet: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftestnet-rpc.tangle.tools#/explorer
- Tangle Mainnet: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.tangle.tools#/explorer
- Open [Tangle DApp's Restaking: Withdraw page](https://app.tangle.tools/restake/withdraw).
- Connect your wallet to the DApp by clicking on the **Connect Wallet** button on the top right and selecting your preferred wallet provider.

### Step 2: Schedule Withdraw

- Navigate to the **Extrinsics** tab on PolkadotJS.

![PolkadotJS Extrinsics](/images/extrinsic.png)

- Under the **MultiAssetDelegation** section, select **ScheduleWithdraw** and enter the amount of assets to withdraw.

![PolkadotJS ScheduleWithdraw](/images/restake/how-to-restake-polkadotjs/schedulewithdraw.png)

Sign and submit the transaction. Make sure the account you are using has enough balance to cover the transaction fee.

### Execute Withdraw
1. Select the **Withdraw** tab on the Restaking page.
2. Click on the **Asset** dropdown, and select an asset from the modal.
3. Enter the amount of assets that you'd like to withdraw.
4. Review any fees and the withdraw delay before proceeding.
5. Click on the **Schedule Withdraw** button to initiate the transaction.

The second step to complete a withdraw is to execute the withdrawal. This is done by calling the `execute_withdraw` function.
![Withdraw Steps](/images/restake/withdraw/steps.png)

### Step 1: Access the PolkadotJS Interface
### Step 3: Sign and Submit the Transaction

- Open [PolkadotJS Apps](https://polkadot.js.org/apps/).
- Connect to the Tangle Network by selecting the appropriate network from the dropdown list.
- Sign and submit the transaction. Make sure the account you are using has enough balance to cover the transaction fee.
- If successful, you should see the withdraw request appear in the table at the right side of the page, and also the following confirmation toast notification:

For convenience, here are the PolkadotJS direct links for Tangle Testnet and Mainnet:
![Withdraw Transaction Confirmation Toast](/images/restake/withdraw/withdraw-tx-confirmation.png)

- Tangle Testnet: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftestnet-rpc.tangle.tools#/explorer
- Tangle Mainnet: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.tangle.tools#/explorer
### Cancel a Withdraw Request

### Step 2: Execute Withdraw
If you've scheduled a withdraw request, you can choose to **cancel** it if you change your mind. To cancel a withdraw request, use the withdraw requests table on the right side of the page. Note that you can cancel a withdraw request even if it has reached its maturity, but as long as it hasn't been executed yet.

- Navigate to the **Developer** **Extrinsics** tab on PolkadotJS.
Simply select the withdraw request(s) that you'd like to cancel, then click on the **Cancel Withdraw** button to initiate the transaction.

![PolkadotJS Extrinsics](/images/extrinsic.png)
![Unstake Requests Table: Cancel Withdraw](/images/restake/withdraw/cancel-withdraw.png)

- Under the **MultiAssetDelegation** section, select **ScheduleWithdraw** and enter the amount of assets to withdraw.
### Execute a Withdraw Request

![PolkadotJS ExecuteWithdraw](/images/restake/how-to-restake-polkadotjs/executewithdraw.png)
Once a withdraw request has reached its maturity, you can **execute** it to actually withdraw and release the assets.

Sign and submit the transaction. Make sure the account you are using has enough balance to cover the transaction fee.
Tangle DApp makes this process easy by simply clicking on the **Execute All** button. There's no need to select specific withdraw requests, as this action will execute all withdraw requests that have reached their maturity within a single transaction. If the button is disabled, it means that there are no withdraw requests that have reached their maturity yet.
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 public/images/restake/withdraw/steps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 310ab80

Please sign in to comment.