Signal, Watch, and Pay Protocol: Toward A Censorship-Resistant Economy On Bitcoin Cash

Vin Armani
10 min readMay 7, 2020
Signal, Watch, and Pay (SWaP): A protocol for censorship-resistant, peer-to-peer collaborative transactions on Bitcoin Cash

I have officially published the specification and reference code for a new protocol, on the Bitcoin Cash network, that I have named “Signal, Watch, and Pay (SWaP) Protocol.” The purpose of this protocol is to enable on-chain, peer-to-peer negotiation and execution of “collaborative transactions.” A collaborative transaction is a Bitcoin transaction in which two or more independent parties participate as inputs (payees). The most basic real world example of such a transaction would be three friends pooling their money to collectively pay for their meal at a restaurant. In the context of the broader economy, collaborative transactions include some of the most important financial activities. The SWaP protocol, as currently published, enables three different “classes” of collaborative transactions. The associated applications for these three transaction classes are:

  1. SLP / BCH Exchange — Two independent parties can negotiate an offer for exchange of any Simple Ledger Protocol token for native BCH and fully execute the exchange in a trustless manner, completely on-chain.
  2. Multi-Party Escrow with an Oracle — Parties can negotiate an offer for mutual escrow based on a given oracle, collaboratively build a script contract for that escrow, fully execute the funding of the escrow and the spending from the escrow based on the oracle publishing results. All of this is done in a trustless manner, completely on-chain.
  3. Threshold Crowdfunding — A party seeking funding can advertise the existence of a funding campaign and funders can offer any funding amount that they desire, with those funds only able to be spent when the threshold described in the original advertisement is met. Again, this is all done in a trustless manner, completely on-chain.

In this article, I will explain why there is a need for such a protocol. I will also describe the canonical applications for each of the published transaction classes. Finally, I will provide a vision for the new industry structure and business model that widespread adoption of the SWaP Protocol will necessarily engender.

Before I begin, I want to be clear about why the SWaP Protocol is being released for Bitcoin Cash specifically.

  1. The SWaP Protocol stores message data on-chain and requires chaining of unconfirmed transactions. While the amount of data in addition to the final transaction is not significant (less than 3000 bytes total for an exchange transaction), in order for the protocol to operate well at scale, it requires the fast, cheap, reliable transactions of Bitcoin Cash. A basic SWaP Exchange transaction can be offered, negotiated, and fully executed with a combined cost (in BCH miner fees), to both parties, of under 1 cent USD.
  2. The SWaP Protocol leverages OP_RETURN outputs in transactions. Bitcoin Cash has increased the OP_RETURN size to 220 bytes (as opposed to Bitcoin BTC’s 80 byte limit). This size allows initial offers to be made in a single transaction.
  3. Bitcoin Cash has crucial opcodes, including OP_CHECKDATASIG, which allow for advanced script contracts which can be funded by utilizing Pay-To-Script-Hash (P2SH) addresses. There is a vibrant community of BCH developers who are constantly adding to the capabilities of script contracts in the wild.
  4. The Bitcoin Cash ecosystem has now spent years focused on improving indexing capabilities, specifically geared towards data in OP_RETURN outputs. Node software such as Bitcoin Verde and BCHD have even integrated indexing functionality into their implementations.
  5. The Bitcoin Cash community is aligned with the vision of “peer-to-peer electronic cash” with which the SWaP Protocol is aligned.

Why Is There A Need For This Protocol?

The purpose of Bitcoin is the removal of trusted third-parties (intermediaries) from financial transactions. This process is known as “disintermediation.” Satoshi Nakamoto makes it abundantly clear that disintermediation is Bitcoin’s raison d’être in the Introduction section of the white paper.

Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model…

What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party.

Satoshi states that he believes Bitcoin is needed to disintermediate processors of “electronic payments.” Fundamentally, such processors are the global commercial banking industry and their payment overlay networks such as Visa and Mastercard. For those of us who believe that free markets are the key to human flourishing, the disintermediation of payment processors is a crucial step out of a world where transactions can be censored, a step toward censorship resistance.

