Skip to main content

Ethereum (ETH)

Ethereum wallet structure​

An Ethereum wallet has the following structure.

  • Main address
  • Fee address
  • Child address

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






Child address​

Octet supports EOA-type and CA-type child addresses for Ethereum. Each type has a different child address creation procedure and gathering method. One wallet can create only one type of child address, which can be chosen when creating the wallet.

FeeEOA(External Owned Account)CA(Contract Account)
Child address deployment costXO
Ethereum gathering feeOX
Token gathering feeOO
Fee injection costOX

1. EOA​

Create child addresses by calling the Create Child Address API. Generally, one child address is given to each end user. You can check the created child addresses in [Child Addresses] on the console or by calling the Get Child Address List API.

Response example

[
{
"address": "0x236c41418f0320DC7233C8c9dC99EEa5930341D9",
"name": "Test child address"
}
]


2. CA​

CA-type child addresses must be deployed to the Ethereum network after the address is issued. At this point, a deployment cost is incurred per child address. You can still deposit assets to undeployed child addresses. When assets are deposited, they are reflected normally in the balance and deposit history of the child address. However, they are not included in the gathering targets. Therefore, to gather the assets of a child address, you must first deploy that child address. Even if gathering is executed, the assets of undeployed child addresses are not gathered.


Creating CA child addresses​

Create child addresses by calling the Create Child Address API. Generally, one child address is given to each end user. You can check the created child addresses in [Child Addresses] on the console or by calling the Get Child Address List API.

Response example

[
{
"address": "0x236c41418f0320DC7233C8c9dC99EEa5930341D9",
"name": "Test child address"
}
]

Deploying CA child addresses​

To deploy CA-type child addresses, you must pay the deployment cost. This cost is paid from the fee address. Therefore, you must check the balance of the fee address before deploying child addresses.

1. Deploying from the console​

You can deploy child addresses from Console - Select a wallet - [Wallet Info] - [Child Addresses]. Click the [Deploy] button of the child address to deploy.


2. Deploying with the API​

Deploy child addresses by calling the Deploy CA Child Address API. You can check whether the deployment is complete by calling the Check CA Child Address Deployment API.

Response example

{
"result": true
}





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. In Ethereum, the gathering process and fee process differ depending on the child address type and asset type.


1. EOA​

Gathering ETH​

When ETH gathering is requested for EOA-type child addresses, the assets stored in every child address are transferred to the main address. At this point, one transaction occurs per child address. For example, if ETH is stored in 10 child addresses, 10 transactions occur in total.

A 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.

Gathering tokens​

When token gathering is requested for EOA-type child addresses, the assets stored in every child address are transferred to the main address. At this point, one transaction occurs per child address. For example, if tokens are stored in 10 child addresses, 10 transactions occur in total. A gathering fee occurs once per transaction.

At this point, if the child address has no ETH to pay the fee, ETH 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 ETH and proceeds with the gathering. The gathering process is as follows.

  1. Request gathering.
  2. ETH 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.

2. CA​

Gathering ETH​

When ETH is deposited to a CA-type child address, gathering proceeds automatically. No gathering fee occurs. If ETH is deposited to an undeployed child address, it is gathered automatically after the child address is deployed.


Gathering tokens​

When token gathering is requested for CA-type child addresses, the assets stored in every child address are transferred to the main address as one transaction. The gathering fee is deducted from the fee address. Therefore, before gathering, you must fill the fee address with the fee (ETH) so that its balance is not insufficient. If tokens are deposited to an undeployed child address, they are gathered automatically after the child address is deployed.

  1. Request gathering.
  2. A transaction is created for each child address to be gathered.
  3. The fee is paid from the fee address and the transaction is propagated.
  4. 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 counts only assets in finalized status. 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 Ethereum 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 1 Gwei.