OpenBazaar Flow - Physical Goods

28
1 3 2 4 5 6 7 9 8 1 0 Search 1 5 1 2 1 3 1 4 1 7 1 8 Actions 1. Wants to purchase an item 2. Wants to leave a rating Bob The Buyer Control Flow Graph 1. Buyer opens OpenBazaar 2. Buyer browses items from the nearest k-nearest- neighbour 3. Buyer searches for items matching a keyword(s) 4. Buyer searches for an item matching an ID 5. Buyer searches for GUID(s) to browse items 6. Buyer selects a single item to purchase 7. Buyer adds any semantic data to the order necessary for the Vendor 8. Buyer sends the order to Vendor and funds escrow address 9. Vendor flags the item as ‘shipped’ 10.Vendor cancels the order 11.Buyer flags dispute after maximum processing time, due to the Vendor being unresponsive 12.Buyer receives good, releases funds from escrow to Vendor and publishes rating to Vendor and Moderator 13.Buyer receives good, but fails to release funds from escrow to Vendor after maximum shipping time; Vendor opens dispute with Moderator 14.Buyer does not receive good after maximum shipping time; Buyer opens dispute with Moderator 15.Buyer confirms refund 16.Moderator confirms the refund 17.Moderator releases funds from escrow to payout Vendor 18.Moderator releases funds from escrow to refund the Buyer 19.Vendor confirms payout 20.Buyer confirms refund 1 9 2 0 1 1 1 6

Transcript of OpenBazaar Flow - Physical Goods

Page 1: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

9

8

10

Search

1512 13 14

17 18

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses items from the nearest k-nearest-neighbour3. Buyer searches for items matching a keyword(s)4. Buyer searches for an item matching an ID5. Buyer searches for GUID(s) to browse items6. Buyer selects a single item to purchase7. Buyer adds any semantic data to the order necessary for the Vendor8. Buyer sends the order to Vendor and funds escrow address9. Vendor flags the item as ‘shipped’10. Vendor cancels the order11. Buyer flags dispute after maximum processing time, due to the Vendor

being unresponsive12. Buyer receives good, releases funds from escrow to Vendor and

publishes rating to Vendor and Moderator13. Buyer receives good, but fails to release funds from escrow to Vendor

after maximum shipping time; Vendor opens dispute with Moderator14. Buyer does not receive good after maximum shipping time; Buyer

opens dispute with Moderator15. Buyer confirms refund16. Moderator confirms the refund17. Moderator releases funds from escrow to payout Vendor18. Moderator releases funds from escrow to refund the Buyer19. Vendor confirms payout20. Buyer confirms refund

19 20

11

16

Page 2: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar

• OpenBazaar is an Electron app with cross-platform installers

• Identity keys are created on first start-up• Network ID

• ECC key• Computes GUID• IP address and port is mapped to this

identity for network lookups• Bitcoin ID

• BIP32 key chain• Bitcoin addresses generated from seed• Addresses used for multisignature

transactions• Create node profile:

• Handle• Passcard (Onename)• Avatar• Time zone• Fiat currency

9 10

1512 13 14

17 18

19 20

11

16

Page 3: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses items from the k-nearest-neighbour

• By default, the application will query the k-nearest-neighbour (only those flagged as Vendors) for items they have listed if any

9 10

1512 13 14

17 18

19 20

11

16

Page 4: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses items from the nearest k-nearest-neighbour3. Buyer searches for items matching a keyword(s)

• Enters keyword(s) into the search bar• DHT is scanned for contracts tagged with matching

keywords• Items with matching keyword displayed (i.e. replaces

items from k-nearest-neighbour)

9 10

1512 13 14

17 18

19 20

11

16

Page 5: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses items from the nearest k-nearest-neighbour3. Buyer searches for items matching a keyword(s)4. Buyer searches for an item matching an ID

• Enters contract ID into the search bar• Contract ID

• ‘OB’ prefix + base58(RIPEMD-160[01_vendor])• QR code can be easily generated from the ID

• DHT is scanned for contracts with the queried ID• Item with matching the ID is displayed (i.e. replaces items

from k-nearest-neighbour)

