At Agrello, we are building a solution for future-proof contract relationships. This post is part of the series to explain how we use blockchain to support our mission. Today, we will focus on the core platform functionality and two central concepts of the solution: Contract and Identity.

In a nutshell, blockchain underpins Agrello Contracts, enabling a single shared view of all contractual relationships for all contract parties.

Agrello ID is required to use Agrello platform and services, as described in our previous posts https://bit.ly/2MUSNz3. Our vision for Agrello ID is Decentralised Digital Identity, powered by blockchain and protected by cryptography. The keys to your digital identity are stored securely on your smartphone or personal device, giving you full control of your digital identity.

It has recently been proposed how Apple’s iPhone could support proof of identity. Worth noting that developments like that will further increase the usability of Agrello ID. Indeed, there is an immense potential in coupling capabilities of smart personal devices with the power of blockchain, as we will see below.

Agrello ID is powered by a Smart Contract on blockchain

Agrello ID is a digital identity represented by a Smart Contract on the blockchain, with its keys and core information stored securely on your smartphone. This solution answers the following crucial requirements for a digital identity:

it needs to be verifiable,

uniquely linked to the owner,

remain under the control of the owner,

and be protected from tampering.

Such trustworthy and verifiable digital identity can be used to enter into contractual relationships (sign documents), gain access to secure places and services (such as bank accounts, digital or physical assets), and authorize various transactions (monetary transactions, a flow of goods etc).

Two crucial things happen when a user registers a new Agrello ID:

two key pairs (each pair consisting of a Private and a Public key) are generated and securely stored on their smartphone: one for Identification purposes and another one for Authorisation purposes, and a Smart Contract linked to this Agrello ID is published on the blockchain.

Talking about key pairs, we needed a mechanism to support identity and key management in our blockchain solution. Ethereum EIP-725 and ERC-735 proposals were very well aligned with our intent so we have taken them as the basis for our implementation. Worth noting that we generate elliptic keys to plug into native blockchain mechanisms. The private part is kept secure on the user’s device and is used by the owner to sign transactions; the public part is available on blockchain and is used by other parties to verify signatures. Each customer can create one identity, with multiple keys stored on and accessible from multiple devices. An additional device with keys is particularly useful to guarantee access to the identity in case of losing a device. One important aspect of the solution is that customer stays in full control of their identity, private keys, and actions, and nobody can intervene in the process from any side.

Agrello ID Smart Contract plays a crucial role in the process:

it ensures that the identity’s information is immutable and verifiable ,

, it authorizes all transactions made on behalf of the identity,

made on behalf of the identity, thus establishing a full audit trail for the usages of identity.

The key bits of identity information held by the Agrello ID Smart Contract are:

user id, the link to all information associated with the user on the Agrello Platform,

KYC (Know Your Customer) provider id and KYC session id, as the link to the KYC session held by the user (for Qualified accounts),

hash of the KYC data returned from the KYC verification process https://bit.ly/2MUSNz3; the actual KYC data is held by the KYC service provider and can be always verified against the hash on the blockchain.

In addition to the key and claim management capabilities, Agrello ID Smart Contract has the following methods:

authenticate , which is the interface for identification usages i.e. gaining access to systems and services; the call to this method is only authorized with the Private key of the owner; once executed, this method posts a transaction to the blockchain, immutably logging the fact about where the user has authenticated and when;

, which is the interface for identification usages i.e. gaining access to systems and services; the call to this method is only authorized with the Private key of the owner; once executed, this method posts a transaction to the blockchain, immutably logging the fact about where the user has authenticated and when; sign, which is the interface for signing documents and authorizing transactions of value; the call to this method is only authorized with the Private key of the owner; once executed, this method posts a transaction to blockchain, immutably recording the user id, payload as hash of the document or transaction being signed, the signature itself, and the timestamp.

As all transactions made on behalf of the identity are logged on the blockchain, they are easily accessible and verifiable through the blockchain explorer. We are customizing Agrello Blockchain Explorer to provide relevant useful information related to Agrello contracts and transactions, such as signature transactions and hashes of signed documents.

Agrello Contracts are also powered by blockchain

Every Agrello Contract is represented by a Smart Contract on the blockchain, which ensures that:-

there is a single shared view of the contract for all authorized parties,

the content of the contract is verifiable and can’t change without an explicit consent from all parties,

any smart functionality associated with the contract is immutable and stays in sync with the content hence can be trusted,

and Smart Contract tracks the audit trail of the contract lifecycle, from origination and signing, through execution of any smart functionality, to cancellation or finalization.

Share and sign existing contracts on blockchain using Agrello Containers…

If you have ready contract files that just need to be filed, shared and signed, you can save them in an Agrello Container. Agrello Container is a special format that puts your files into a downloadable archive and associates a smart contract with it to ensure that the content can be shared, signed and verified. Here are the key aspects of this functionality:

Files are packaged into a downloadable archive with .agrello extension and enriched with useful metainformation about contract participants, signatures, contract status etc.; the status and content of the archive can then be viewed through the Agrello Contract Viewer; A smart contract is published at the time of Container creation, which immutably captures hashes of the files included in it as a verifiable evidence; Further on, the smart contract tracks the audit trail, particularly signing transactions associated with the container.

…or use Agrello Contract Templates on blockchain

If instead, you need a contract template that you intend to use multiple times, e.g. a rental, a loan, or an employment contract template, then you would want to use the Agrello Contract Template functionality.

Conceptually, an Agrello Template has 3 levels of representation:

human-readable (particularly the legal prose), logical (structured information, including information about variable contract data — blank fields that will be filled in a particular contract), and functional (smart code).

An Agrello Template is represented by a Smart Contract on blockchain in the following way:-

human-readable text and the information about variable contract data: stored off-chain, which allows storage efficiency and enables easy full-text access;

hash of the template text: put into the smart contract on-chain at the moment of the publishing the template, ensuring that its content is easily verifiable;

any smart functionality associated with the template: published alongside the hash, ensuring that it is immutable and stays in sync with the content, hence can be trusted.

Then, technically speaking, an Agrello Contract is an instance of an Agrello Template, with particular data filled in and particular parties involved. When an Agrello Contract is created, a related Smart Contract is generated in an “Initial” state containing the following data:

address of the corresponding Agrello Template smart contract,

placeholder for the variable contract data,

placeholder for the list of contract signatories.

Once data is filled into the blank fields of the template and the list of signatories is prepared, the contract gets published:-

the content of the template plus all the data filled in are hashed and stored into the contract’s Smart Contract, invites for signatures are sent out to the signatories, and the contract is moved to the “Published” state.

Signatories need to use their Agrello IDs to sign the Agrello Contract, as described above in this post. Every signature action posts a transaction to the blockchain, immutably recording the Agrello ID of the signatory, hash of the contract content being signed, the signature itself, and the timestamp. Once all signatories have signed the contract, it moves into the “Signed” state and becomes a live contract. The described solution provides the highest degree of confidence and assurance through the lifecycle of a contract.

Concluding remarks

In this post, we have shown the powerful combination of blockchain-based Agrello Digital Identity and Agrello Contracts as fundamental building blocks of future-proof contractual relationships:-

truly digital e2e,

verifiable and trustworthy,

shared view of all parties,

with a reliable audit trail,

based on open industry standards.

Now, some of the mentioned topics are worth a closer look, but that’s for another day. Stay tuned!