Skip to content

Latest commit

 

History

History
98 lines (67 loc) · 2.77 KB

mip-0006.md

File metadata and controls

98 lines (67 loc) · 2.77 KB
MIP: 6
Title: Commerce
Author: Jason Chavannes <jason@memo.cash>
Status: Draft
Created: 2018-11-17

Abstract

List items for sale that others can buy. Include information about the products and required information for purchase. Allow buyers to purchase items.

Motivation

Being able to buy and sell items is one of the most popular uses of the internet. Sites like eBay and Craigslist enable easy direct sales between individuals. Those sites are closed off though, for instance Craigslist does not allow housing listings to be shown on other sites. Using Memo to post items for sale will enable a global decentralized peer-to-peer marketplace.

Specification

Seller protocol actions:

Action Prefix Values
List item 0x6d50 title(), description(), price()
Add item image 0x6d51 item_tx_hash(30), url()
Remove item image 0x6d52 item_image_tx_hash(30)
Set purchase fields 0x6d53 field(), field(), ...
Remove purchase fields 0x6d54 field(), field(), ...
Set item title 0x6d55 item_tx_hash(30), title()
Set item description 0x6d56 item_tx_hash(30), description()
Set item price 0x6d57 item_tx_hash(30), price()
Adjust inventory count 0x6d58 item_tx_hash(30), count_diff()
Ack order 0x6d59 purchase_tx_hash(30), message()
Void order 0x6d5a purchase_tx_hash(30), reason()
Set escrow address 0x6d5b purchase_tx_hash(30), address(35)
Update order status 0x6d5c purchase_tx_hash(30), status()

Buyer protocol actions:

Action Prefix Values
Purchase item 0x6d60 item_tx_hash(30), quantity(), details*()
Add / update details 0x6d61 purchase_tx_hash(30), details*()
Request refund 0x6d62 purchase_tx_hash(30), reason*()
Mark item received 0x6d63 purchase_tx_hash(30), comment*()
Review purchase 0x6d64 purchase_tx_hash(30), rating(), comment*()
Rate item 0x6d65 item_tx_hash(30), rating(), comment*()

* Details are encrypted with seller pub key and in JSON format. Comments can optionally be encrypted.

Example

  • Seller:

    0x6d50 "Sticker" "Cool bitcoin cash sticker" 250000

    0x6d51 "https://imgur.com/..."

    0x6d53 "Name" "Address"

    0x6d58 <item_tx_hash> +5

  • Buyer:

    0x6d60 <item_tx_hash> 1 "{name: 'John Smith, address: '1600 Pennsylvania Ave NW, Washington, DC 20500'}"

    • Payment directly to buyer or to escrow holder (maybe 2-3 multi-sig)
    • Details encrypted with seller key
  • Seller:

    • ACKs order

    0x6d59 <purchase_tx_hash> "Thank you for your order"

    • Mails item
  • Buyer:

    • Receives item, marks it received

    0x6d63 <purchase_tx_hash>

    • Escrow releases to seller*

* Needs to handle disputes (from either buyer or seller)

Reference Implementation

Planned

See Also