3 Techniques for trust and integrity

 

This chapter covers

  • Establishing trust through verification, validation, and recording
  • Enabling trust using Solidity language features
  • Using finite state machine diagrams to characterize application phases
  • Incremental development of smart contracts using the Remix IDE
  • Tips for testing smart contracts

Trust and integrity are essential requirements for any system, but they are especially critical in a decentralized system where the peer participants operate beyond the traditional boundaries of trust. In this chapter, you’ll learn how to add elements that establish trust and integrity to your blockchain-based solution, to support robust decentralized operations.

Imagine that your neighbors want to borrow your food processor. You know and trust them because of your prior interactions, so you don’t hesitate to share your food processor with them. This action is a peer-to-peer transaction without an intermediary. What if you buy something online? You need a credit card and a bank account or some similar instrument whereby your credentials have been verified. The credit card company undertakes the responsibility of establishing trust in you for the online vendor. In this case, trust is quantified based on information like your credit rating and other credentials. Thus, building trust between the vendor and customer involves at least one intermediary and maybe more.

3.1 Essentials of trust and integrity

 
 
 

3.1.1 Trust

 
 
 

3.1.2 Integrity

 
 
 
 

3.2 Digital democracy problem

 

3.2.1 Designing a solution

 
 

3.2.2 Use case diagram

 
 
 
 

3.2.3 Incremental development of code

 

3.2.4 Users, assets, and transactions

 
 
 
 

3.2.5 Finite state machine diagram

 
 

3.2.6 Trust intermediation

 
 
 

3.2.7 Defining and using modifiers

 
 

3.2.8 Contract diagram including modifiers

 
 

3.2.9 Putting it all together

 
 
 

3.3 Testing

 
 
 

3.3.1 Positive tests

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage