Book Image

Oracle Blockchain Quick Start Guide

By : Vivek Acharya, Anand Eswararao Yerrapati, Nimesh Prakash
Book Image

Oracle Blockchain Quick Start Guide

By: Vivek Acharya, Anand Eswararao Yerrapati, Nimesh Prakash

Overview of this book

Hyperledger Fabric empowers enterprises to scale out in an unprecedented way, allowing organizations to build and manage blockchain business networks. This quick start guide systematically takes you through distributed ledger technology, blockchain, and Hyperledger Fabric while also helping you understand the significance of Blockchain-as-a-Service (BaaS). The book starts by explaining the blockchain and Hyperledger Fabric architectures. You'll then get to grips with the comprehensive five-step design strategy - explore, engage, experiment, experience, and in?uence. Next, you'll cover permissioned distributed autonomous organizations (pDAOs), along with the equation to quantify a blockchain solution for a given use case. As you progress, you'll learn how to model your blockchain business network by defining its assets, participants, transactions, and permissions with the help of examples. In the concluding chapters, you'll build on your knowledge as you explore Oracle Blockchain Platform (OBP) in depth and learn how to translate network topology on OBP. By the end of this book, you will be well-versed with OBP and have developed the skills required for infrastructure setup, access control, adding chaincode to a business network, and exposing chaincode to a DApp using REST configuration.
Table of Contents (8 chapters)

Accounting system – single and double–entry

Before we jump into blockchain and delve into Hyperledger Fabric and the Oracle Cloud solution, we need to start with two core principles—ledger and accounting. In an accounting system, business transactions are recorded in journals and ledgers. Fine-grained details of every transaction are entered into various journals. Summarized information from the journals is then transferred (also known as posted) to a ledger. It is the information from the ledger that becomes the source for trail balances and various financial statements. Every transaction is recorded in journals and then posted to a ledger that records this information in various accounts, such as asset accounts, liability accounts, equity accounts, revenue accounts, and expense accounts.

For any organization's accounting system, the ledger is the backbone. Anything that has financial value is posted to the organization's ledger. However, these ledgers are centralized ledgers and the organization has full control over them. We will talk about centralized and decentralized ledgers later in this chapter.

Accounting system – single–entry

Accounting systems address the purpose of producing an operating document to display ownership of assets, to protect assets, and various other tasks. Essentially, an accounting system is a powerful means to check the loss of assets due to malicious human activity, software, and so on, and to keep track of activities and transactions around those assets. Historically, as activities around assets were minimum, single-entry accounting was good enough to prove the ownership of assets. It is a form of accounting system where each transaction is a single-entry in the journal.

A single-entry account system resembles the check register that individuals use to track their checks, deposits, and balances. The information recorded is minimal and is owned by that individual. It's an efficient system for very small businesses that work on a cash basis of accounting, which have fairly low transactions each day. There are no credit-based transactions and the assets that are owned are very few and far between. Most importantly, there is no need to publish income, financial, and balance statements. Historically, it would have worked very well and, even today, it might work fine for very small firms that meet the aforementioned attributes.

There are various challenges with single-entry accounting systems—there are no scientific or systematic rules to record, post, and report on the transactions. It appears as an incomplete system as it does not have both the aspects of the accounts being recorded; hence, it fails to reflect the truth about the profit or loss and will miss reflecting the true financial position of the organization. With all of these shortcomings, a single-entry is vulnerable to frauds and various errors in the ledger. Hence, to check on vulnerability, you need to trust a centralized authority; therefore, historically, there was the need for a king to check for vulnerabilities and maintain trust around the ledger. However, since trade has expanded its boundaries, you need a mechanism to allow one ledger owner to trade with another ledger owner. This immediately led to a double-entry accounting system.

Accounting system – double–entry

The double-entry system offers error checks that are not inherently available in a single-entry system. Each account has two columns and each transaction is reflected in two accounts. Two entries are pushed for each transaction; however, every transaction has a debit entry in one account and an equivalent credit entry to another account. An example of a double-entry account system would be if an organization wants to purchase a new laptop for $2,000. In this case, the organization will enter a debit of $2,000 to an expense account and a credit of $2,000 to a cash account to show a decrease from the balance sheet.

Double-entry accounting is a way to show both of the effects of a transaction. For example, if an organization purchases a laptop, the accounting entry does not clarify whether the laptop was purchased for cash, in exchange for another laptop, or on credit. Information like this can only be available if both of the effects on a transaction are accounted for. In the accounting system, these two effects are known as debit and credit. A double-entry accounting system follows the principle of duality, which means that, for every debit entry, there is a mandatory equivalent credit entry. Debit entries demonstrate effects such as an increase in assets and expenses and a decrease in equity, income, and liability. Similarly, credit entries demonstrate effects such as a decrease in assets and expenses and an increase in equity, income, and liability. The double-entry system ensures that the accounting equation remains in equilibrium:

Assets = Liabilities + Equities

At the end of the reporting period, the total debits equalize the total credit. A balance sheet follows the equation, where the total assets are the sum of liabilities and equities. Any deviation from this equation will highlight an error.

Interestingly, a single-entry account system accounts for only revenue and expenses and does not monitor equities, liabilities, and assets. However, a double-entry system accounts for revenue, expenses, equity, liabilities, and assets, which makes it easy and precise to derive and calculate profits and loss, helps to detect fraud, reduces errors, and allows the generation of various financial statements. As both aspects of a transaction are recorded, it is easier to keep the account complete. Maintaining the double-entry system involves time, money, skill, and labor. There are chances of errors and mistakes. During an accounting year, transactions are posted and adjusted in final accounts; there are difficulties in adjusting transactions if tracking transactions is a challenge.

In the double-entry system, the first entry demonstrates what you have, while the second entry clarifies how you received it. If these entries are not in equilibrium, it is a clear indication that counterparty exposure might not be effectively accounted for which leads to audits and corrections. In the double-entry account system, it is mandatory to account for every single movement of the value of the counterparty. It has been a simple, proven, and effective accounting system for many years.

However, think about when there is no exposure to the counterparty. A what-if system does not know who owns it and is liable for the assets and the value recorded in the journal, which are posted in the ledger. To send or receive an asset of value, there must be a counterparty to receive and send it. Such fundamentals were far from question until today. A transaction is recorded in an organization's ledger, and the same transaction is recorded in the counterparty's ledger; for example, a supplier's ledger or bank's ledger. It reflects the counterparty's perspective for the same transaction. Various documents and statements such as contracts, invoices, notes, bank statements, and receipts support these transactions. This is prone to errors, such as reconciliation errors and missing cash, which then leads to disputes. This needs dispute resolution, and to check all of these, organizations invest in recording, analyzing, and auditing.

The double-entry account system worked well for hundreds of years. In this section, we will not emphasize the need for a triple-entry accounting system; however, we will delve into distributed ledgers. Double-entry mandates the need for each organization and its counterparty to maintain its own ledger, which in turn reflects the truth. However, there are multiple copies of the truth. In addition, the organization and the counterparty invest time, resources, and money to perform truth-reconciliation to actually derive and agree on a single truth.