Skip to main content

Wemix (WEMIX)

Wemix wallet structure​

A Wemix wallet has the following structure.

  • Main address
  • Fee address
  • Child address

TIP The fee address is used to inject the fee (WEMIX) required for gathering tokens in a centralized wallet into child addresses, or to inject the fee (WEMIX) into child addresses as needed.







Deposit​

Deposit status​

When an asset sent from the outside arrives at the main address or a child address, Octet recognizes it as a deposit. However, the deposit is not processed as completed even if the deposit transaction is included in a block. To ensure the finality of the transaction, additional blocks must be generated before the transaction is processed as completed (FINALIZED). When an asset is sent from the outside but has not arrived at the main address or a child address, that transaction is not recognized. Therefore, there is no failed (FAILED) status for deposit transactions.

Status nameDescription
UNFINALIZEDDeposit transaction is included in a block
FINALIZEDDeposit transaction is included in a block and the next block is generated




Gathering​

Gathering is only available in centralized wallets.

Gathering process and fees​

Assets stored in child addresses do not move to the main address until gathering is requested. Therefore, you should gather regularly to avoid a deficit in the main address.

When gathering of a specific asset is requested, the WEMIX or tokens stored in every child address are transferred to the main address. At this point, one transaction occurs per child address. For example, if WEMIX is stored in 10 child addresses, 10 transactions occur in total.


1. Gathering WEMIX​

A WEMIX gathering fee occurs once per transaction, and it is deducted from the assets to be gathered. Gathering does not proceed for child addresses whose assets to be gathered are less than the estimated fee. The gathering process is as follows.

  1. Request gathering.
  2. A transaction is created for each child address to be gathered.
  3. The optimal fee is calculated and the transaction is propagated.
  4. The gathering is completed when the transaction is included in a block.

2. Gathering tokens​

A token gathering fee occurs once per transaction. At this point, if the child address has no WEMIX to pay the fee, WEMIX is injected from the fee address into the child address. A fee (fee injection cost) occurs in this process as well. The child address pays the fee with the received WEMIX and proceeds with the gathering. The gathering process is as follows.

  1. Request gathering.
  2. WEMIX to be used as the gathering fee is injected from the fee address into the child address.
  3. A transaction is created for each child address to be gathered.
  4. The optimal fee is calculated and the transaction is propagated.
  5. The gathering is completed when the transaction is included in a block.


Gathering status​

Gathering status is divided into seven statuses depending on the gathering process. Assets stored in child addresses are in awaiting gathering (AWAITING_GATHERING) status.

If a fee injection is required when gathering is requested, the asset status changes to awaiting fee injection (AWAITING_FEE_INJECTION). When the fee injection transaction is created, the asset status changes to fee injecting (FEE_INJECTING). If the fee injection fails, the asset status is processed as fee injection failed (FEE_INJECTION_FAILED).

When the fee injection succeeds and a gathering transaction is created, the asset status changes to gathering (GATHERING). When the transaction is included in a block, the asset status is processed as gathering completed (COMPLETED) and the gathering is finished.

When gathering is attempted but the transaction fails, the asset status remains as gathering failed (GATHERING_FAILED). Assets in fee injection failed or gathering failed status are included in the gathering targets again. When gathering is attempted but the transaction could not be created due to insufficient fees, it remains in awaiting gathering (AWAITING_GATHERING) status.

Status nameDescription
AWAITING_GATHERINGAwaiting gathering
AWAITING_FEE_INJECTIONAwaiting fee injection
FEE_INJECTINGFee injecting
FEE_INJECTION_FAILEDFee injection failed
GATHERINGGathering transaction created
COMPLETEDGathering transaction completed
GATHERING_FAILEDGathering transaction failed






Withdrawal​

Withdrawal status​

Unlike deposits, a withdrawal is processed as withdrawal completed (FINALIZED) as soon as the transaction is included in a block.

Status nameDescription
AWAITING_DECISIONAwaiting withdrawal approval
REJECTEDWithdrawal is rejected
AWAITING_WITHDRAWALWithdrawal is approved and awaiting withdrawal
PENDINGWithdrawal transaction is created
FINALIZEDWithdrawal transaction is included in a block
FAILEDWithdrawal transaction failed






Balance lookup criteria​

You can check the balance of the assets stored in a specific address by calling the Get Address Balance API. The balance returned is divided into total balance and liquid balance.

  • Total balance means all assets with a confirmation of 1 or more.
  • Liquid balance means the assets that can be gathered or withdrawn. The liquid balance of a child address means the assets that can be gathered, and the liquid balance of the main address means the assets that can be withdrawn.





Fees​

Estimated fees​

The estimated fee is calculated by multiplying the gas price by the gas limit.

Estimated fee = Gas Limit x Max Fee Per Gas
  • Gas Limit is the maximum amount of gas usage. Octet fixes the Wemix gas limit at 21,000, and since the gas limit for tokens varies depending on how they are implemented, the gas limit for tokens is fixed at 100,000. The actual gas usage may be less than this, and the fee is charged only for the actual gas used.
  • Max Fee Per Gas is the maximum fee per gas. You can get this value by calling the Get Fee API. The actual fee per gas may be less than this.


Transaction fees​

The fee used for a transaction is calculated by multiplying the gas price by the amount of gas used.

Transaction fee = Usage by Txn x Gas Price
  • Gas Price includes Max Priority Fee Per Gas, the fee provided to miners. Octet fixes this value at 110 Gwei.