Expercoin Smart Contracts & Trust Quotient

Expercoin Republics
Expercoin
Published in
3 min readAug 7, 2018

Smart Contracts

A set of smart contracts for each Pillar provide an authoritative source of truth and also serve as a distributed database.

Smart contracts facilitate a plethora of different functions depending on the pillar attributes. For instance, in the Learning Marketplace pillar, the smart contracts contain the course listing, its price, reviews garnered from students and student’s performance in the course. We are also working on tooling that will deploy an abstraction layer to allow for continuous integration and testing for code updates. Each smart contract would reside within a wrapper contract with its own public address. The latest smart contract logic and data will be imported by the wrapper contract. A version control mapper will record the contract location of all previous versions, allowing for direct access to older contracts at any time. Each individual function will have its own set of smart contracts that will be recorded in the registry depicted below.

Trust Quotient

Each and every participant in the Expercoin Ecosystem — whether an individual or an organization — will possess an Expercoin Trust Quotient. Even each Republic will also have a Trust Quotient to ensure that it is not run by malicious actors. The Trust Quotient will protect both buyers and sellers during transactions. Malicious actors detected through the trust mechanism will be banned from the Ecosystem, unable to join or launch any Republic in the future.

The Expercoin Trust Quotient will be calculated using a confidence interval to take into account the proportion of satisfied users and the number of tasks completed or sales made. In order to calculate Expercoin Trust Quotient, we first calculate the lower bound of the binomial proportion confidence interval as calculated by the Wilson score interval. The lower bound, c1, is defined by the below algorithm where is the fraction of positive outcomes, n is the total number of transactions, and zα/2 is the (1−α/2) quantile of the standard normal distribution.

Here is the observed fraction of positive outcomes, zα/2 is the (1-α/2) quantile of the standard normal distribution, and n is the total number of transactions. We can implement this formula in Ruby as follows:

pos is the number of positive outcomes, n is the total number of total transactions, and confidence refers to the statistical confidence level, where 0.975 means we have a 97.5% chance that our lower bound is correct.

Returning to our mathematical representation above, with an increase in the proportion of positive outcomes, , the confidence level increases. As the number of transactions n increases, the maximum value of c increases.

--

--

Expercoin Republics
Expercoin

Protocol to launch AI-powered network of marketplaces on the Ethereum blockchain in partnership with Experfy in Harvard Innovation Lab.