Ever tried to use blockchain for your business? In this article we’ll illustrate how to use blockchain features and map them to operational and functional processes of a business. With the aim to operate safely, transparently and more cost efficiently!
Yes, you can improve your business, make transactions faster and smoother, and make your customers happy all by using blockchain technology. If you don’t have enough knowledge about blockchain development, you can always schedule a free one-on-one meeting with our team of blockchain specialists. We will give the needed advice and guide you through the process.
Having said that, let’s dig in. These are the topics that will be discussed in this article:
Table of contents
- Business use cases
- How to use blockchain for your business?
- Blockchain feature layers
- Using Symbol from NEM for your business
- Mapping your business logic
- Wrapping it all into digital contracts
- What are distributed governance schemes?
- An example of gamification: Dings
Business use cases
That your business is using blockchain or Bitcoin does not always mean that you increased the security or transparency around your business, nor that you are running more cost efficiently than you would, without blockchain technology.
In fact, integrating your business with blockchain technology, goes through a necessary step of data modeling. If you are going to use any blockchain datasets to store data related to your software, it is recommended that you know about scaling characteristics of the underlying dataset, that you understand its representation on the network and also that you understand its availability characteristics.
This section will permit to set a groundstone for further topics around blockchain integration. In case you have read the article about “How to use blockchain to tokenise your supply chain?”, you may jump ahead to the next section by clicking here.
Blockchain data models
Common characteristics of scalability can be questioned with the following:
- Is a record of the underlying dataset persisted across all network nodes?
- Is a record of the underlying dataset available for retrieval by API?
- How many requests to the API does it need to retrieve a collection of the underlying dataset?
- How many requests to the API does it need to retrieve a singular entity of the underlying dataset?
- What is the response time (e.g.: in milliseconds) for one API request on the network?
- Is a record related to sensitive information? Never send those over a network of any type.
Ask yourself these questions before any of your business layer data finds itself stored on a distributed blockchain network.
How to use blockchain for your business?
Now that you have answered the questions above – and now that you know, that you are going to use a blockchain for some of the digitalisation tasks you have planned in the foreseeable future – we will define a few standard steps to get you started with your business on the blockchain.
Are you looking into how to setup a DAO – a Distributed Autonomous Organization? Or are you just looking into an integration of blockchain features mapped to legacy business operations and digitalisation of business processes?
The standards to follow for the process of using blockchain for your business will depend on the type of tasks you want to be executed by- or executed using a blockchain network.
Blockchain feature layers
Moreover, we want to scope this article around a generic integration of blockchain technology into business processes. To keep things organized, we’ll start with a list of requirements under the following epics:
Ways you can use blockchain for business
- Governance: Use a blockchain network to manage your organization governance. This implies managing identities at a digital level.
- Tokenization: Use a blockchain network and/or a cryptocurrency to represent/tokenize your product(s).
- Gamification: Use a blockchain network and/or a cryptocurrency to add gamification processes to your software and/or business processes.
- Distribution: Use a blockchain network to distribute some of your internal and organizational processes.
- Accept payments: Accept payments using blockchain networks and integrate with specific cryptocurrency payment providers.
Now, of course, you could also be willing to implement all of the above. The point about this run-through is that it will get you a more organized way to look at the different parts of a blockchain network and/or cryptocurrency that you are willing to integrate into your business processes.
Blockchain networks can help sink infrastructure costs and sink the costs of organization processes involving multiple parties.
Also, blockchain typically provides with a distribution layer that permits to automate your processes and make them more cost-effective.
Using Symbol from NEM for your business
We propose to have a look at Symbol from NEM, which comes with all the features you are going to need from a blockchain network and is flexible and configurable to your needs, for usage in private and public blockchain network environment.
Symbol is a next generation blockchain project that has been under development following the successful NEM blockchain project. Read our article about how to use blockchain to tokenise your Supply Chain to find out more about Symbol from NEM applications.
Mapping your business logic
One of the important steps in integrating blockchain will be to define mappings for your business logic that will be represented by one or more entities or events on the integrated blockchain implementation.
In our showcase implementation UsingBlockchain/BlockSnippets, we published a MiniBusiness command that is our minimum viable product for the creation of your digital business using blockchain.
This simplistic digital business implementation, not only lets you create digital businesses but also lets you prepare transactions that are compatible with Symbol from NEM blockchain networks.
Below, we display a portion of the source code that is responsible for the configuration of a distributed governance scheme for our digital business. The code of the Governance concern is as follows:
/**
* Part of BlockSnippets shared under LGPL-3.0
* Copyright (C) 2021 Using Blockchain Ltd, Reg No.: 12658136, United Kingdom
*/
public execute(
inputs: CommandLineArguments,
): AggregateTransaction {
// – Governance works with digital identities
if (! this.identities.length) {
throw ‘No identities configured. Please, add identities information first.’
}
// – (1) Creates co-signature to accept the distributed governance
// * – MultisigAccountModificationTransaction with all identities as cosignatories
const convertTransaction = getMultisigConvertTransaction(
this.identities.map(i => i.getPublicInfo())
)
// – (2) Setup our distributed governance digital contract.
// A digital contract consists in one or many transactions
// that are all executed together (atomically).
return getContract([
// – Sign off #1: The governor is whom signs off for the conversion
convertTransaction.toAggregate(this.governor.getPublicInfo()),
]);
}
Source: Governance concern draft in MiniBusiness, part of BlockSnippets by Using Blockchain Ltd.
The important bits in the above source code are about (1) what is being created, and (2) how it is executed. As for the above, we use Symbol from NEM to create transactions.
The transactions are then all wrapped inside one digital contract making it so that all transactions will either be executed altogether or they will fail altogether and leave no trace of execution.
As a final step, we will see somewhat later that our digital contracts are formatted as QR Codes. This has the advantage of being compatible with Mobile devices. None of the created digital contract must ever contain any sensitive information.
Wrapping it all into digital contracts
To digitalise some of your business processes, you will need much more than the above distributed governance scheme, that is for sure.
As mentioned above, we published a MiniBusiness simplistic showcase which lets you tokenise business processes as explained in previous sections. Following are the different commands that are available in MiniBusiness:
- Create: This command creates a digital business.
- Identify: This command configures digital identities on-chain for your business.
- Governance: This command configures a distributed governance scheme for your business.
- Tokenise: This command tokenises products for your business.
- Reward: This command lets you configure incentives for employees of your digital business.
Source: MiniBusiness commands, part of BlockSnippets by Using Blockchain Ltd.
Creating your digital business
The digital business creation command makes use of BIP44 mnemonic phrases to map so-called digital identities to your business.
You can execute this command to create your own digital business, by typing this in your terminal: BlockSnippets MiniBusiness -n “Your Company Name”. It will ask you for a password, please do not forget this password.
After you run this command, you will find a new backup file inside the data/ folder. This file contains the backup of the digital identities. Provided you don’t lose your password (Please, don’t forget to backup your password.), you will always be able to use your digital business.
The created data/your-company-name.json file contains all the information necessary to manage your digital business on-chain. Please note that a production-ready implementation would not store any sensitive data inside such a JSON file.
For the sake of simplicity, we encrypt the mnemonic passphrase seed (BIP32) using AES encryption and your password. This keeps it somewhat safe, but must not be used in production.
Since we mentioned quite a few times that this is a simplistic showcase, and that it should not be used in production environment – it is probably fine for us to leave the encryption source code here, for you to reproduce and play with:
/**
* Part of BlockSnippets shared under LGPL-3.0
* Copyright (C) 2021 Using Blockchain Ltd, Reg No.: 12658136, United Kingdom
*/
// – Generates random salt and gets binary of password
const binarySalt = MnemonicPassPhrase.CATAPULT_RNG(16)
const binaryPw = Buffer.from(this.password, ‘utf8’)
// – From here on, always use salted password
//// Note: It is important to use the binary *plaintext* password here
const saltedPw = Buffer.concat([binarySalt, binaryPw])
// – Stores salt in hexadecimal format
this.salt = binarySalt.toString(‘hex’)
// – Generates a random mnemonic pass phrase (24-words)
const mnemonicWords = MnemonicPassPhrase.createRandom()
// – Uses salted plaintext password to encrypt mnemonic phrase
this.encryptedSeed = Crypto.encrypt(mnemonicWords.toSeed(
saltedPw.toString(‘utf8’)
).toString(‘hex’), saltedPw.toString(‘utf8’))
// – Saves password hash, never store in plain text
this.passwordHash = Buffer.from(sha256(saltedPw)).toString(‘hex’)
Source: Identity repository in MiniBusiness, part of BlockSnippets by Using Blockchain Ltd.
The above source generates a random salt that is used for AES encryption with our password. This step, while not mandatory, is important to make sure you don’t leave plaintext traces of sensitive information on any device.
The generated mnemonic phrase is a 24-words phrase that only contains words from the BIP44 words list. Read a detailed definition of this in “What is a mnemonic phrase?”, in our Dictionary.
Our digital business implementation makes use of accounts that are generated from the above mentioned 24-words passphrases. The reason behind this is that such 24-words phrases always create the same accounts.
Looking for a detailed technical description of BIP32, mnemonic phrases and “Multi-Account Hierarchy for Deterministic Wallet”?
(2019) Grégory Saive: NIP-006 – Multi-Account Hierarchy for Deterministic Wallet.
As for the continuation of this article, it is safe for us to assume that our digital business identities can be represented as mnemonic phrases because we keep it simplistic.
A production-ready implementation of digital business processes must model data differently and upgrade storage practises.
Executing digital contracts
From here on is where it gets very flexible. Now that you have created your digital business, we can go ahead and map information of your business to entities and transactions using blockchain technology.
Our showcase implementation MiniBusiness disposes of multiple contracts that you can configure and that will be stored in the form of QR Codes in your data folder.
The created digital contracts (QR Codes) will never hold any sensitive information related to your digital business. These QR Codes contain only prepared Symbol from NEM transactions that have yet to be signed.
Yes, you understood it right, there is a missing piece to this whole puzzle. The act of creating digital signatures with linked identities has intentionally been left out of this post in order to keep it simple.
Don’t lose faith, you know we’ll come back about this in our next simplistic showcase, right?! Yes. Anyways, back to the above topic, following snippet of source code illustrates how we create digital contracts:
/**
* Part of BlockSnippets shared under LGPL-3.0
* Copyright (C) 2021 Using Blockchain Ltd, Reg No.: 12658136, United Kingdom
*/
// – Configure digital identity convern
const identityConcern: Identity = new Identity(this.digitalBiz.identities)
// – (1) Prepare digital contract, currently unsigned
const digitalContract: DigitalContract = this.digitalBiz.dispatch(identityConcern, inputs)
// – (2) Display QR Code for easier access to transaction
const transactionQR = QRCodeGenerator.createTransactionRequest(
digitalContract, NetworkType.TEST_NET, env.NETWORK_HASH
)
Source: Identify contract in MiniBusiness, part of BlockSnippets by Using Blockchain Ltd.
Using the above few lines of codes we (1) create the digital contract by executing our Identity concern. The Identity concern class was created in order to keep a clean separation of concerns in our showcase implementation.
Other concerns that are implemented in MiniBusiness include the Governance concern which creates a different type of digital contract.
Eventually, as mentioned previously, in (2) we create a QR Code that contains all transactions of our digital contract. This currently only works with Symbol from NEM but can be easily updated to work with other blockchain networks, or Bitcoin.
What are distributed governance schemes?
Governance is a specification of principles and methods to legitimate decision making processes. In a distributed governance scheme, usually, all participants are treated equally without the mandatory presence of a central authority.
Instead of a hierarchical structure managed by a set of humans interacting in person and controlling property via the legal system, a decentralized organization involves a set of humans interacting with each other according to a protocol specified in code, and enforced on the blockchain.
Vitalik Buterin, core contributor of Ethereum.
Governance itself consists of four actionables: signals, proposals, reviews and acceptance. Participants – or “actors” – of a governance scheme must communicate with others about these four actionables.
Thus, Alice may signal that she is now taking part in a governance scheme. But Alice might also decide to propose a change to the scheme, or review another participant’s proposal.
Benefits of distributed governance
Resiliency
The distribution of governance schemes helps to evolve in a fast-moving society and eliminates single point of failures such that it is easier to recover in the correct direction when anything is corrupted.
Efficiency
Because in business, some decisions have to pass many levels of a hierarchy, opportunity windows can be lost and cost of decisions can exceed their actual value.
Distributed governance scheme tend to reduce financial- and operational costs because they eliminate intermediation.
An example of distributed governance
Following snippet of source code showcases a simplistic approach to distributed governance schemes using multi-signature accounts.
Multi-signature accounts are simply accounts that require multiple parties to create digital signatures. In practise, these accounts require the confirmation of multiple accounts.
/**
* Part of BlockSnippets shared under LGPL-3.0
* Copyright (C) 2021 Using Blockchain Ltd, Reg No.: 12658136, United Kingdom
*/
// – Configure governance scheme with identities
const governanceConcern: Governance = new Governance(
this.digitalBiz.identities,
this.digitalBiz.governor,
)
// – (1) Prepare digital contract, currently unsigned
const digitalContract: DigitalContract = this.digitalBiz.dispatch(governanceConcern, inputs)
// – (2) Display QR Code for easier access to transaction
const transactionQR = QRCodeGenerator.createTransactionRequest(
digitalContract, NetworkType.TEST_NET, env.NETWORK_HASH
)
Source: Governance contract in MiniBusiness, part of BlockSnippets by Using Blockchain Ltd.
This time, you can see that in (1) we execute our Governance concern. This concern creates a transaction that converts the digital business “governor” account into a multi-signature account.
When this transaction is broadcast to the network, the governor account will be governed by the digital business identities.
In (2), the digital contract is formatted into a QR Code, as explained earlier. Remember that the resulting transactions have to be signed by participants.
An example of gamification: Dings
As an example of gamification features that can be integrated into your business, let’s have a look at Dings.
Dings is a social game platform that uses smart gamification algorithms to add some fun to any event! You can play Dings from any device, and you can invite more friends to play games together. Dings has the potential to add more FUN to your causes, events, and interactions. With Dings, you will be happy about reading a book as much as you will be happy about planting trees again. Life is a Game! With Dings, it is Your Life, so it is also Your Game! You can create an account for Free on dings.app and start playing!
This game rewards its users for their activity on the platform by allocating cryptocurrency to some actions that users can perform. An example of this includes the I plant a tree action that users can check-in to – this action effectively rewards players for actions that have a positive impact on our planet. In turn, this allows Dings to reward users for their well-intentioned actions and causes.
Benefit from blockchain technology and move to a digital business
Blockchain can be used and integrated at different levels within your business processes, i.e. to improve security or transparency. We think using blockchain for your business will have a positive impact on the value of data in a long-term perspective.
You can use blockchain projects as an instrument of truth for your digital business. One, that is distributed and open for anyone to use. The incentivization strategies around blockchain networks may differ from one project to the other, but the principles of immutability of data and that of preserving data integrity are usually respected by all blockchain projects.
The full source code for this digital business showcase of using blockchain can be found in: UsingBlockchain/BlockSnippets MiniBusiness Command.
We hope that this article was insightful for you and are looking forward to any feedback and messages. Please share your thoughts in the comments section below!
Disclaimer
This website may contain information about financial firms, employees of such firms, and/or their products and services such as real estate, stocks, bonds, and other types of investments. While this website may intend - as the author deem necessary - to provide information on financial matters and investments, such information or references should not be construed or interpreted as investment advice or viewed as an endorsement.