Ergo Addresses

Robert Wolf

July 24, 2019

In today's article, we will have a closer look into the Ergo address formatting. In addition to that we are going to explain how they work specifically as well as what makes them preferable to other types of blockchain addresses.

Let's start at the very beginning.

The moment you install any cryptocurrency wallet you automatically create an address with it. Very loosely speaking you can compare a wallet to a traditional bank account and an address to the matching account number.
It is precisely one of these alphanumeric addresses that's needed to either send money from person A to person B, receive money or withdraw your mining rewards.
If you want to get started using the Ergo wallet and dive deeper into its functions go check out the following link.

Now, what exactly are addresses?

Addresses are short strings that correspond to certain scripts and are used to protect a box (this post that core developer kushti published on our forum explains very well what a "box" is).
Unlike a (hex-encoded) binary representation of a script, an Ergo address is using a Base58-encoding and therefore has some very useful characteristics to it which the binary representation do not offer:

  • The integrity of an address can easily be checked via an integrated checksum (which is a "small-sized datum derived from a block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage", according to Wikipedia).
  • A prefix of the address is showing you the network and address type. In particular, the network prefix prevents you from mistakenly sending mainnet tokens to the testnet address.
  • The address is using an encoding (namely, Base58 as mentioned) which is avoiding similarly looking characters and is friendly to double-clicking and also line-breaking in emails.
  • An address is encoding network type, address type, checksum, and enough information to correspond with particular scripts.

Let's look at the prefix byte which contains information about the network and address types:

Possible network types are:

  • Mainnet - 0x00
  • Testnet - 0x10

Address types are (semantics described below):

  • 0x01 - Pay-to-PublicKey(P2PK) address
  • 0x02 - Pay-to-Script-Hash(P2SH)
  • 0x03 - Pay-to-Script(P2S)

For an address type, we form content bytes as follows:

  • P2PK - serialized (compressed) public key
  • P2SH - first 192 bits of the Blake2b256 hash of serialized script bytes
  • P2S - serialized script (this is where mining rewards go!)

For example, sending 10 Ergs to a P2PK address usually means that a corresponding transaction
will contain a box in which 10 Ergs are locked by a public key encoded in the P2PK address. Similarly,
in case of a P2S address the box will be locked by a script encoded in the address. In the most complicated case of a
P2SH script, the box will be protected by a special predefined script which is taking first 192 bits of Blake2b256 hash
value for a script which should be shown by an input spending the box.

Here is an example of how particular addresses are going to look on the testnet:

  • 3 - P2PK (3WvsT2Gm4EpsM9Pg18PdY6XyhNNMqXDsvJTbbf6ihLvAmSb7u5RN)
  • ? - P2SH (rbcrmKEYduUvADj9Ts3dSVSG27h54pgrq5fPuwB)
  • ? - P2S (Ms7smJwLGbUAjuWQ)

And here is how they are looking on our mainnet:

  • 9 - P2PK (9fRAWhdxEsTcdb8PhGNrZfwqa65zfkuYHAMmkQLcic1gdLSV5vA)
  • ? - P2SH (8UApt8czfFVuTgQmMwtsRBZ4nfWquNiSwCWUjMg)
  • ? - P2S (4MQyML64GnzMxZgm, BxKBaHkvrTvLZrDcZjcsxsF7aSsrN73ijeFZXtbj4CXZHHcvBtqSxQ)

In short summary:

  • Prefix byte = network type + address type (for example, P2S script on the testnet starts with 0x13 before Base58)
  • checksum = leftmost_4_bytes (blake2b256 (prefix byte || content bytes))
  • address = prefix byte || content bytes || checksum

If any of this sparked your interest, you are very welcome to join our community and ask further questions on our telegram channel and/or forum.
See you there!

Share post

Bene V2 is Here: Multi-Asset Fundraising, Expanded Wallet Support, and Enhanced UI

Bene V2 is Here: Multi-Asset Fundraising, Expanded Wallet Support, and Enhanced UI

The ecosystem of decentralized applications (dApps) on Ergo is constantly evolving.

Ergo Platform

November 28, 2025

Ecosystem Update: Duckpools Rolls Out V2 Site Preview

Ecosystem Update: Duckpools Rolls Out V2 Site Preview

The team behind Duckpools, a prominent lending and borrowing protocol on the Ergo blockchain, has released a comprehensive develop.

Ergo Platform

November 26, 2025

Ecosystem Spotlight: USE, a Universal Stablecoin for Ergo

Ecosystem Spotlight: USE, a Universal Stablecoin for Ergo

With the protocol nearing deployment, the Community Liquidity Bootstrapping (CLB) event is set to begin on November 25th, allowing.

Ergo Platform

November 24, 2025

Rosen Bridge Nears Bitcoin Runes Launch

Rosen Bridge Nears Bitcoin Runes Launch