As Bitcoin has evolved and the broader cryptocurrency sector has emerged, we have seen that merely having censorship resistant “money” is not sufficient if we want to see economies liberated from the preferences of tyrants. After a decade of exploration with the miraculous gift of Satoshi, we need to amend key pieces of the white paper’s Introduction to instead read:

Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to: process electronic payments; match willing buyers and sellers in currency and asset exchanges; serve as agents and clearing houses for escrow; and aggregate funding, from unrelated parties, for enterprises of all kinds

What is needed is an electronic communications and payment system, based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party.

Bitcoin, in the form of Bitcoin Cash, is able to provide this solution. The Signal, Watch, and Pay Protocol is a means for manifesting this new and powerful application of Satoshi’s revelation. Properly leveraged with simple protocols such as SWaP, wallets can turn Bitcoin Cash’s distributed, immutable ledger into a global order book for currency or stock exchange, an uncensorable sportsbook (or prediction market), or a jurisdiction-independent equity crowdfunding platform. All of these applications allow “any two willing parties to transact directly with each other without the need for a trusted third party.” This is Satoshi’s vision.

Bitcoin Cash As An Exchange Order Book

The SWaP Protocol allows for the disintermediation of online cryptocurrency exchanges.

Custodial exchanges have been a weak link in the chain of censorship resistance since Mt Gox first appeared on the scene. Whether through negligence, malicious behavior, or state violence, user funds on exchanges have always been at risk. In order to participate in exchanges, users are increasingly forced to give up privacy. Exchanges are forced, by states, to collect customer information through “know your customer” (KYC) procedures. Advocates of the original ideological purpose for cryptocurrency advocate for self-custody and even shame those who would leave funds on exchanges with slogans such as “not your keys, not your coins.”

Complex trading platforms based on smart contracts have been attempted on chains such as Ethereum, but, until now, no simple protocol existed for a global bid/ask order book leveraging the Bitcoin blockchain itself. The SWaP Protocol allows any person in the world, with a compatible wallet and connection to the Bitcoin Cash network, to offer for sale any amount of SLP tokens in exchange for BCH (or vice versa), at the rate of his choosing. Similarly, it allows any person in the world, with a compatible wallet and connection to the Bitcoin Cash network, to instantly search all open exchange offers (or monitor the network for new offers as they are broadcast) and, upon selecting an offer, to construct a partial transaction effectuating the exchange. That partial transaction is communicated (leveraging the blockchain) back to the offering party who accepts, fully signs the transaction, and broadcasts it to the network. The broadcast itself is a trustless “atomic swap” which instantly executes the transfer of assets in a single transaction.

Bitcoin Cash As A Sportsbook

Globally, sports wagering is a $150 billion (USD) per year industry. It is also a highly controversial and heavily regulated business. While sports wagering is the most commonly understood “prediction market,” the broader concept of parties putting funds in escrow and a “winning” party being able to collect the funds after the outcome of some event also extends to areas such as futures markets. The SWaP protocol disintermediates the sportsbook, the futures market clearing house, and escrow agents of all kinds.

Using the SWaP protocol, an oracle broadcasts information to the network advertising that it will be, at some future date, broadcasting the results of some event. This can be anything from the score of a sporting event, to the winner of an election, to the price of an asset or commodity on a given date. A user with a compatible wallet and connection to the Bitcoin Cash network, upon choosing such an oracle, broadcasts an offer to enter into one side of an escrow contract. A counterparty with a compatible wallet and connection to the Bitcoin Cash network, seeing the offer and using the data provided by the chosen oracle, constructs a partial transaction which fulfills the escrow contract and then broadcasts that partial transaction back to the Bitcoin Cash network. The original offering party validates that the counterparty’s transaction is valid, adds the remaining signatures, and broadcasts the transaction to the network, thus funding the escrow. When the oracle broadcasts the results of the event, the “winning” party can instantly spend the funds from out of the escrow address.

Bitcoin Cash As Crowdfunding Platform