Contract ID

9 10

1512 13 14

17 18

19 20

11

16

Page 6: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses items from the nearest k-nearest-neighbour3. Buyer searches for items matching a keyword(s)4. Buyer searches for an item matching an ID5. Buyer searches for GUID(s) to browse items

• Enters GUID or Passcard into the search bar• DHT is scanned for contracts listed by the queried

GUID or Passcard• Item listed by the GUID or Passcard are displayed (i.e.

replaces items from k-nearest-neighbour)

9 10

1512 13 14

17 18

19 20

11

16

Page 7: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses items from the nearest k-nearest-neighbour3. Buyer searches for items matching a keyword(s)4. Buyer searches for an item matching an ID5. Buyer searches for GUID(s) to browse items6. Buyer selects a single item to purchase

• The Buyer sees an item they want to purchase and clicks on either:

1. Item image2. Item title

9 10

1512 13 14

17 18

19 20

11

16

Page 8: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses items from the nearest k-nearest-neighbour3. Buyer searches for items matching a keyword(s)4. Buyer searches for an item matching an ID5. Buyer searches for GUID(s) to browse items6. Buyer selects a single item to purchase7. Buyer adds any semantic data to the order necessary for the

Vendor• Quantity of item• Text box for the Buyer to write out any special

semantic data• Form-based semantic generator (STRML)

9 10

1512 13 14

17 18

19 20

11

16

Page 9: OpenBazaar Flow - Physical Goods

Form-based semantic generator• Semantic data• Data needed from the Buyer to define the purchase order

(instead of having a contract for every type of iteration of the product)

• Examples:• Clothing: size, colour• Food: flavour, pack size

• Currently we’re allowing Buyers to write in this data in a blank text area

• This problem is related to product categories and sub-categories• Numerous semantic variation based on the type of product

Page 10: OpenBazaar Flow - Physical Goods

Form-based semantic generator• Instead of trying to map out the semantic data, we

can empower Vendors to create their own semantic inputs for Buyers via a ‘form editor’• Example: http://bootsnipp.com/forms• Can form the basis of contract templates that Vendors can

save and share• Eventually emerge as standards?

• Samuel Reed (STRML) agreed that it it’s possible and something he can do• Will need to be scheduled into the timeline• Not a v1 priority

Page 11: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph8. Buyer sends the order to Vendor and funds escrow address

• Buyer selects method of Bitcoin payment:1. Escrow2. Direct payment

• Escrow payments require the Buyer to select from a choice of Moderators

• Shipping address automatically added into the order; prompted if not already entered

• Payment:1. QR code for external payment2. Deducted from Bitcoin purse

• Notifications:• Vendor

• Order received• Buyer

• Order sent• Order Status:

• Processing (process time countdown)

9 10

1512 13 14

17 18

19 20

11

16

Page 12: OpenBazaar Flow - Physical Goods

Order Status: Processing

• When a Buyer places an order, the status of that order, in the ‘Transactions’ view, should be marked as ‘Processing’

• How long will it take for an order to process? When should the Buyer contact the Moderator for a refund?

• In the contract schema, there is a field ‘process_time’ for the Vendor to indicate to the Buyer how long it will take for an item to ship after an order has been placed• Once this time has elapsed, the Buyer can start to reach

out the Vendor to find the cause of delay• If the Vendor doesn’t respond, a refund request can be

made to the Moderator

Page 13: OpenBazaar Flow - Physical Goods

Bitcoin Purse

• To facilitate 1-click purchases • For purchases, the balance is topped up by transferring funds to the

application’s ‘wallet’ (or revenue from sales as a Vendor). When payments are made, the application attempt to deduct from the balance to enable 1-click purchases.

Page 14: OpenBazaar Flow - Physical Goods

Bitcoin Purse

• To manage payments

• For payments, the Bitcoin purse acts as a simple as a temporary store of all payments that can later be forwarded to a specific address, or used to fund purchases from other Vendors

• Buyers/Vendors have the option to receive payments/refunds to the wallet or an address they specify

Page 15: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph9. Vendor flags the item as ‘shipped’

