Skip to main content

Withdrawals

The Unit Withdraw Pallet is a Substrate-based framework designed to facilitate the withdrawal of tokens to native blockchains. This documentation details its functionalities, interfaces, and key components.

Overview

This pallet enables users to initiate and manage token withdrawals from the Substrate blockchain to native chains. It supports various operations such as creating, canceling, executing, and accepting withdrawals, as well as managing worker registrations.

Goals

The primary objectives of the pallet include:

  • Enabling token withdrawals to native blockchains.

  • Allowing users to cancel their withdrawal requests.

  • Permitting the execution of withdrawal requests once they're validated.

  • Enabling workers (or validators) to accept withdrawal requests, signifying their readiness for processing.

The withdrawal process for obtaining underlying assets from wrapped assets involves the following steps:

Initiate Withdrawal Request:

Begin by creating a withdrawal request to convert wrapped assets into their underlying counterparts.

Processing by Another User:

Once initiated, another user can choose to process your withdrawal request. They will send you the corresponding underlying assets.

Off-chain Verification:

Off-chain workers verify the receipt of the underlying assets. This ensures the security and authenticity of the transaction.

Transfer of Wrapped Assets:

Upon verification, your wrapped assets are transferred to the user who processed the withdrawal request.

Processing Fee Distribution:

A processing fee of 0.5% of the withdrawal amount is sent to the user who processed the withdrawal. Additionally, another 0.5% is distributed to the pool of off-chain workers as a reward for their contributions.

Seamless Exchange of Assets:

The withdrawal process ensures a seamless exchange of assets between users, while also compensating those involved in facilitating the transaction.

Note:

TAKE NOTE

The exchange pool of the asset being withdrawn needs to be initialized before executing the withdrawal.

To initiate a withdrawal

To initiate a withdrawal, users must follow these steps:

Minimum Withdrawal Amount:

Ensure that the Unit wallet contains more than $100 worth of ETHU to initiate a withdrawal.

Add Address:

Navigate to Profile -> Settings -> Wallet -> Token (ETH) to add the desired withdrawal address.

Initiate Withdrawal:

Once the address is added, initiate the withdrawal process.

Pending State:

The withdrawal enters a "Pending" state after initiation, indicating that it requires processing by another user.

Processing by Another User:

Another user must process the withdrawal request for it to be executed.

Execution:

Once processed, the withdrawal is executed, with ETHU being minted for the second user and deducted from the first user's wallet.

Rewards:

As compensation, 0.5% of the initial withdrawal amount goes to the staking workers, and another 0.5% is awarded to the second user who processed the withdrawal.

By following these steps, users can efficiently initiate and process withdrawals of ETHU tokens within the Unit Network, ensuring seamless asset transfers and appropriate rewards for participants.