Development Update 4: Master Protocol Wallet and Distributed Exchange Milestone

We have reached the halfway milestone in the DEx and Mastercoin Wallets 300 BTC bounty.  There is now a tabulation of the results based on feedback from participates and 150 BTC will be paid out as well as corresponding MSC soon thereafter.  This post covers the major accomplishments throughout this contest as well as the results and judging methodology.


Milestone Results

Developer Results


The methodology for determining contest allocations continues from the previous $25,000 Code Contest which ended in October 2013.

The following steps were taken:

  • Participants reported the work that they had done during the contest.
  • Participants undertook cross-evaluations to provide feedback.
  • Normalize all feedback to fix those which don’t add to 100%.
  • Attempt to determine how careful each person’s feedback was (i.e. the same % for everyone is not very careful, but different percentages for each person with detailed comments on how you chose those percentages is very careful).
  • Weight each person’s feedback by how careful they were.
  • Get a percentage for each person based on the combined weighted feedback.
  • Perform a second pass through weighting step, changing each person’s grade for themselves from zero to the result from the first pass.

For all of the Developer and Tester Reports refer to the Mastercoin Development Thread on Bitcointalk:

Milestone Results

Contestant Dev % Testing % Total BTC @ $800 per BTC
Zathras 22.97% 11.96% 28.9467 $23,157
Bitoy 17.79% 13.73% 24.6565 $19,725
Grazcoin 19.87% 16.96% 28.3514 $22,681
Grimentz 6.89% 10.79% 12.2887 $9,831
Jakecnn 0.00% 2.98% 1.4905 $1,192
Cmlacy 2.87% 1.11% 3.4226 $2,738
Tachikoma 24.39% 17.33% 33.0540 $26,443
Marvshneider 1.73% 8.96% 6.2104 $4,968
Bebopzzz 0.00% 3.30% 1.6513 $1,321
Azmenthe 1.95% 4.15% 4.0279 $3,222
Atriz 0.00% 5.02% 2.5120 $2,010
Mastream 0.00% 3.06% 1.5310 $1,225
Fthoughts 1.54% 0.64% 1.8570 $1,486
Total 100% 100% 150 $120000

Developer Results

For the sake of brevity these results are highly compressed and you are urged to follow the link to the dev thread mentioned above for details.


Masterchest Wallet

My wallet software is coming along nicely, this now has full DEx support.  Still some work needed, the UI needs a good clean up and there are still a lot of bugs on my outstanding list.  Lots of user-orientated stuff (for example bitcoin config autodetection).

A demo video is available at:

Masterchest Library

The biggest change in v2 of the Masterchest library is of course DEx support.  All DEx messages are supported, and the library handles both encoding and decoding functions.  Also some nice performance gains achieved through tuning (recursive inputs etc) which speeds up blockchain scanning in the respective software that use it.

Masterchest Engine

v2 of the Engine has also been rewritten to support the new DEx messages and incorporate DEx state processing.   Also runs the consensus system – v2 includes test MSC. For the results of the engine please see the website – the engine is what populates the databases for it.

v2 of the website brought with it – you guessed it – DEx support (a theme is appearing Tongue) and a significant redesign. Charting is real-time & once there are more trades taking place as we ramp this up I’ll open up the view options other than 60-day.

Masterchest CLI

Masterchest CLI is your bread & butter ‘does what it says on the tin’ utility.  It simply wraps the Masterchest library in a CLI wrapper so you can call the functions from the command line.

Testing & Protocol

Appendix – Storing data in the blockchain

Consolidated all the various discussions on transaction storage and drafted an amendment to the spec which would explicitly define how this is done.

Masterchest Consensus System

Built and introduced the Masterchest consensus system to put the verification API (credit Tachikoma) to use in automated testing.  This monitors each address and evaluates differences across the various implementations.

Class A Simplification

Rewrote the rules on Class A to allow for a variety of edge cases that had appeared on the network but were technically invalid per spec.  These transactions could be decoded via ‘Peek & Decode’ and it was hurting consensus having ambiguity on these transactions.


MyMastercoins website

Source Code

Create multisig parsing of Simple Send and Dex transactions from and
(Simple send, sell offer, purchase offer, payment)

Test MSC DEx order book

Charts for Simple Send, test msc

Transaction module.

MyMastercoins thin client wallet MMW (windows based)

