Wemix
Wallet Structure
The semi-custodial wallet of Wemix has the following structure.
- Main Address
- Fee Address
- Child Address
TIP
The fee address is used to recharge the child address with the fees (WEMIX) if necessary.
Child Address
Generates child addresses by calling the Generate Child Address API. Generally, one child address is given to each end user. Generated child addresses can be checked from [Child Address Information] from the console or by calling the Access Child Address List API.
Response example
[
{
"address": "0x236c41418f0320DC7233C8c9dC99EEa5930341D9",
"name": "test wemix child address"
}
]
Deposit
Deposit Status
When an asset from the outside arrives at the main or a child address, Octet recognizes it as a deposit. However, the deposit is not finalized even if the deposit transaction is included in the blocks. Additional blocks must be generated to finalize(FINALIZED
) the transaction to ensure the integrity of the transaction. When an asset is sent to a main or a child address but has not arrived, that transaction is not recognized. Therefore, there is no FAILED
status for the deposit transaction.
Status name | Description |
---|---|
UNFINALIZED | Deposit transaction is included in the blocks |
FINALIZED | Deposit transaction is included in the blocks and the next block is generated |
The number of blocks required to finalize the deposit is different depending on the network. Both testnet and mainnet require additional 20 blocks to finalize the transaction.
테스트넷 | 메인넷 |
---|---|
20 block (about 20s) | 20 block (about 20s) |
Deposit Confirmation
1. Checking from the Console
You can check the deposit status from [Transaction History] on the console. UNFINALIZED
deposits are displayed as ‘Processing’, and FINALIZED
deposits are displayed as ‘Completed’.
2. Checking with Webhooks
When a deposit is finalized to a main or a child address, a deposit webhook will be sent. You can check the deposit status from the received webhook. For more information about how to use webhooks and their data structure, check the 'Webhook' page.
Withdrawal
Withdrawal Process
Semi-custodial wallet withdraws assets from the main and child addresses to the outside. In this case, gathering fees will be deducted from the address to be withdrawn. For example, when withdrawing from ‘child address A’, a fee will be deducted from ‘child address A’. Therefore, the address to be withdrawn should have assets (WEMIX) to pay the fee. Withdrawal will not proceed if the withdrawal fee is insufficient.
- Request withdrawal.
- Generate transaction.
- Calculates the optimal fees and propagates the transactions.
- Withdrawal is completed when the transactions are confirmed in the blocks.
Withdrawal Status
Unlike a deposit, a withdrawal is finalized(FINALIZED
) at the moment when the transaction is included in the blocks.
Status name | Description |
---|---|
AWAITING_DECISION | Awaiting withdrawal approval |
REJECTED | Withdrawal is denied |
AWAITING_WITHDRAWAL | Approved and awaiting withdrawal |
PENDING | Withdrawal transaction is generated |
FINALIZED | Withdrawal transaction is included in the blocks |
FAILED | Withdrawal transaction failed |
Withdraw
You can request a withdrawal from the main or child address to the outside by calling the Request Withdrawal API. The uuid
value will be returned when the withdrawal request is successful. The value can be used to access the withdrawal process.
Response example
{
"uuid": "18012e3f-07f3-45ec-862b-f020c0ca935a"
}
Withdrawal Confirmation
1. Checking from the Console
You can check the withdrawal status from [Transaction History] on the console. AWAITING_WITHDRAWAL
or PENDING
withdrawals are displayed as ‘Processing’, and FINALIZED
withdrawals are displayed as ‘Completed’.
2. Checking with API
You can check the progress of a specific withdrawal transaction by calling the Access Withdrawal Transaction Information API.
Response example
{
"idx": 2220480,
"coin": {
"idx": 11,
"symbol": "WEMIX",
"nameKo": "위믹스",
"nameEn": "Wemix",
"status": "ACTIVATED",
"type": "DEFAULT",
"contractAddress": null,
"decimals": 18,
"createdDate": "2022-11-11T02:52:24.052Z",
"modifiedDate": "2022-11-11T02:52:24.052Z"
},
"uuid": "8bc699a0-7dbd-4b34-b546-e908b448907d",
"fromAddress": "0x5401fC8E23f594aF7db8de753b81393cc14e0dc2",
"toAddress": "0x3971bc926EEdb0301aE3e6cF80D4FE12F9053F6b",
"amount": "10.00000000000000000000",
"memo": null,
"requestId": "202211111535",
"type": "API",
"description": "",
"requiredApprovalCount": 2,
"useApiAutoApproval": false,
"useFeeDelegation": false,
"feePayerAddress": null,
"status": "AWAITING_DECISION",
"createdDate": "2022-11-11T06:35:26.586Z",
"modifiedDate": "2022-11-11T06:35:26.586Z",
"rejectedDate": null,
"transaction": null
}
3. Checking with Webhooks
When the withdrawal from the main address is finished, a withdrawal webhook will be sent. You can check the withdrawal status from the webhook. For more information about how to use webhooks and their data structure, check the Webhook page.
Balance Access Criteria
You can check the balance of the asset stored in a specific address by calling the Access Address Balance API. The accessed balances are specified into total balances and liquid balances.
- Total balance is all assets with a confirmation of 1 or above.
- Liquid balance is assets that can be withdrawn in each address.
Fees
Estimated Fees
Estimated fees are calculated by multiplying the gas limit and the gas price.
Estimated Fees = Gas Limit x Max Fee Per Gas
- Gas Limit is the maximum gas usage. Octet sets WEMIX gas limit to 21,000, and the gas limit for tokens is set to 100,000 since it varies depending on how the tokens are implemented. The actual gas usage could be less than that, and the fees are charged for the actual gas usage.
- Max Fee Per Gas is the maximum value of the fee per gas. You can access the value in real-time by calling the Fee/Gas API. Actual fee per gas could be less than that.
Transaction Fees
Transaction Fees are calculated by multiplying the gas usage and the gas price.
Transaction Fees = Usage by Txn x Gas Price
- Gas Price includes the fee paid to the miner, Max Priority Fee Per Gas. Octet sets the value to 110 Gwei.
Faucet
In the case of the testnet, you must obtain a testing WEMIX from the faucet website and deposit it. When an actual WEMIX is deposited in the testnet, it will not be recognized.
Updated about 1 year ago