Skip to content

Instantly share code, notes, and snippets.

@theblacksquid
Last active August 29, 2015 14:12
Show Gist options
  • Save theblacksquid/8f879c274fa6b4c14668 to your computer and use it in GitHub Desktop.
Save theblacksquid/8f879c274fa6b4c14668 to your computer and use it in GitHub Desktop.
Thoughts on the Buyer Front-End, notes and suggestions

Dependencies

/// tbd, these are just suggestions

Key generation, signing and escrow

  • openpgpjs
  • bitcoinjs-lib

GUI

  • AngularJS

Contracts

Program Flow (Sucessful Transaction)

  1. Buyer opens the seller's store on their website.

    // The store should have a "Resolve a problem" tab, for dispute resolution. // Might as well have a Contact form that encrypts messages, or a browser based bitmessage? // (that last part's a stretch)

  2. The store loads by showing the names of the items/services for sale, with images.

  3. Buyer selects the item they want to purchase.

  4. A request is sent to the seller's OB node for the item's contract

  5. the seller's OB node responds with the contract.

  6. The buyer's browser renders the contract into an item listing, 'ala eBay or etsy

  7. buyer fills in their information (name, email, mailing address, etc)

  8. buyer confirms their purchase* // which one of these // should come first?

  9. the one time PGP key is created from the buyer's info.*

    // They should be given a receipt number that // acts as the buyer's passphrase. (For one-off transactions)

  10. the contract is sent back to the OB network to be signed by the seller and a notary.

    // How will we get the notary and arbiter for this? // Random lottery? Stack-ranking via Proof-of-burn/Web-of-trust? // How can we avoid collusion between Seller and the Arbiter/Notary?

  11. Contract is notarized, escrow address is created from the GPG keys of the three (or more) parties.

  12. The buyer sends the payment to the escrow address.

  13. Seller sends the item/provides the service. (signs the release of funds using their own key)

  14. Buyer confirms receipt (signs the release of funds to the seller with their key)

    // How can the buyer leave a feedback rating on the seller's performance/product? // The store should have a way to access the OB network in order to leave a rating for the seller // or view the results of the seller's previous trades.

  15. Transaction complete.

Program Flow (Disputed Transaction)

*) Same as above, up until item 12.

  1. Problem arises

13.a) Buyer does not receive product/service 13.b) Buyer has a problem with the product/service

  1. Buyer goes to the "Resolve a problem" tab on the seller's store, and types in their receipt number.

  2. Arbitration period.

  3. Case closure

16.a) Arbiter decides, money is released to the winning party, less arbitration fees. 16.b) Mutual resolution, buyer signs off the funds to be released. 16.c) Partial refund, either requested by buyer, or offered by seller (and accepted by buyer), approved by arbiter, rest is relased to seller, less fees.

  1. Transaction Complete

Final Thoughts

  • Maybe we could fix the Arbiter/notary problem by publishing a list of to-be-notarized contracts on the DHT, and then interested Notaries could choose?

  • Buyer can send their rating througb the notary, and the notary could just place the buyer's response on the network. (It's a bit obvious that I've got no idea as to OB's low-level protocol, isn't it?)

  • Implement @dionyziz's web-of-trust once it is done.

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