I'm currently working on a protocol for an on-chain market.
Here's roughly the API:
list <description> <price [in satoshi or other base unit]> <quantity (assumed to be 1 if not given)>? purchase <tx/msg-id of listing> <ship to info>
Optional messages:
shipped <tx/msg-id of purchase> received <tx/msg-id of shipped>
There's a lot more considerations that can be made, but this seems to be about the minimum representation (of course, messages could be encoded further or compressed) for a public on-chain market.
The messages could be included as simple text in a transaction and users or other software could interpret the messages so as to fulfill the contracts being made.
The purchase message would be in the amount of the price of the listing being purchased. All other messages could use the minimum chain transaction amount.
I'm currently working on a javascript parser that can read these messages.
[link] [comments]
source https://www.reddit.com/r/btc/comments/aikiuo/public_onchain_market/
No comments:
Post a Comment