Send MSC (simple send)
Send TMSC (simple send)
Sell TMSC Distributed Exchange
Buy TMSC Distributed Exchange

Gets data from SQL server
Used Zathras library to send multisig transaction


Major part of the implementation is the set of publicly available web apps (POST/json):
1. validating address and checking if pubkey is on the blockchain (/wallet/validateaddr/)
2. generating a bitcoin/mastercoin/bitcoin payment raw send transaction to be signed using the hybrid web wallet (/wallet/send/)
3. generating a raw sell offer transaction to be signed by the hybrid web wallet (/wallet/sell/)
4. generating a raw accept offer transaction to be signed by the hybrid web wallet (/wallet/accept/)

DEx Development

Payment stage for accepted offer.

Using the hybrid wallet for paying the accept offer.

DEx Testing

Skeleton wallet was developed to ease testing for casual testers

Live consensus checker between explorer and masterchain

Test plan docs



Design icons for all the transaction types and backgrounds to indicate each transaction DEx’s status.
Document describing all possible transactions / status combinations:

Implemented the icon / background scheme with transparent icons and CSS classes and integrated in site.

Implemented HTML form + signing (in javascript) + sending of wallet skeleton required for DEx testing.

Implemented an offline version of the signing form in javascript (in final stages of testing, will go live tomorrow).

Responded to users and testers feedback (on mailing list and the forum) and improved usability of the transactions sending form.

Implemented HTML client side wallet for (users add addresses to wallet from address pages.)

Many small html5 features and improvements to


Tested the status of individual transaction types on using the icons mentioned above and hover HTML message that I also implemented.

Test signing of all possible DEx transactions within

Suggest structured testing format doc based on the transaction type / status icons and backgrounds I designed:

Followed the testing document to test transactions on

Testing (+ fixing) of DEx forms on >20 different combinations of platforms, browsers and screen resolutions including 3 tablets (iOS, Android and windows 8.1) and 2 smart phones (iOS and Android.)


Faiz and I have been working with extending the existing webwallet that grazcoin and Grimentz have posted on  We’ve taken a crack at making a simple installer, and filled out installation instructions for the wallet, server, and obelisk server:


Mastercoin Explorer

Main features

Not related to the bounty

Mastercoin-explorer comes with a full rSpec based test suites that automatically tests various different outcomes for parsing Mastercoin transactions.


Mastercoin Wallet

Main features

  • Can now display DEx order book.
  • Supports all creation and broadcasting of all DEx related messages.

Not related to the bounty

  • There is an automatic installer script that can now install the client with one command on Debian/Ubuntu and Fedora/Redhat.


Mastercoin Ruby

Mastercoin-ruby is the encode/decode lookup layer that can lookup transactions. Support for decoding/encoding of DEx messages is now supported in this library. This library also comes with accompanying rSpec suite.

Mastercoin protocol updates

Not related to the bounty



Published which describes the strategic approach for Dist-Ex testing (rigorous, comprehensive, repeatable, defensible).  Working on test requirements for each transaction type – the next level of detail, then test procs can be written for each candidate application.

MSC Spec

Submitted pull requests to improve & clarify updating/canceling a Sell Offer (tx=20). Wrestling this to closure. Identified other transaction definitions that need to be clarified.


I’m working with Curtis, Faiz, Yuval on UI/UX for the web wallet


Contributed to early API design which was unfortunately abandoned.
Helped Faiz with the client side encryption/decryption of private keys using HTML5 local storage
Have been testing various new features and assisting with debugging/improvement
Have started a fork to move the web wallet to django for maintainability as opposed to python’s basic HTTP server

Additionally to grok grazcoin’s mastercoin-tools ( I forked it and have started to write unit tests.


Working on a limited/zero trust web wallet for Mastercoin users with Curtis and Patrick. Right now we have client-side encryption, storage, and signing soon to come.  See web wallet (

Development Update 4: Master Protocol Wallet and Distributed Exchange Milestone

5 thoughts on “Development Update 4: Master Protocol Wallet and Distributed Exchange Milestone

  1. Jess says:

    Great, but *nobody* cares about what minor things the guys have been doing. We only care about one thing you ignore in every update: When will Mastercoin finally release DEx or other products?

    I mean honestly, why can’t you just give an update on that?!

  2. duzy says:

    I’m still looking forward a working true wallet, there’s none was working for me as a true wallet.

Comments are closed.