Account Address

May 14, 2024 1:04:11 PM

What is an Address in Blockchain?

A address is an identifier. Decentralized networks use addresses to send and receive transactions. In practice, addresses are compacted validation instructions. They result from hashing and encoding the script used to validate a transaction. Authenticating an outgoing transaction involves providing the script that generates the address and matching signatures.

Blockchains may have different address formats. Each network can use different cryptographic algorithms to generate addresses. The derivation process is deterministic; it’s possible to re-generate the same address when the same input and algorithm are used.

Users can create one account using applications. The application will generate a key pair (public and private keys) and derive the address from the public key. The private key is kept secret and is used to sign transactions. Visit the page for more information on key pairs.

Smart Contract Addresses

Applications deployed on blockchains have addresses. Instead of using a key pair, the address is derived from the contract’s code and deployment transaction. Smart Contract addresses are also referred to as script hashes.

Address - Key Concepts

  • Account Identifier: Each address identifies the owner’s account or wallet in the blockchain.
  • Non-Reversible: Addresses can’t be reversed to reveal the verifying script or the public key.
  • Script Hash: Addresses are derived from script hashes.
  • Privacy Concerns: Transactions are public, allowing anyone to trace the flow of funds between addresses.
  • Regulatory Compliance: Some jurisdictions require users to report their blockchain addresses for tax purposes.

Address Usage in Transactions

Users provide their blockchain address to receive coins or NFTs in a transaction. The sender uses this address to specify the transaction’s destination. An address can be included as part of a transaction or as a parameter in a smart contract function call.

Addresses and script hashes are the same but used in different contexts. Addresses are human-readable strings, while script hashes are used in the underlying blockchain code. Wallet applications automatically convert addresses to script hashes.

Visit the Neo Converter website for manual conversions between addresses and script hashes.

Examples of Blockchain Addresses

Each blockchain has its address format. Examples:

  • Legacy Addresses: Begin with ‘A’ and are 34 characters long. Example: ANuupE2wgsHYi8VTqSUSoBqeFR8RtRd6MC.
  • Neo N3 Addresses: Follow the same format as Neo Legacy, using the ‘N’ prefix. Example: NND2RT3tes79rDPqURVAuGQFz5gA88veQ3.
  • Bitcoin (BTC) Addresses: It can start with ‘1’, ‘3’, or ‘bc1’ for newer addresses. Example: 1FzWLk9dE5qoVWE4HCHzWNVKb8qVJzJJtu.
  • Ethereum (ETH) Addresses: Begin with ‘0x’ followed by a 40-character hexadecimal string. Example: 0x198EF1EC325A96CC354C7266a038BE8B5C558F67.

Address Security

Sending funds to an incorrect address or network will result in losing funds. Scammers may attempt to trick users into sending funds from similar-looking addresses. Always double-check the transaction details before submitting them. If unsure, send a small amount first to verify the transaction’s success.

Address Generation

Addresses are generated from public keys using a hash function. A hash function is a mathematical algorithm that takes an input and produces a fixed-size output. are also one-way, meaning it is computationally infeasible to reverse the process.

Public Key Address

On Ethereum, the public key is hashed using the Keccak-256 algorithm to generate the address. The last 20 bytes of the hash output are used as the address.

Neo, Bitcoin and others use verification scripts to generate addresses. The public key is used to create the script, which is then hashed to produce the address.

Contract Addresses

on blockchains have addresses. These addresses are used to interact with the contract, such as invoking functions or sending tokens.

Contract addresses are derived from the contract’s code and deployment transaction. They identify the contract on the blockchain and allow interaction with it. Users can send tokens to contract addresses to trigger specific functions or operations.

Account Address on the Neo Blockchain

The Neo blockchain uses the secp256r1 curve for key generation. Once a public key is generated, a verification script is created. This script is then hashed to produce a script hash, which is encoded into an address:

  • Generate a Private Key: Use a secure random number generator to create a private key.
  • Generate the Public Key using secp256r1: Multiply the base point by the private key to get the public key.
  • Create the Verification Script: Use the compressed public key and the CHECKSIG operation to create a verification script.
  • Create the Script Hash: Hash the script using the SHA-256 algorithm and then RIPEMD-160 to produce a 20-byte hash.
  • Add the Address Version: Add an address version prefix.
  • Encode the result using Base58Check: Convert the hash to a human-readable address using Base58Check encoding.

