Account

Pollux operates on an account model where the address serves as a unique identifier for an account, and performing operations on an account requires a private key signature. An account encompasses various attributes, including POX balances, bandwidth, energy, and more. Accounts have the capability to initiate transactions, thereby adjusting their POX balances, deploy smart contracts, and execute smart contracts whether they were deployed by the account owner or others. Every Pollux account has the opportunity to apply for Super Representative status or participate in voting for elected Super Representatives. Accounts form the foundational element for all activities within the Pollux ecosystem.

Account Type

Pollux features two distinct account types:

  1. External Account - Also known as a general account, this type is controlled by an external entity possessing the corresponding private key.

  2. Contract Account - Representing a smart contract deployed on the Pollux network, a contract account is governed by its underlying code, and no single entity possesses the private key for these accounts.

Both account types share the following capabilities:

  • Receiving, holding, and sending POX or tokens.

  • Interacting with deployed smart contracts.

Account & Key Pair

An account comprises a cryptographic pair of keys: a public key and a private key. The public key is associated with an address, while the private key is employed to sign transactions. This key pair serves as a crucial element in verifying the authenticity of a transaction, preventing any attempts at forgery.

This security measure thwarts malicious actors from disseminating fraudulent transactions, as the sender of a transaction can always be verified. For instance, when Alice intends to transfer POX from her account to Bob's, she must generate a transaction and submit it to the Pollux network for validation. The key pair enables Alice to demonstrate that she is the legitimate initiator of the transaction request. Without this encryption mechanism, a malicious actor like Eve might attempt to broadcast a similar request, such as "send 5 POX from Alice's account to Eve's account," and without the encryption, it would be challenging to verify whether the transaction is genuinely initiated by Alice.

External Account Creation

Pollux employs the same key pair generation algorithm as Ethereum, utilizing the elliptic curve digital signature algorithm ECDSA-secp256k1. The process for generating a key pair involves the following steps: Firstly, a random private key is generated, comprising 64 hexadecimal characters. Subsequently, a public key is derived from the private key using the Elliptic Curve Digital Signature Algorithm. Lastly, the last 20 bytes of the Keccak-256 result of the public key are taken, and the Hex format address is formed by adding "37" at the beginning.

Account Address Format The POX network account address, in addition to the Hex format, is also represented in Base58 format.

Hex When comparing the Hex format of the Pollux address generated from the same private key with the Ethereum address, everything remains identical except for the initial "37."

378840E6C55B9ADA326D211D818C34A994AECED808
  • Note: The POLLUX address in Hex format removes the leading 37 to get the Ethereum address.

  • Base58 A Base58 address can be obtained from the base check calculation of a Hex address. All Base58 addresses begin with P

PM1coVbN5JgPSSQCfDVRcnK7yGYptRHgQ9

Account Activation

To make newly created accounts accessible on the Pollux blockchain and visible through API queries or on the chain explorer, an activation process is necessary. Activation can be achieved through the following two methods:

  1. Transfer of POX :

    • Transfer any amount of POX from an existing account to the new account.

  2. Java-Pollux's wallet/create account API:

    • Employ Java-Pollux's wallet/create account API to generate a transaction from an existing account, sign the transaction, and broadcast it to the Pollux network.

Activating a new account incurs a fee of 0 POX. If the sender of either transaction possesses adequate Bandwidth obtained through staking POX, the account creation process will solely consume bandwidth. Alternatively, if the sender lacks sufficient Bandwidth, 0.025 POX will be burned to cover the bandwidth cost.

As an alternative, account activation can also be achieved by transferring POX to an inactive account address within a smart contract. In this method, aside from the bandwidth and energy consumed by regular contract calls, an additional 25,000 energy is required. Importantly, this approach eliminates the account creation fee and the 0.025 POX bandwidth fee.

Contract Account

When a smart contract is deployed on the Pollux network, the associated contract account address is generated. This address is computed using the ID of the deployed contract transaction and the sender's account address. The format of the contract account address mirrors that of external accounts and can be represented in either hex or Base58. For instance,

Base58:PPjLSkkmDcKWGsKGawEMDZcGWqsZbizt6b
HEX:37A614F803B6FD780986A42C78EC9C7F77E6DED13C

Last updated