• Order has been received; the Vendor ships the item to the Buyer• Vendor sends relevant data such as the tracking number and

revised estimate date for delivery• Notification:

• Vendor• Shipping notification sent

• Buyer• Item shipped

• Order Status:• Item shipped (shipping time countdown)

9 10

1512 13 14

17 18

19 20

11

16

Page 16: OpenBazaar Flow - Physical Goods

Order Status: Item Shipped• Depending on the shipping provider, there is a rough

estimate on the maximum amount of time it will take for the item to be delivered

• A countdown for the item to arrive, based on that estimate, allows the Buyer to keep track of the order• Sometimes there isn’t a tracking number, depending on

the method of delivery• Sometimes the tracking number doesn’t work (e.g. China

Post tracking site can be unreliable)

• If the item hasn’t arrived after the maximum expected time, the Buyer can contact the Vendor and/or raise a dispute with the Moderator

Page 17: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph10. Vendor cancels the order

• For whatever reason, the Vendor cancels the order• The Vendor sends a signed refund transaction to the Buyer, from

the multisignature escrow, for them receive the refund• Notification:

• Vendor• Cancellation notification sent

• Buyer• Vendor has cancelled the order• Vendor has sent a refund confirmation

• Order Status:• Order cancelled• Refund (pending)

9 10

1512 13 14

17 18

19 20

11

16

Page 18: OpenBazaar Flow - Physical Goods

Order Status: Order Cancelled• ‘Refund Pending’• The ‘pending’ status is required as two signatures are

required to release funds out of escrow to the Buyer• In this scenario, the Buyer needs to confirm the refund in

order to receive the refund• i.e. clicking the ‘confirm’ button will sign the transaction and

broadcast the release of funds

Page 19: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph11. Buyer flags dispute after maximum processing time, due to the Vendor

being unresponsive• Buyer attempts to contact the Vendor to ascertain whether they have

received the order or not• The Buyer flags a dispute with the Moderator, sending them a copy

of the trade receipt• The trade receipt will have all the necessary data for the

Moderator to generate the multisig keypair• Vendor receives a message that a dispute has been opened• Notification:

• Vendor• Order #abc123 has be flagged for dispute resolution by

the Buyer• Buyer

• Dispute resolution initiated• Moderator confirms dispute raised• Buyer confirms dispute raised (if node is online)

• Order Status:• Dispute resolution in progress

9 10

1512 13 14

17 18

19 20

11

16

Page 20: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph12. Buyer receives good, releases funds from escrow to Vendor and publishes

rating to Vendor and Moderator• Buyer is happy with the condition of the item when received• Buyer clicks ‘confirm item received’• Rating options appear (0-5 stars):

1. Rate the transaction2. Rate the quality of the item3. Rate the item description4. Rate the shipping time5. Rate customer service6. Leave written feedback (character limited)

• 1 major button that will release funds to Vendor• Data for rating, if any, will be sent to the Vendor and Moderator with

the release of funds• For the Vendor, this data is just the last set of values for the

contract template• For the moderator, the entire data set (all values) for the

contract need to be sent• Notification:

• Vendor• Item received• Funds released from escrow• Rating received• Order complete

• Buyer• ‘Item received’ confirmation sent• Payout transaction sent• Payout transaction success (0 confirmation)• Rating published• Order complete

• Order Status:• Order complete

9 10

1512 13 14

17 18

19 20

11

16

Page 21: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph13. Buyer receives good, but fails to release funds from escrow to Vendor after

maximum shipping time; Vendor opens dispute with Moderator• The Vendor has shipped the item, which is confirmed by the tracking

number, but the Buyer has failed to confirm the goods have been received (which is tied to the release of funds from escrow) and is unresponsive to any messages sent by the Vendor

• The Vendor flags a dispute with the Moderator, sending them a copy of the trade receipt• The trade receipt will have all the necessary data for the

Moderator to generate the multisig keypair• Buyer receives a message that a dispute has been opened• Notification:

• Vendor• Dispute resolution initiated• Moderator confirms dispute raised• Buyer confirms dispute raised (if node is online)

