August 29, 2018 2:46 pm

Introducing blockchain users

An overview of DIP-5

We are happy to announce the release of a new DIP: DIP-5 Blockchain Users. This blog post is intended to provide a brief, less-technical overview of them. The basic concept of blockchain users is simple and similar to many systems you already interact with — an account associated with your username. Although this is a bit oversimplified, it’s a good place to start. In this post I’ll attempt to clarify why they’re needed and provide an overview of how they work.

Why are they needed?

There are two significant reasons Dash is adding users to the blockchain. The first is a solution to an existing issue common to many cryptocurrencies and the second is an enhancement to enable additional features on the Dash network.

Before jumping into the details, I’d like to define what is meant by the terms “layer 1” and “layer 2” that appear in the descriptions below:

  • Layer 1 — refers to the blockchain and Dash Core
  • Layer 2 — refers to the functionality that the Evolution upgrade will add to the masternodes

1. Simplifying payment interactions

If you have much experience with cryptocurrency, this one is probably obvious. We may describe it using different words depending on our background, but it comes down to terms like: poor-UX, not user-friendly, and the classic “my grandma would never use this”. One reason for this is the “address exchange issue” — the inability to easily search for and pay a person/business by name without having to interact with intimidating-appearing QR codes or addresses derived from cryptographic hashes. Nearly 10 years into cryptocurrency use, we still resort to using other communication channels (e.g. email, SMS, etc.) to exchange payment addresses for non-face-to-face transactions.

Blockchain users improve this address exchange issue by abstracting it away (similar to how DNS allows us to remember “dash.org” instead of its IP Address). This allows you to look up a blockchain user by name and let your wallet handle the details of getting the payment address. The underlying transaction details won’t change — you just won’t have to be as focused on making sure you’re sending to “Xdt5w…” instead of “XdT5w…”.

2. Securing Evolution DAPs

Depending on your familiarity with Dash and knowledge of the upcoming Evolution upgrade, you may or may not be aware of Dash’s upcoming layer 2 upgrades. Future DIPs will continue to provide more details on these enhancements (which will not be covered in this post), but the very brief summary is that Evolution will enable developers to build blockchain-secured applications that take advantage of storage and API services provided by Dash’s masternode network. DAPs (decentralized application protocols) are the developer-defined protocols for storing and transitioning this application data thought the Dash decentralized API. Essentially, a DAP verifies the structure and format of data submitted by the application using it.

Blockchain users lie at the core of DAPs and their associated data. Unlike many centralized services we currently use, DAP-related data is owned by the blockchain user that provided it — you!

How do they work?

Blockchain users consist of four new layer 1 special transactions that are used to create, fund, and manage accounts. These four transactions (SubTxRegister, SubTxTopup, SubTxResetKey, and SubTxCloseAccount) are referenced in the following sections detailing blockchain user management.

User Management — Registration

Typically signing up for a username will happen via a Dash wallet which will handle the details, but it could be helpful to understand the underlying concepts.

The addition of blockchain user functionality allows you to select a username (i.e. “jsmith”) and register it on the Dash blockchain. The registration is permanent and although there is a small fee to cover the registration, there are not any ongoing fees to keep the account active after that.

In addition to a username, the registration transaction (SubTxRegister — a DIP-2 style special transaction) includes a public key associated with your private key. These keys are only used to prove ownership of the blockchain user. Payment keys/addresses are handled separately to avoid linking a username with its financial activity. This separation also improves security since leaking the private key for the blockchain user does not result in a loss of funds.

User Management — Security

There are two security features provided by the initial blockchain user DIP to help you protect your account:

  1. The SubTxResetKey special transaction allows you to change your private/public key (e.g. you could change your keys on a periodic basis).
  2. The SubTxCloseAccount special transaction allows you to close your account using any of your previous keys that are less than a certain age (~90 days). This is to make sure that damage due to a hijacked account (i.e. someone gets access to your private key) can be limited.

NOTE: The current version of the DIP does not support re-opening a closed account, so the account close transaction should be used with caution.

User Management — Credits

The concept of credits is somewhat analogous to “gas” in Ethereum — it is used to pay for “State Transitions” (changes to layer 2 data). DIP-5 does not cover these topics in great detail since they will be described more fully in future DIPs, but credits are related to the blockchain user transactions.

A credits balance for a blockchain user is updated when Dash is converted by the OP_RETURN output of either a registration (SubTxRegister) or topup (SubTxTopup) transaction. The credits balance can then be used to pay the fees for certain transactions. Put simply, the OP_RETURN output converts Dash into a “Layer 2 fee token” (credits) that miners can redeem for the equivalent amount of Dash when they mine a block.

The registration transaction establishes the initial balance for the user. As credits are used, the balance can be increased by issuing a topup transaction to convert more Dash to credits. Notably, the topup transaction was designed to allow anyone to topup any user account (e.g. a merchant DAP could offer “free topups” once a user had enough reward points).

The credits of your user can only be used for user-related things. This means, that if someone gets control over your account, they can’t steal your credits. The credit balance is meant to be kept small all the time, since in the current state of the DIP you can’t convert credits back to Dash.

Layer 1 / 2 linking

Although blockchain users exist on layer 1, they will be used most frequently when interacting with DAPs on layer 2 of the Evolution platform. Any time you submit a request to modify your layer 2 data (a “state transition”), the private key associated with your blockchain user registration must sign the request. This mechanism allows your layer 2 data (i.e. DAP data) to be verifiably secured via layer 1 on-chain data (your public key).

Payment by username

This brings us back to one of the initial issues presented — exchanging payment addresses. While the DIP doesn’t explicitly define the process of exchanging payment addresses via username, it provides the foundation for wallets to do this. Upon connecting with another blockchain user, their on-chain public key supports the exchange of private data (in this case an encrypted HD extended public key for payments). Since DAP-based applications store data on layer 2, this can happen asynchronously (no need for both users to be online simultaneously).

To present this a little differently, the following shows how the use of blockchain users can streamline person-to-person payments. Notice the reduction in both the total number of steps for initial payment as well as the removal of the need for further interaction in the case of recurring payments.

Current payment process

1. Request payment address (Alice)

2. Provide payment address (Bob)

3. Add address to payment field (Alice)

4. Verify address (Alice)

5. Send Payment (Alice)

For recurring payments: Repeat steps 1–5

Blockchain user payment process

1. Add contact by username (Alice)

2. Confirm contact* (Bob)

3. Send Payment (Alice)

For recurring payments: Repeat step 3 only!

* Contacts will be implemented in Evolution as part of Layer 2. It will basically be part of one of the first DAPs you’ll see and is similar to friends/followers on social media platforms.

State of the DIP

While the implementation of blockchain users is already happening, it’s important to note that newly introduced DIPs are subject to change. Changes can occur for a variety of reasons including updated research and community input. Also, as an Evolution platform feature, blockchain users will not show up prior to the initial Evolution release.


About the author


thephez