21
1 3 2 4 5 6 7 9 8 1 0 Search 1 5 1 2 1 3 1 4 1 7 1 8 Control Flow Graph 1. Buyer opens OpenBazaar 2. Buyer browses services from the nearest k- nearest-neighbour 3. Buyer searches for services matching a keyword(s) 4. Buyer searches for services matching an ID 5. Buyer searches for GUID(s) to browse services 6. Buyer selects a service 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 submits an invoice to the Buyer for services rendered 10.Vendor cancels the order 11.Buyer flags dispute after maximum processing time, due to the Vendor being unresponsive 12.Buyer receives service, releases funds from escrow to Vendor and publishes rating to Vendor and Moderator 13.Buyer receives service, but fails to release funds from escrow to Vendor after maximum confirmation time; Vendor opens dispute with Moderator 14.Buyer does not receive the service or is dissatisfied with the quality of the service; 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 1 9 2 0 1 1 1 6 Actions 1. Wants to purchase a service 2. Wants to leave a rating Bob The Buyer

OpenBazaar Flow - Services

Embed Size (px)

Citation preview

Page 1: OpenBazaar Flow - Services

1

32 4 5

6

7

9

8

10

Search

1512 13 14

17 18

Control Flow Graph1. Buyer opens OpenBazaar2. Buyer browses services from the nearest k-nearest-neighbour3. Buyer searches for services matching a keyword(s)4. Buyer searches for services matching an ID5. Buyer searches for GUID(s) to browse services6. Buyer selects a service 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 submits an invoice to the Buyer for services rendered10. Vendor cancels the order11. Buyer flags dispute after maximum processing time, due to the Vendor

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

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

Vendor after maximum confirmation time; Vendor opens dispute with Moderator

14. Buyer does not receive the service or is dissatisfied with the quality of the service; Buyer opens dispute with Moderator

15. 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 2: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl 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:

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

9 10

1512 13 14

17 18

19 20

11

16

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 3: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph2. Buyer browses services from the k-nearest-neighbour

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

9 10

1512 13 14

17 18

19 20

11

16

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 4: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph3. Buyer searches for services matching a keyword(s)

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

keywords• Services with matching keyword displayed (i.e.

replaces services from k-nearest-neighbour)

9 10

1512 13 14

17 18

19 20

11

16

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 5: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph4. Buyer searches for services 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• Service with matching the ID is displayed (i.e. replaces services

from k-nearest-neighbour)

Contract ID

9 10

1512 13 14

17 18

19 20

11

16

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 6: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph5. Buyer searches for GUID(s) to browse services

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

GUID or Passcard• Service listed by the GUID or Passcard are displayed

(i.e. replaces services from k-nearest-neighbour)

9 10

1512 13 14

17 18

19 20

11

16

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 7: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph6. Buyer selects a single service to purchase

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

1. Service image2. Service title

9 10

1512 13 14

17 18

19 20

11

16

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 8: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph7. Buyer adds any semantic data to the order necessary for the

Vendor• Quantity of service (if applicable)• 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 9: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl 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

• 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 10: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph9. Vendor flags the service as ‘complete’

• Order has been received by the Vendor, who has then performed the service to the Buyer based on the escrow address being funded

• Notification:• Vendor

• Service complete• Buyer

• Service complete• Order Status:

• Service complete

9 10

1512 13 14

17 18

19 20

11

16

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 11: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 12: OpenBazaar Flow - Services

1

32 4 5

6

7

8

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

being unresponsive• Buyer attempts to contact the Buyer 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 13: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph12. Buyer has been serviced, releases funds from escrow to Vendor and

publishes rating to Vendor and Moderator• Buyer is happy with the quality of the service performed• Buyer clicks ‘confirm service complete’• 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• Service complete• Funds released from escrow• Rating received• Order complete

• Buyer• ‘Service complete’ 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 14: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph13. Buyer receives service, but fails to release funds from escrow to

Vendor after maximum shipping time; Vendor opens dispute with Moderator• The Vendor has performed the service to the Buyer, but they

have failed to release funds to the Vendor 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 15: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl Flow Graph14. Buyer does not receive the services as per the contract; Buyer opens

dispute with Moderator• While the Vendor claims to have made performed the service, it

may have been partially completed or of a poor quality• 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 16: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 17: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 18: OpenBazaar Flow - Services

1

32 4 5

6

7

8

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

• Moderator attempts to contact the Buyer to ascertain whether they have received the service 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 19: OpenBazaar Flow - Services

1

32 4 5

6

7

8

Search

Actions1. Wants to purchase a service2. 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 performed the service or not; conducts a wider investigation if necessary.

• 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 20: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer

Page 21: OpenBazaar Flow - Services

1

32 4 5

6

7

8

SearchControl 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

Actions1. Wants to purchase a service2. Wants to leave a rating

BobThe Buyer