• Buyer• Order #abc123 has be flagged for dispute resolution by

the Vendor• Order Status:

• Dispute resolution in progress

9 10

1512 13 14

17 18

19 20

11

16

Page 22: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph14. Buyer does not receive good after maximum shipping time; Buyer opens

dispute with Moderator• While the Vendor claims to have shipped the item, it has not arrived

by the maximum expected delivery time• The Buyer flags a dispute with the Moderator, sending them a copy

of the trade receipt• The trade receipt will have all the necessary data for the

Moderator to generate the multisig keypair• Vendor receives a message that a dispute has been opened• Notification:

• Vendor• Order #abc123 has be flagged for dispute resolution by

the Buyer• Buyer

• Dispute resolution initiated• Moderator confirms dispute raised• Buyer confirms dispute raised (if node is online)

• Order Status:• Dispute resolution in progress

9 10

1512 13 14

17 18

19 20

11

16

Page 23: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph15. Buyer confirms refund

• The Vendor has sent a signed transaction releasing funds from escrow to the Buyer as a refund. The Buyer’s signature is required to complete the refund.

• The Buyer confirms the refund (1-click)• Notification:

• Vendor• Refund complete

• Buyer• Refund transaction sent• Refund transaction success (0 confirmation)

• Order Status:• Refund complete

9 10

1512 13 14

17 18

19 20

11

16

Page 24: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph16. Buyer confirms refund

• The Moderator has sent a signed transaction releasing funds from escrow to the Buyer as a refund. The Buyer’s signature is required to complete the refund.

• The Buyer confirms the refund (1-click)• Notification:

• Vendor• Refund complete

• Buyer• Refund transaction sent• Refund transaction success (0 confirmation)• Rating published• Refund complete

• Order Status:• Refund complete

9 10

1512 13 14

17 18

19 20

11

16

Page 25: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph17. Moderator releases funds from escrow to payout Vendor

• Moderator attempts to contact the Buyer to ascertain whether they have received the item or not

• After X time, if the Buyer is unresponsive, the Moderator signs a payout transaction releasing funds to the Vendor

• Notification:• Vendor

• Dispute #01: Moderator has sided with the Vendor • Confirm payout transaction

• Buyer• Dispute #01: Moderator has sided with the Vendor • Payout in process

• Order Status:• Dispute resolved: Moderator has sided with the Vendor

9 10

1512 13 14

17 18

19 20

11

16

Page 26: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph18. Moderator releases funds from escrow to refund the Buyer

• Moderator attempts to contact the Vendor to ascertain whether they have actually shipped the item or not; conducts a wider investigation to validate that the tracking number (if any) is accurate.

• After investigating, the Moderator finds in favour of the Buyer and signs a refund transaction

• Buyer will need to confirm refund transaction (as per multisig)• Notification:

• Vendor• Dispute #01: Moderator has sided with the Buyer• Refund in process

• Buyer• Dispute #01: Moderator has sided with the Buyer• Confirm refund transaction

• Order Status:• Dispute resolved: Moderator has sided with the Buyer 9 10

1512 13 14

17 18

19 20

11

16

Page 27: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph19. Vendor confirms payout

• The Moderator has sent a signed transaction releasing funds from escrow to the Vendor as a payout. The Vendor’s signature is required to complete the payout.

• The Vendor confirms the refund (1-click)• Notification:

• Vendor• Order complete

• Buyer• Payout transaction sent• Payout transaction success (0 confirmation)• Order complete

• Order Status:• Order complete

9 10

1512 13 14

17 18

19 20

11

16

Page 28: OpenBazaar Flow - Physical Goods

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase an item2. Wants to leave a rating

BobThe Buyer

Control Flow Graph20. Buyer confirms refund

• The Moderator has sent a signed transaction releasing funds from escrow to the Buyer as a refund. The Buyer’s signature is required to complete the refund.

• The Buyer confirms the refund (1-click)• Notification:

• Vendor• Order complete

• Buyer• Refund transaction sent• Refund transaction success (0 confirmation)• Rating published• Refund complete

• Order Status:• Refund complete

9 10

1512 13 14

17 18

19 20

11

16