Kickstarter forever changed the landscape for entrepreneurs looking to fund projects. For decades, startup founders, particularly in the technology space, have taken rounds of venture capital funding that usually require aggregating the contributions of many different individual investors. Kickstarter allowed anyone to become an investor in a project. Unlike traditional venture capitalists, Kickstarter contributors are not rewarded with equity in the funded business. In recent years, the world of crowdfunding has merged with crowdfunding platforms to enable “equity crowdfunding,” small contributions from many disparate investors, all of whom are indeed entitled to an equity share in the operation being funded. This awarded equity, considered a “security,” is one of the most highly regulated financial instruments in existence. As the cryptocurrency community saw during the Initial Coin Offering (ICO) boom and bust, the United States Securities and Exchange Commission (SEC), “does not play games.” Any platform operator offering unregistered securities, or not otherwise in full compliance with the SEC, puts himself in serious legal jeopardy… even if said operator is a citizen of another country who has never set foot in the United States.

Leveraging SLP Tokens to do dividend payments has been demonstrated on a regular basis for over a year. Distribution of SLP tokens and subsequent payouts to token holders on a prorata basis - peer-to-peer cash payments - are uncensorable activities. The SWaP Protocol adds censorship-resistance to the initial funding procedure (IPO or ICO) through which investors can become entitled to the SLP tokens in the first place. This closes the economic loop and allows entrepreneurs to raise funds 100% on-chain, earn revenue 100% on-chain, and disburse shares of profits to equity stakeholders 100% on-chain.

A functional QR Code which can be scanned by a SWaP compatible wallet in order to fund a crowdfunding campaign

Using the SWaP protocol, an entrepreneur wanting to run a crowdfunding campaign broadcasts the suggested funding outputs along with the URI for the campaign information to the blockchain. Because the resulting funding transaction must have a total aggregate input value greater than the outputs the entrepreneur has provided, a threshold for funding is set. If contributions exceeding that threshold are not submitted, no contributor funds can be spent. Parties wishing to contribute construct partial transactions and broadcast the signed input data to the network. Once contributions sufficient to meet the threshold have been broadcast, the entrepreneur aggregates the inputs into a single transaction, along with the outputs he provided, and broadcasts the completed transaction to the blockchain, fully funding the campaign. If the campaign rewards funders with equity shares, dividend-bearing tokens can be immediately delivered on a prorata basis, to the addresses associated with the funding inputs. Those tokens can then be freely traded, including using the Exchange application of the SWaP Protocol itself.

The Signal, Watch, and Pay Ecosystem

The disintermediation of trading, escrow, and funding platforms that the SWaP Protocol makes possible is highly disruptive. The most powerful and profitable enterprises within the cryptocurrency ecosystem are such custodial, regulated entities. From a technical standpoint, an ecosystem utilizing the SWaP Protocol only needs nodes, wallets, and, potentially, additional data provider services (such as certificate authority, indexer, and price APIs) supporting the wallets. Such a radical shift in the nature of the industry necessarily means a shift in viable business models. For years I have written and spoken about the inevitable rise of Non-Custodial Financial Services within the Bitcoin ecosystem. The SWaP Protocol accelerates that emergence. The most viable revenue model is for wallets, competing on user experience, to take a small fee, added as an additional output in SWaP transactions processed by their wallet software. This fee will be transparent to the user and agreed upon before the user is allowed to interact using the protocol within the wallet. Developers of node software, particularly indexing node implementations, are incentivized to engage as data-provider partners with wallets and share in the profits. Staying true to Satoshi’s vision of a purely peer-to-peer economy, anyone with sufficient technical skill can always build their own wallet, according to the open SWaP specification and avoid paying any fees whatsoever. The SWaP Protocol is just the next step in the evolution toward the voluntary, permissionless, uncensorable economy that is the promise of Bitcoin.

The Signal, Watch, and Pay specification(s) are available HERE.

Reference code, written in Node.js, is available HERE.

--

--

Vin Armani

Founder of Badger LLC, Author, Teacher, CryptoSavage