Single Signature Address

Addresses and script hashes are convertible between each other. Neo Legacy and Neo N3 addresses differ due to changes in the verification script and address encoding.

The Neo network is working to support additional curves in the future. This will expand interoperability with other blockchain networks. Visit the Neo Converter website to convert between addresses and script hashes.

Multi-Signature Addresses

Multi- addresses require multiple signatures to authorize a transaction. The verification script of a multi-signature address includes multiple public keys and a threshold for the required signatures. The opcode CHECKMULTISIG is used to verify the signatures.

Single Signature Address

Note that multi-signature addresses are more complex to manage and require coordination between multiple parties.

The public keys must be ordered to ensure the correct address is generated. Using a different order will result in a different hash and address. SDKs and other tools will automatically order the public keys to generate the correct address.

Neo Addresses: Neo Legacy vs. Neo N3

Neo blockchain supports two address formats: Neo Legacy and Neo N3, differentiated primarily by their prefixes and underlying technology. Legacy addresses begin with ‘A’, while N3 addresses start with ‘N’.

When dealing with NEO and GAS on exchanges, users must check the address format to identify the used version.

Transactions between Neo Legacy and Neo N3 addresses are incompatible. Sending funds across these network types will result in the permanent loss of those funds.

Payable Contracts on Neo

On Neo, smart contracts must implement the onNEP17Payment and onNEP11Payment methods to receive tokens. The transfer will be rejected if the contract doesn’t implement these methods.

One example is Neo Burger. Users can send NEO tokens to the contract address to automatically receive BNeo tokens. If users send unsupported tokens, the contract will reject the transfer.

Generating an Address using a Wallet

Download a wallet application to generate an account with a unique address. The Neon Wallet is popular with Neo users.

Wallets generate addresses by creating a key pair (public and private keys) and processing the public key. The public key and the address are mathematically linked using cryptographic algorithms.

Sharing an address is safe, as it only allows others to send funds to the address. However, sharing the private key will compromise the security of the account.

Generating an Exchange Address

Once logged in to an exchange, navigate to the deposit section and select the desired . The exchange will generate a unique address to receive funds. In this case, the exchange manages the private keys, and users can only deposit and withdraw funds.

Leaving funds on an exchange should be done only for trading purposes. For long-term storage, transfer the funds to a secure wallet where the private keys are under the user’s control.

Reusing Addresses

While common, reusing addresses compromises privacy and security. It allows others to trace the flow of funds between transactions, potentially revealing sensitive information about the account. Creating a new address for each transaction can enhance privacy and security by obfuscating the flow of funds.

Advanced users can generate a new address for each transaction using hierarchical deterministic wallets (HD wallets). This allows multiple addresses to be generated from a single seed, enhancing privacy and security. However, the need to manage multiple addresses can severely impact the user experience.

Address Traceability

All transactions on a blockchain are public, allowing anyone to trace the flow of funds between addresses. This transparency is a key feature of , ensuring anyone can verify transactions.

Explorers like EtherScan and Dora allow users to view the transaction history of addresses on Ethereum and Neo, respectively. These tools provide detailed transaction information, including the sender, recipient, and amount transferred. Users can also query the blockchain directly using the available APIs.

The public nature of blockchain transactions offers transparency and accountability and raises privacy concerns. Users should be aware of the traceability of blockchain addresses and take steps to protect their privacy when necessary.

Legal Implications of Anonymous Transactions

Most blockchain networks allow private but not fully anonymous transactions. Privacy features can enhance user security, but they can also facilitate illegal activities.

Law enforcement agencies have taken action against privacy-focused coins like Monero and Zcash due to their potential use in money laundering and tax evasion. Developers can be held liable for creating privacy features that enable illegal transactions, while users may face legal action for using them.

Using fully anonymous networks can provide additional privacy, but users should know the legal implications. Exchanges have delisted privacy coins due to compliance problems. If privacy is a concern, creating a new address for each transaction can enhance privacy without the legal risks.

Tracking Addresses for Tax Reporting

In some jurisdictions, users must share their blockchain addresses with the government. Keeping track of owned addresses is necessary for tax reporting and compliance with local regulations.

Most blockchains have tools that allow users to query their transaction history, allowing the balance to be calculated. Users can also use explorers to track the flow of funds between addresses. To avoid discrepancies, retrieve the information from the correct date range. Consult a tax professional for advice on reporting blockchain transactions.