Rosen Bridge has entered the final phase for its Bitcoin Runes integration. You can now set up your Bitcoin-Runes watcher.

Ergo Platform

November 23, 2025

GitCircles and Ergo: Fair Rewards for Open Source Contributions

GitCircles and Ergo: Fair Rewards for Open Source Contributions

Open source software powers much of the digital world — from the apps on your phone to the infrastructure of the internet itself.

Ergo Platform

October 12, 2025

Bitcoin Runes + Rosen Bridge: A Practical Path for Multi-Chain Fungible Assets

Bitcoin Runes + Rosen Bridge: A Practical Path for Multi-Chain Fungible Assets

The big idea Bitcoin finally has a clean way to represent fungible tokens.

Ergo Platform

September 30, 2025

ChainCash: Money That Carries Its Own Story

ChainCash: Money That Carries Its Own Story

ChainCash records reserves and signatures for each note on Ergo.

Ergo Platform

September 23, 2025

Braiding Lunarpunk and Solarpunk through Merged Mining

Braiding Lunarpunk and Solarpunk through Merged Mining

The question is simple.

Ergo Platform

September 2, 2025

Machina Finance: Off-Chain Execution, On-Chain Trust

Machina Finance: Off-Chain Execution, On-Chain Trust

Machina Finance is an innovative, bot-driven decentralized exchange (DEX) being developed on the Ergo blockchain.

Ergo Platform

September 1, 2025

Ergo Infrastructure DAO: Decentralizing the Backbone of the Ergo Ecosystem

Ergo Infrastructure DAO: Decentralizing the Backbone of the Ergo Ecosystem

Ergo’s mission has always been rooted in decentralization, not just at the consensus layer, but across the entire stack.

Ergo Platform

August 13, 2025

Mew Finance: A Playful DeFi Toolkit for the Ergo Ecosystem

Mew Finance: A Playful DeFi Toolkit for the Ergo Ecosystem

Mew Finance is a decentralized application suite on the Ergo Blockchain.

Ergo Platform

August 12, 2025

Lithos: Decentralizing Mining with On-Chain Pools

Lithos: Decentralizing Mining with On-Chain Pools

Lithos is a new protocol designed to overhaul how mining pools work by moving them on-chain, giving miners full control, and elimi.

Ergo Platform

July 24, 2025

Sigma 6.0: A Smarter, More Flexible Ergo

Sigma 6.0: A Smarter, More Flexible Ergo

Sigma 6.0 is a major proposed upgrade to the Ergo blockchain.

Ergo Platform

July 23, 2025

Shaping Rosen's Future: A Community Call on Five Key Treasury Proposals

Shaping Rosen's Future: A Community Call on Five Key Treasury Proposals

Rosen co-founder, Armeanio, has submitted five new proposals to the Rosen Treasury.

Ergo Platform

July 9, 2025

Ergo's Extended UTXO and the Rise of Artificial Economic Intelligence

Ergo's Extended UTXO and the Rise of Artificial Economic Intelligence

A Practical Vision for Autonomous Economic Agents Autonomous economic agents on the Ergo blockchain perform useful work in a real.

Ergo Platform

May 12, 2025

ErgoHACK X: Artificial Intelligence on the Ergo Blockchain

ErgoHACK X: Artificial Intelligence on the Ergo Blockchain

Celebrating a Decade of Decentralized Innovation Join the 10th anniversary ErgoHACK and be at the forefront of the AI revolution o.

Ergo Platform

April 10, 2025

Ergohack 9: Innovations in UI/UX and Mining – Meet the Visionary Winners!

Ergohack 9: Innovations in UI/UX and Mining – Meet the Visionary Winners!

The latest annual Ergo hackathon, ErgoHack IX, was a six-day event held at the end of October.

Ergo Platform

December 9, 2024

ErgoHack IX: Next Steps Towards Increased Adoption

ErgoHack IX: Next Steps Towards Increased Adoption

We’ve come a long way since the early days of Bitcoin, and cryptocurrencies have boomed into an industry with thousands and thousa.

Ergo Platform

October 20, 2024

Ergo Vs Other Blockchain Platforms: What’s The Difference?

Ergo Vs Other Blockchain Platforms: What’s The Difference?

Ergo offers a series of unique features that set it apart from other blockchain platforms.

Ergo Platform

August 19, 2024

Earning With The Rosen Bridge

Earning With The Rosen Bridge

Bitcoin has officially bridged to the Ergo ecosystem via Rosen Bridge! This newly built, decentralized infrastructure enables trus.

Ergo Platform

August 8, 2024

How Sigma Chains Will Bring Bitcoin To Ergo

How Sigma Chains Will Bring Bitcoin To Ergo

Ergo’s powerful, flexible, and secure smart contract functionality opens the door to a whole host of new use cases for Bitcoin DeF.

Ergo Platform

July 15, 2024