Programming, Testing and More Testing of Mastercoin

News for week 44.2013.

There is a lot of excitement building up around Mastercoin and some important milestones have been set since last week’s blog.  But we have a lot of hard work cut out for us.  The developers are working hard on the next code contest and always looking for more folks to join the effort. Take some of your  spare time to check out the tutorial (see bottom) for conducting exchange transactions.

We now finally have a price graph of the MSC/BTC trades that have occurred, the Board has decided to engage a PR firm, we have a new addition to the Mastercoin repo’s on Github, there is a bounty open for building an MSC faucet, and a new proposal for enabling the limiting of spending of MSC on addressed that have been identified to have this feature enabled.  And if you are interested in the current economic distribution of Mastercoins here are the Top 50 MSC wallets.

Coding Contest Update: Distributed Exchange

Recall the applications being built for this 300 BTC contest announced last week:

  1. Minimum one PC wallet (for both Linux and Windows) which can generate simple sends and the buy/sell messages required for the distributed exchange, using agree-upon multi-sig format
  2. Minimum two websites parsing such messages, and the resulting balance transfers
  3. Minimum one website showing BTC/MSC price charts derived from these messages

There is now an Order Book on Mastercoin-Explorer where sell and buy offers as well as transactions between MSC and BTC are presented.   Progress is being made on item #3, the price charts and initial code has been uploaded to GitHub (see Repo Updates).

1st  Exchange Using The Mastercoin Protocol

In a major milestone earlier this week one of the developers, Tachikoma, for the first time exchanged Test Mastercoins for Bitcoins.  If you are interested in seeing the transaction go check out the Order Book on Mastercoin-Explorer.

Now, technically, that exchange did not happen between two people with real Mastercoins, so it seems the window is still open for anyone to be a part of the first two-person trade of MSC and BTC.  Exciting stuff, right?!  But, you might be a little hesitant to try this out with real MSC and large amounts of BTC (not recommended at this time as development is in progress). So, we have put together a step-by-step tutorial for how to test this new functionality for yourself and help our developers move the project forward.  Scroll to the bottom for the tutorial.

Repo Updates
1. MasterChest Library (Github) – changes on October 26:
  • Code adjustments to apply the transaction processing rules as defined in the amendment
  • Support for decoding the new Class B obfuscated keys
  • Support for encoding the new Class B obfuscated keys
  • Support for ECDSA point validity checking
  • Various bugfixes

Protocol & Proposals

We have a proposal for Mastercoin Limited Accounts which would feature limiting the rate at which a particular address can send Mastercoins.

MSC Faucet Bounty

Don’t have any Mastercoins but want to get some?  We need your help.  The Mastercoin Foundation Board approved a bounty of up to $850 to build a Mastercoin faucet.  If you have experience with some of the existing open source faucet software out there you may find this an interesting project and will get surely be appreciated by the many faucet users.

Check for details on the bitcointalk thread.

Social Media & PR

Earlier this week JR announced that the Mastercoin Foundation has engaged with a PR firm to help spread the word about Mastercoin to the greater technology and financial communities.
If you are wondering how to connect with others in the Mastercoin community beyond we have a few places:
If you happen to understand Chinese some of our community members have been kind enough to start a Mastercoin forum for Chinese speakers on
There is also a Mastercoin page on Reddit.

Market Update

MSC Price Chart as of 02-NOV-2013 :

MSC Price History  02nov2013

(X-axis: time; Y-axis: Price of 1 MSC in BTC)

Note that trading is manual at this time, a list of contacts is in the Order Book spreadsheet.

Mastercoin Foundation


Current Balance: 4521.9910979 BTC

More details available at the Mastercoin Fund Ledger

Tutorial: Test MSC – BTC Distributed Exchange Transactions

Start the tutorial…

Please post your questions or issues on the main development thread on bitcointalk.

Programming, Testing and More Testing of Mastercoin

Tutorial: Test MSC – BTC Distributed Exchange Transactions

(please note this is a work in progress, do not test with amounts that you cannot afford to lose)

Broadcasting a raw transaction via the reference Bitcoin-QT client

Note that if you are using you will need to use bitcoin-qt to sign the raw transaction.  Keep in mind that this process is for testing purposes and is not the final end-user / consumer process.


  • Bitcoin-QT client
  • positive BTC balance (to buy and sell MSC)
  • positive MSC balance (to sell MSC)

How to: MSC Sell Offer

  1. Open the Bitcoin client and navigate to help->debug window and press on the ‘console’ tab
  2. First we will verify the transaction. Type decoderawtransaction and paste the raw transaction string you got.
  3. Make sure the values are correct and check that at the bottom your Mastercoin address is visible also make sure it doesn’t say ‘”type” : “nonstandard”‘ somewhere. In the future we will make sure the Mastercoin data itself is encoded correctly as well. But for now these are the checks you should do.
  4. If you are happy with the result sign the transaction using your private key. Begin by unlocking your wallet; type walletpassphrase 15. This will unlock your wallet for 15 seconds.
  5. Type signrawtransaction and paste the raw transaction string in again.
  6. If all goes well you should see something that says: {hex: , completed: true}. Copy the part after hex.
  7. Broadcast the transaction over the network by typing sendrawtransaction and paste in the latest string.
  8. If all went well you should have gotten the transaction hash as output.

How to: MSC Buy Offer

  1. Go to and find a sell offer, click on “Buy” under msc step 1
  2. The form requires a public msc step 1.5
  3. To obtain your MSC public key open Bitcoin-QT click on “Help” followed by “Debug window”, and in the window that comes up click on “console”.  Input “validateaddress {somebtcaddress}”  where {somebtcaddress} is the Bitcoin address you wish to use to receive your MSC and has some BTC balance. Copy and paste the “pubkey”. 

    buy msc step 2

  4. Now take the “pubkey” and input it into the form.  And change the amount of MSC that you wish to purchase if it is not the same as the amount offered. Click “Create raw transaction”.buy msc step 1.5
  5. Now copy the string of text from the resulting msc step 3
  6. Decode the string to ensure that the transaction looks correct.  You can decode the transaction by pasting the the raw transaction string here: Make sure the values are correct and check that at the bottom your Mastercoin address is visible also make sure it doesn’t say ‘”type” : “nonstandard”‘ somewhere.
  7. Now go back to Bitcoin-Qt and sign the transaction using your private key. Begin by unlocking your wallet; type walletpassphrase {yourpassphrase} 30. This will unlock your wallet for 30 seconds.

    Blockchain users: currently does not offer a utility to sign a raw transaction, however there may be a work around but it requires exporting a base58 private key and using Bitcoin-QT.  Specifically, for step 8:

    signrawtransaction <hex string> [<privatekey1>,…]

  8. Now enter “signrawtransaction {rawtransactionstring}” where the {rawtransactionstring} is the string you copied in Step msc step 4The following text should appear if all went well: {hex: , completed: true}. Copy the long string after hex.
  9. Broadcast the transaction over the Bitcoin network by typing “sendrawtransaction {outputstring}” where {outputstring} is the output string from Step 8.
  10. If all went well you should have gotten the transaction hash as output.  Copy the output string.
  11. Note that after you send this purchase offer and it’s accepted by the site you will have to send the proper amount in Bitcoin from your MasterCoin address. Make sure your address is funded and that you send the coins from this address.
Tutorial: Test MSC – BTC Distributed Exchange Transactions