Introducing Project ONYX

Zain Admani
Project ONYX
Published in
7 min readOct 14, 2017

Distributed Test Driven Development powered by Ethereum

We are happy to announce Project ONYX, the first decentralized platform to enable Distributed Test Driven Development built on the Ethereum blockchain.

Learn more at https://projectonyx.io where you can find our whitepaper and our alpha build. All code is open source and is available at our Github. Come join us on Slack, Telegram, Twitter, or Reddit!

Distributed Test Driven Development (d-TDD)

Test Driven Development (TDD) is a development practice that focuses on making software by planning and specifying expected behaviors with tests before coding up a solution. These tests fully lay out the intended behavior of the software the company is trying to create and any code (implementation) that passes these tests is deemed to be correct. When adding a new feature the following loop is applied:

  1. Add new tests that the new feature will have to pass
  2. Confirm the current code passes old tests and fails new tests
  3. Implement new feature so all of the tests pass
  4. Confirm all of the tests pass again

The benefits of TDD include fewer errors in code and better code and overall software quality when compared to industry standard. These benefits are mainly because TDD leads to better testing coverage over a codebase and more modular and testable software architectures.

Even though TDD offers these great advantages, it has drawbacks that hinder it from adoption in many spaces. These drawbacks are that it takes more employees to handle the extra work from the extra testing on top of the implementation (more than industry average) and that it can potentially take longer to implement features (but they will be of better quality).

With these current limitations in mind, we present the practice of distributed TDD (d-TDD) enabled by Project ONYX. A company practicing d-TDD should receive all of the benefits of TDD while avoiding (or severely reducing) the drawbacks.

With Project ONYX, companies can simply write a test suite to specify the behaviors they want in the code (step 1 of the loop) and let engineers on the ONYX network handle the implementation work (step 3 of the loop). All work is guaranteed to pass the test suite by a network of Validators and all transactions are guaranteed by smart contracts on the Ethereum blockchain. By leveraging d-TDD, building good quality code takes fewer engineers and can be done at the same velocity or potentially even faster than traditional methods.

The world runs on software. Everything from your car to your home now has software embedded into it to make it smarter and more useful. While this boom has caused huge changes in almost every industry in the world, the way software is developed remains about the same.

Why do things need to change?

In today’s environment, a company will hire many software engineers to design and implement a system. The company buys the engineers’ time and the engineers work solely for the company. However, this model has some flaws and inefficiencies that could be improved to lead to even more cost savings and convenience for all parties.

In the current model, any idle time that an engineer has working for a company is paid for by the company. It can be seen as the cost for having an engineer handle work at a moments notice. From industry research and personal experience, this idle time is not negligible and can account for almost 30–40% of an engineers time. Not only are engineers idle, many times seasoned engineers have to handle menial development tasks that may be better suited to newer, cheaper engineers.

Both of these issues together point to under-utilization of great engineers. This is detrimental to everyone involved; engineers get bored and companies have to spend more money. We present a better way with Project ONYX.

How does Project ONYX help?

We enable companies to hire fewer high quality engineers to design the software, write the tests, and review code while outsourcing implementation to ONYX. Companies don’t need to have more engineers to handle implementation work at a moments notice because they have a completely scalable supply of engineers ready to do their work on the ONYX network. This is essentially engineering supply on demand, saving companies both time and money.

On the other hand, engineers on the ONYX network get to pick tasks they are more passionate about or have the skill set to easily solve. Considering many companies have similar problems that they need to solve for their products, engineers can even reuse code for different tasks to collect more money for the same amount of work! Also, engineers are not bound by long term commitments to any one company and all work can be done on one’s own schedule and preferred location.

How does Project ONYX work?

ONYX has 3 main players on the network:

  1. Requesters: Place the request for tasks with test suites, starter code, and payment for the work (mostly software development companies).
  2. Engineers: People on the network who want to provide engineering work for money.
  3. Validators: People who will run a automatic validation script that will listen to the blockchain to receive code from engineers and let’s the parties know if the tests pass for a small cut of the transaction (anybody with a computer).

Each of these players has something they offer and something they need. They use Project ONYX to facilitate all of these transactions. The company will take a small cut from the transactions as well to fund development and improvement.

Why use the Ethereum blockchain?

The peer-to-peer nature of d-TDD is an excellent use case for the Ethereum blockchain. Ethereum offers smart contracts allowing us to write code to implement the rules for the network. All parties involved can easily verify these rules by reading the code and can guarantee that all attending parties will follow them without the need for trust or a 3rd party. What this means in practice is that nobody has to worry that they won’t be paid or get the work that their owed.

Also, with Ethereum behaving as our backend, everyone interacts with the blockchain instead of our own servers which makes our solution much easier to scale. In addition to this, by using IPFS for file storage and encryption, it makes it so that we as a company don’t hold any code and the protocol is truly secure and p2p.

ONYX Tokens

An integral component to the network we describe is the ONYX token we will be releasing. The purpose of the ONYX tokens are to behave as a required stake for any transaction. What this means is that for any player in the network to participate, they have to stake a certain number of ONYX tokens for the transaction (Note that this is for each transaction so companies will require multiples of this stake to request multiple tasks). The stake makes it so that any party is motivated to see the ONYX platform succeed and any malicious actors can be penalized by losing their stake. No value will be transferred using ONYX tokens. In effect, the ONYX tokens truly behave as a membership token into using the network.

The amount of stake necessary to participate is set by ONYX token holders by a voting scheme. A dynamic stake is necessary because ONYX token prices aren’t expected to be static and the amount of stake required affects all participants. A higher stake will mean only larger players can afford to participate and lead to higher quality of users while a lower stake will allow more players to participate but may lead to lower quality users. This is a decision that directly impacts all token holders so we leave setting that stake amount to them.

More concrete details for this token scheme can be found in the whitepaper.

How are we different from freelance work?

The non-employment based work may remind many of the current freelance market products like Upwork and even other products that are currently built on Ethereum like Ethlance. However, we offer many benefits over the current paradigm.

Current problems in freelance:

  • Unclear goals from companies that can lead to stress for freelancers
  • Potentially unclear duration of commitment

With Project ONYX, we solve these issues inherently by the protocol:

  • All tasks requested come with a very specific test suite to pass which erases all ambiguity of what is required
  • Since engineers can browse the tasks before claiming them, they have a better idea of how long implementation work will take and clear expectations by deadlines set by Requesters

Truly nothing exists currently that solves the problem we are tackling in the way we are solving it and we are the first to put focus on TDD practices.

Development Notes

We have currently finished building an alpha that already showcases many of the features we have described. All the code is already open sourced and can be found at our Github. Documentation is still being heavily written so the codebase and clarity will improve over time.

Feedback

We would love to hear feedback from the community and continue to improve the product to match all expectations. Come join us on slack for any questions or concerns you may have or comment below.

Thanks for reading and we look forward to any and all feedback!

--

--

Zain Admani
Project ONYX

Software Engineer. Computer Scientist. MS in CS @UTexas