The Handshake Protocol

Rewire the Internet.

Introduction

Bitcoin puts money on the blockchain. Ethereum puts code on the blockchain. The Handshake Protocol puts agreements on the blockchain.

This article will introduce users to The Handshake Protocol, which aims to replace agreements, commitments, promises, and quality of services with smart contracts. This will enable all parties of an agreement to ensure that they will do exactly as programmed without the possibility of fraud, censorship or interference.

The article will also examine the next generation of decentralized applications (dApps) that are being built on top of the Handshake Protocol.

Protocol Design

How it fits into the current blockchain ecosystem

Handshake Protocol runs on top of the Ethereum blockchain and provides a framework for developers to build dApps that power human-to-human, human-to-machine, and machine-to-machine agreements.

The Handshake Protocol

To put it simply, think of people as nodes on the internet, and a Handshake as a wire that connects them together, clearly outlining the scope of what each person commits to. X in return for Y.

For example:

Person A commits to writing an article for Person B in exchange for $20USD. This would be clearly identifiable, with all tasks and funds outlined using the handshake protocol.

X is the task of writing an article and Y is the payment in return for the service.

The First Stage of the Handshake Protocol

Note that at the beginning the network will consist of only linking humans to humans. In the future machines can be added to the network providing human-to-machine and machine-to-machine handshakes. Machines can be categorized as a web service, a connected device, or an AI model.

Human-to-machine and machine-to-machine handshakes will be added to the Human Protocol

Decentralized Applications Using The Handshake Protocol

We have already implemented and built several dApps using the Handshake Protocol, including instant agreements, commerce and crowdfunding dApps. We believe that in the future there will be many dApp categories that will be using in the future, as long as these dApps power agreements among humans and machines.

Instant Agreements

A fast, simple and beautiful mobile dApp that lets users create instant agreements on the blockchain.

The Handshake dApp puts your agreements on the blockchain
  • Two friends sign an agreement to bet on an event
  • Two people draw up an agreement to sell and buy a used item in their local marketplace
  • An apartment owner subleases a room to a new tenant
  • A group of friends split a bill at dinner
  • A group of friends chip in money for a vacation trip

One existing use case of instant agreements is the Handshake (Crypto Sign) dApp. Click the download link here for IOS users and here Android users.

Commerce

Our e-commerce marketplace allows users to pay using Ethereum. When a customer places an order, the payment doesn’t go to the seller right away, instead, goes to an escrow account. Only after the seller fulfills their promises (ship the product), will the escrow account release the funds to them.

Crowdfunding

We are building a blockchain-based global launchpad. This will allow people to pitch their potential product ideas to investors, utilizing the blockchain to allow an extra layer of security for all parties involved.

If a product does not reach the required funding, then the funds will automatically be released to the investors. Additionally, once a project is fully funded, all of the funds will not be released at once, but will be given to the product owner in time released blocks.

Protocol Topology

There are many types of handshakes that will be able to implemented on this protocol, currently we are helping to show you the potential of Handshake Protocol, we will continue to add more dApps over time.

Pair

This is where a human has a direct agreement with another human. For example, in a

decentralized TaskRabbit-like app, user A asks user B to perform a task and upon completion user A pays user B. Or in a decentralized Uber-like app, user A drives user B from one location to another and gets paid exactly according to the contract that both A and B understands. Or in a parent-child relationship, an X amount of coins is automatically sent to the child’s account every morning for the daily stipend upon completing some housework.

Pair

Group

When there are 3 or more humans, we form a group. For example, a team of people work together on a project and need to make a decision. Or in a crowdfunding project, a project creator has a commitment to creating a product and delivering said products, if the backers can provide them an aggregate amount of X.

Group

Self

There is a special case where a human can have a relationship with themselves. For example, in a decentralized TODO app, user A can set up a TODO list for themself and they will be rewarded when they complete a task.

Self

Protocol implementation

The Handshake Protocol has a growing list of handshakes. The first 2 handshakes are the BasicHandshake and the PayableHandshake.

Since the Handshake Protocol is open-sourced, you can write your own handshake and share with the community. The source code is at https://github.com/cryptonomous/handshake.

Basic Handshake

A Basic Handshake is a simple agreement between 2 parties that both sign and commit with their private key.

struct Handshake {
address initiator;
address acceptor;
}

A Basic Handshake lifecycle has only 2 stages: Initiated and Shaked. To navigate the state transitions, the basic Handshake smart contract provides a core set of functions: init() and shake().

Payable Handshake

A Payable Handshake expands from the Basic Handshake and adds payments.

struct Payable {
address payee;
address payer;
uint value;
S state;
uint deadline;
}

A Payable Handshake lifecycle has the following stages: Initiated, Shaked, Rejected, Done and Cancelled. To navigate the state transitions, the Payable Handshake smart contract provides a core set of functions: init(), shake(), unshake(), deliver(), withdraw(), reject(), and accept().

And that’s a brief overview of the Handshake Protocol! In the weeks to come, we will be publishing a source code walkthrough of the protocol, diving into how we apply it to difficult problems in our upcoming projects — crypto commerce, contracts and crowdfunding on the blockchain.

As a parting note, the first version of the Handshake dApp is officially live. https://bit.ly/2HcRHPJ

Join our Telegram Group to stay up-to-date on Handshake: https://t.me/ninjadotorg

Try a new way to shake! We’d love to hear what you think.

Speak soon,

Ninja