Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:03
Show Gist options
  • Save drwasho/9759924342859872851e to your computer and use it in GitHub Desktop.
Save drwasho/9759924342859872851e to your computer and use it in GitHub Desktop.
How to manage risk in trade within OpenBazaar.

Risk and Insurance in OpenBazaar

1.0 Introduction

Insurance is a valuable service that is often misinterpreted, over-regulated, and out of reach for many people. On OpenBazaar, insurance is contextualized as a service that can be offered by anyone or group, leveraging:

  1. The clarity of terms and conditions set out in a Ricardian contract
  2. An open marketplace for competing insurance policies and service providers
  3. The transparency that crypto-currencies provide via the blockchain

Ultimately, the market will decide the most appropriate insurance service and contract models for OpenBazaar. In this article, we propose some potential implementations as a primer for future development.

2.0 Insurance Services

Insurance services fundamentally offer:

  1. A pool of funds to offset a cost that exceeds the capacity of the client to pay within a timely manner
  2. A pool of funds to compensate another party that has been wronged by actions of the client, which addresses their capacity to pay within a reasonable time frame
  3. A dispute resolution organization that represents the interests of the client

These services are of course provided through the lens of risk assessment to dictate the price of:

  1. The insurance premium (regular cost of the policy)
  2. The excess (fee paid when insurance is triggered).

Traditional business models of insurance mirror a fractional reserve system in that funds are predominantly reinvested on the statistical reality that it is unlikely for all or even most policies to be triggered at once. Whether this model survives the blockchain era is unknown. The transparency that the blockchain provides may alter consumer preferences for how insurance funds are managed; proof of solvency may be an inescapable market-imposed regulation. If so, insurance providers will need to prove that the proportion of funds kept in reserve and those reinvested are at the levels that the policy claims. Alternatively, conservative insurance providers may keep 100% reserves and seek to raise profits only by fees incorporated into the premium and excess.

Whatever business model an insurance provider adopts, the terms and conditions of their policy will be listed within a Ricardian contract in OpenBazaar, with digital signatures as the unmistakable evidence of agreement.

While the various fields necessary for a comprehensive contract are difficult to predict, the seed contract may contain the following core data fields:

    "OpenBazaar Contract": {
        "OBCv": "0.1",
        "Category": "Insurance",
        "Sub-category,": "Car-Insurnace",
        "Nonce": "01",
        "Expiration": "2014-06-29 12:00:00"
    "Seller": {
        "NymID": "Samuel Patterson",
        "NodeID": "SamPatt",
        "BTCuncompressedpubkey": "044448c02963b8f5ba1b8f7019a03b57c80b993313c37b464866efbf61c37098440bcdcc88bedf7f1e9c201e294cf3c064d39e372692a0568c01565b838e06af0b",
        "PGPpublicKey": [
	"Insurance": {
		"PolicyNonce": "abc123",
		"Term": "12 months",
		"Type": "Car",
		"PolicyValue": "20 BTC",
		"Reserve": "20 percent",
		"Coverage": {
		  "Fire": "True",
		  "Water": "True",
		  "Flood": "False",
		  "AccidentalCrash": {
		    "IFCauseClient": "False",
		    "IFCauseNotClient": "True"
		"Client": {
			"Payments": "0.1 BTC"
			"PaymentFreq": "Monthly"
			"Excess": "0.25 BTC"

When a client takes out an insurance contract with a provider, a multisignature transaction is created in combination with the notary's pubkey. The client's insurance funds are paid to the multisignature transaction according to the payment schedule specified within the insurance contract. Under the client and/or notary's supervision, the insurance provider cannot extract funds beyond the reserve amount stated in the contract. For large insurance policies, a notary pool can be used for redundancy's sake and to minimize risk for client and insurance provider. Before an insurance contract is signed by the client and insurance provider, the latter can provide evidence that they have sufficient funds to payout the full value of the policy (e.g. 20 BTC in the case of the insurance contract above).

In the event that the client makes an insurance claim, the client can provide the relevant detail and evidence of the claim to the insurance provider. For a successful claim, the insurer can transfer the required amount directly to the client. If the insurance provider rejects the claim, the client may flag a dispute.

3.0 Transaction Insurance on OpenBazaar

It is possible for users to take out insurance for trades made over OpenBazaar. The purpose of the insurance in this context is to guard against the scenario where a user is subject to a loss of funds and/or goods that cannot be recovered. This loss is not necessarily due to fraudulent activity, but also covers the accidental loss of funds/goods in transit (i.e. including acts of God).

For example, Alice sells a cat to Bob on OpenBazaar:

  1. During transit, the cat escapes and an empty cage is delivered to Bob. Bob refuses to sign a multisignature transaction releasing funds to Alice based on the a perceived violation of the contract.
  2. Alice and Bob flag a dispute and engage an arbiter to weigh up the case in order to determine who should receive the funds.
  3. During the dispute resolution process, Alice provides sufficient evidence that the cat was delivered alive and well to the courier. Likewise, Bob is able to provide evidence that the cage was delivered empty to him by the courier.

If the courier in this example did not have a presence on OpenBazaar (i.e. outside of its jurisdiction), the arbiter may have no choice but to rule in favor of Bob (according to their arbitration policy). The arbiter instructs the notary (the third signature of the 2-of-3 multisignature escrow address between Alice and Bob) to create and sign a transaction releasing the funds back to Bob.

In this case, Alice was not at fault but ended up suffering the consequences of an uncommon accident, which is an ideal scenario for insurance to cover. If Alice had taken merchant insurance for her trade with Bob, she could make a claim to cover the value of the lost good in the failed trade. The insurance provider may launch their own investigation before deciding to award Alice the insurance funds.

If the courier in this example did have a presence on OpenBazaar, Alice's insurance provider may contact the courier directly or the courier's insurance provider. In the latter case, compensation to Alice can be paid out of the courier's insurance policy funds (most likely after arbitration between both insurance providers).

4.0 Conclusion

This article is a primer for future participants of OpenBazaar to devise peer-to-peer merchant insurance policies to mitigate against losses in non-malicious failed trades. The Ricardian contract system used by OpenBazaar permits insurance contracts to be formed between peers on the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment