Reader small image

You're reading from  Foundations of Blockchain

Product typeBook
Published inJan 2019
PublisherPackt
ISBN-139781789139396
Edition1st Edition
Concepts
Right arrow
Author (1)
Koshik Raj
Koshik Raj
author image
Koshik Raj

Koshik Raj is an information security enthusiast who holds a master's degree in computer science and information security. He has a background of working with RSA, a network security company. He has also worked as a senior developer in CoWrks, Bengaluru. Koshik has been studying blockchain technology since he was introduced to Bitcoin while pursuing his master's. He is currently advising an educational start-up looking to implement blockchain technology in the education space. He is also setting up a blockchain incubation center for students and researchers in Bengaluru to aid mentorship and networking, and even the launching and marketing of their ideas.
Read more about Koshik Raj

Right arrow

Diving into Blockchain - Proof of Ownership

In this chapter, we'll be introduced to the wider applications of blockchain by creating a proof of ownership application. Throughout this chapter, we'll discuss the concept of smart contracts within blockchain in order to implement this application. Since we've already introduced the concepts of blockchain in the earlier chapters of this book, this chapter will mainly focus on the high-level details of smart contracts, namely proof of ownership and the creation of a decentralized application.

We're going to focus on the following topics in this chapter:

  • Creating a proof of ownership application
  • The concept of smart contracts within blockchain
  • How to choose a smart contract platform
  • Exploring the NEO blockchain platform
  • Creating a decentralized application (proof of ownership) in NEO blockchain
  • Exploring the Ethereum...

Digital assets and identity

Digital assets are programmable assets that exist in digital format. These assets can have their own value (digital tokens) or could virtually represent existing physical assets (ownership of vehicle). Digital assets have been used since the beginning of the digital age, but until now they have always existed in an environment where management was centralized. The invention of blockchain has allowed digital assets to exist in a decentralized network, where no trusted intermediary is needed to register or trade an asset. Removing the intermediaries means users don't have to pay any additional charges while trading assets.

Digital identity is essential to digital assets when dealing with asset ownership. It represents the identity of any individual or organization in a digital format. Digital identity is based on the public key infrastructure (PKI...

Proof of ownership

Every asset in the world is owned by some entity. Ownership of a part of an asset might not be feasible to prove, either due to the fact that part of the ownership record is missing or due to the ambiguity in the existing record's data. Although ownership is proved digitally, or by other means, by the entities, in most cases, the ownership information is not consistent across all the systems. Proving ownership by keeping a digital record is the best solution, and digital assets and identities play a huge role in this.

Digital assets, along with digital identities, provide a convenient way to claim ownership of any goods because assets are registered digitally along with the user's identity. Whenever users need to verify and prove ownership of an asset, they can provide their identity details along with the asset that they are trying to claim. Users...

Smart contracts

Contracts are created between parties to enforce an agreement and to ensure that the participants cannot deny the agreement later. A smart contract is a protocol that allows contracts to be verified and enforced in a self-executing manner. In simple terms, it executes a contract agreed between parties whenever the conditions of the contract are met, without anyone's intervention. The term, smart contract, was coined by Nick Szabo, a cryptographer, in 1994. Although the smart contract was conceptualized in the early 1990s to automate the execution of traditional contracts, it wasn't implemented in a public network until the adoption of Bitcoin's underlying blockchain technology.

It was the Byzantine fault-tolerant consensus algorithms that made the execution of smart contracts possible in a decentralized public network. A number of existing blockchain...

Choosing the smart contract platform

Smart contracts are self-executing contracts that can be deployed using any blockchain application that supports the execution of basic scripts in its transactions. Most blockchain platforms support a domain-specific language. We have already come across the language used in Bitcoin transactions, which is called Script, a stack-based language with limited capabilities. Although Script is a Turing-incomplete language, it only has a few options that can be used to create complex transactions. It can create multi-signature transactions, payment channels, and atomic cross-chain trading. In addition to this, Bitcoin can create a transaction with a lock time. A transaction can be created but locked for a certain amount of time in case the creator wants to invalidate the transaction before the lock time expires. Although Bitcoin's Script language...

NEO blockchain

NEO is a blockchain platform and cryptocurrency that facilitates the creation and management of digital assets and smart contracts. The NEO project was originally launched in 2014 under the name of AntShares, until it changed its name in June, 2017. All the development resources were provided by founder, Da Hongfei, from his business blockchain solution company, called Onchain. The main motive of the NEO project is to achieve a smart economy with the help of digital assets, digital identity, and smart contracts in a distributed network.

The platform uses two kinds of token, called NEO and GAS. Unlike Bitcoin, a NEO token is a non-divisible token, which means that the minimum unit of NEO is 1. Holding the NEO tokens gives the right to vote during the consensus mechanism, which is explained in the, Consensus algorithm section. Holding the NEO token generates a new...

Ethereum blockchain

Ethereum is a public blockchain that was proposed by Vitalik Buterin in late 2013 and was released to the public in 2015. Ethereum was one of the initial blockchain platforms that were created to help programmers to develop and deploy decentralized applications using smart contracts. Ethereum has a rich set of frameworks and libraries to develop, test, and deploy applications. We will cover the development and deployment of proof of ownership applications using the Ethereum platform in this section. Refer to Chapter 8, Blockchain Projects, for more details regarding the Ethereum ecosystem.

Ethereum nodes

Similar to Bitcoin and NEO, there are several implementations of client software in different languages...

Summary

In this chapter, we have dived deep into both creating and using smart contracts, as well as using the NEO and Ethereum platform to build a decentralized application. After creating the foundations of a NEO and Ethereum blockchain, we created a proof of ownership system to prove the ownership of the assets.

This chapter has hopefully motivated you to develop decentralized applications by introducing you to smart contracts. In the next chapter, we'll explore the real-world applications of blockchain technology by exploring projects from different domains.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Foundations of Blockchain
Published in: Jan 2019Publisher: PacktISBN-13: 9781789139396
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Koshik Raj

Koshik Raj is an information security enthusiast who holds a master's degree in computer science and information security. He has a background of working with RSA, a network security company. He has also worked as a senior developer in CoWrks, Bengaluru. Koshik has been studying blockchain technology since he was introduced to Bitcoin while pursuing his master's. He is currently advising an educational start-up looking to implement blockchain technology in the education space. He is also setting up a blockchain incubation center for students and researchers in Bengaluru to aid mentorship and networking, and even the launching and marketing of their ideas.
Read more about Koshik Raj