Recruit and reward labor via hmt-escrow

Robert Valta
HUMAN Protocol
Published in
5 min readOct 25, 2018

--

This is a multi-part series that details the business and technical architecture of HUMAN Protocol, a new approach to human-level machine intelligence that allows machines to ask us directly for the data they need to improve.

Introduction

Today we are officially releasing hmt-escrow: a library implementing the escrow functionality of the HUMAN Protocol, a frictionless and universal protocol to distribute work and payment across the world.

The complete system is designed to scale from simple tasks to the most complex kinds of work, with a particular focus on work products that can be mechanically evaluated by an oracle.

This is also the underlying technology that powers hCaptcha.com, which produces datasets for machine learning by collecting human annotations. A technical overview is available in our previous blog post. In brief:

  • Requestors of work launch an escrow contract onto the Ethereum blockchain that describes work to be done, e.g. labeling images, along with a bid price, and pre-fund it with HMT.
  • HUMAN Protocol Exchanges (e.g. hCaptcha.com) pick up the job and start serving tasks.
  • Website owners provide a captcha challenge for their visitors to solve that filters out bot traffic from their site, similar to Google’s reCAPTCHA.
  • Website visitors click on captcha challenges to get through the service flow: click all the cars, street signs, etc. Each challenge produces work related to one or more tasks within the job.
  • A third party (the Reputation Oracle) determines the final accuracy of their answers. The website is then paid out of the escrow contract.

The expression of work to be done and holder of funds is the smart bounty launched via hmt-escrow.

Deep dive

hmt-escrow provides a concise Python library that lets any labeling requestor launch escrow contracts onto the HUMAN network. It facilitates the following main features:

  • Setup and launch of jobs with configurable manifest descriptions to the network
  • Distribution of data back and forth between parties in the system
  • Payouts of smart bounties to website owners

Setup and launch of jobs

Jobs use configurable manifests to outline what sort of work the requestor wants done. The manifest contains many details that allow a third party to evaluate success. This includes where the data for tasks is stored, the bid price per task, what type of work is being requested (image labeling or text choice by multiple choice for example), etc.

The manifest is then stored to a URI that is embedded (along with a hash of the contents) into a smart bounty deployed into the network. The smart bounty nominates an Exchange, Recording Oracle, and Reputation Oracle to manage the work requested.

The task bid price together with the total amount of tasks forms the total amount that will be paid to the website owners. It is pre-funded in the HUMAN network’s native token: HMT. This reduces required trust in the ecosystem by guaranteeing to websites that they will be compensated so long as the work supplied meets the standards defined in the manifest.

Off-chain data storage, on-chain records

Once the escrow has been established the distribution of tasks to website visitors needs to be solved. Unfortunately, an on-chain solution where data is baked into the smart contract is impossible due to the high expense and low performance of all existing public chains. The entire Ethereum public chain handles only ~600,000 transactions per day (Oct 2018), far less than our scalability target of several billion transactions per day. We thus had to devise an alternate strategy to allow parties within the HUMAN system to communicate efficiently.

Together with our previously launched eth-kvstore we use URIs and hashes in the smart bounty (with the default being IPFS) as an intermediate storage layer to handle manifests, task data, and results. The unlabeled data gets uploaded with a public key of the labeling requestor. eth-kvstore lets all parties within the system provably associate public encryption keys with their ETH address, so the oracles of our system can use those keys to safely exchange results via IPFS URIs periodically stored in the smart bounty.

As the captcha challenges get solved these intermediate results can be uploaded with the public key of the labeling requestor. Once all the tasks defined by the escrow contract have been solved with an acceptable success rate dictated by the configured manifest and the websites supplying the answers have been paid, the smart bounty is updated with a results URI encrypted to the requestor. The requestor or their intermediary can then download the results from IPFS with the private key only they know.

Payouts from smart bounties

One essential parameter of the manifest is the accuracy target that is required for submitted work prior to triggering payment of the bounty. Along with the option to determine the minimum number of repetitions of a task by different people, it determines when the requestor will be satisfied by a set of answers.

If the criteria are met, payout is triggered and the website owners participating in the escrow tasks are paid accordingly in HMT. If the criteria look like they will never be met, the bounty stops being served and neither the requestor nor the suppliers of labor get what they want. This way neither party can abuse the network. Labeling requestors can’t get free work for their unlabeled data, and website owners in turn can’t supply deficient work and profit from it.

The full flow of the system can be seen in the following graph. Reputation and recording oracles will be covered in the next blog post, where we will dive deeper into the whole network’s functionality.

What’s next

We believe that an open community is key to accelerate the adoption of HUMAN network. Any potential or current participant should be able to examine and audit our API and smart contract code independently. We will be open sourcing a complete reference implementation of all parts of the network over the coming months.

We also encourage open source developers to join us in helping to democratize labor: submit PRs, email us, or find us on Telegram to get more involved! Stay tuned for the mainnet launch of hmt-escrow.

Want to see an example of this work in action? hCaptcha (the first app built on top of HUMAN Protocol) is now available for you to deploy on your website — if you already serve captchas and would like to be compensated for the effort, sign up at hCaptcha.com.

And if you’re feeling inspired by the possibilities here, perhaps we should be working together! We’re hiring ML scientists and senior developers in SF and worldwide. You’d be joining a team of seasoned folks working on research and implementation for products and services used at scale by the largest companies in the world. Details at https://www.intuitionmachines.com/jobs

--

--