Bitcoin Forum
October 23, 2017, 12:52:18 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  

Warning: Moderators do not remove likely scams. You must use your own brain: caveat emptor. Watch out for Ponzi schemes. Do not invest more than you can afford to lose.

Pages: [1] 2 »  All
  Print  
Author Topic: Idea for a decentralized security exchange  (Read 2934 times)
mgio
Hero Member
*****
Offline Offline

Activity: 546


View Profile
October 09, 2013, 05:09:00 PM
 #1

I was thinking about this some yesterday and I think the simplest way to have a distributed exchange without modifying the bitcoin protocol at all would be something similar to the following (see below). It would require a peer-to-peer network built to facilitate finding buyers and sellers for trading and distributing information regarding the securities but the transactions themselves would be conducted using the blockchain. This basic idea could be extended to facilitate bonds with buyback in addition to stocks although I haven't though through the details yet. The concept is similar to the idea of colored coins.

I'm willing to start building this, but I don't have the time to do it all alone, so if there are any talented programmers out there, please let me know if you are interested.

Here are the details:


   * Each security would be represented by a single bitcoin address. The issuer of the security would hold the private key for this bitcoin address. Information regarding the security, including any news, announcements, or updates to the security would be signed by the issuer using the security's private key thus ensuring that the information is truly coming from the issuer.
   * Shares in the security would be represented by the bitcoins belonging to the bitcoin address. Each satoshi would represent a single share. The security must be funded by a single transaction that represents the number of shares for that security. The total number of shares can never be increased or decreased. Any additional deposits made to the bitcoin address representing the security will be ignored by the Distributed Security Exchange (DSE) protocol. If the issuer wishes to increase the number of shares available he must create a new security.
   * Shares are traded to investors by transacting bitcoins from this address to a investors bitcoin address. For simplicity sake, each investor should have a separate bitcoin address for each security he invests in. In that way, the value of the coins in his address with represent, in satoshis, the number of shares he holds for a given security. There is nothing to stop him or someone else from depositing more coins into an investors address but the DSE protocol will not count coins that come from an address that can not be traced back to the original security issuer's bitcoin address.
   * Transactions of shares of a security would be performed using contracts. In the simplest case, the contract would involve the security seller transferring a number of satoshis equal to the number of shares he is selling to the buyer and the buyer transferring a the cost in bitcoin back to the seller. The contract would only be valid if both transactions have been signed appropriately by both the buyer and seller. A description of how contracts work in the bitcoin protocol is outside the scope of this document. In this way, both the buyer and seller can be sure that neither one can be cheated.
   * The current price of a security can be determine by using a standalone app (or web service) that scans the blockchain and looks at the most recent price a security was traded for. It can also use this method to get average prices, daily highs and lows, and volumes in addition to other useful statistics on a security.
   * Finding a buyer or seller is a little more difficulty. It is necessary to a use peer-to-peer network for buyers and sellers to connect with each other. A seller or buyer will broadcast how many shares they are looking to buy or sell and what price they are willing to buy or sell at. When a match is found, the trading software can automatically perform the transaction as described above and both parties will be notified of the transactions success. Transactions can occur outside of this peer-to-peer network just as easily so buyers and sellers can be located using other methods such as IRC, forums, and word of mouth, if desired.
1508719938
Hero Member
*
Offline Offline

Posts: 1508719938

View Profile Personal Message (Offline)

Ignore
1508719938
Reply with quote  #2

1508719938
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 1736

Newbie


View Profile
October 09, 2013, 05:13:03 PM
 #2

Each satoshi would represent a single share.

Won't work. Try to send 1 satoshi to any address.
LiteBit
Legendary
*
Offline Offline

Activity: 1105



View Profile
October 09, 2013, 05:14:01 PM
 #3

Shares would have to be larger than a satoshi.

Quote
The “anti-dust” patch, as it has become known, imposed a minimum size on any output in a bitcoin transaction. An output is a unit in a bitcoin transaction that defines the new owner, and the amount of bitcoins that he or she receives. In the new setup, any amount fewer than 5,430 satoshis (0.00005430 bitcoins) is disregarded. The developers made this patch to stop people from stuffing the blockchain with lots of microscopic transactions.
mgio
Hero Member
*****
Offline Offline

Activity: 546


View Profile
October 09, 2013, 05:49:51 PM
 #4

Each satoshi would represent a single share.

Won't work. Try to send 1 satoshi to any address.

Good point. But there is an easy fix. Shares will have to be larger than a Satoshi. Not a huge problem.
Sukrim
Legendary
*
Offline Offline

Activity: 2156


View Profile
October 09, 2013, 06:39:39 PM
 #5

You could simply use Ripple for this... Bitcoin is not really made to act as a marketplace from within, so you need an external network for trades anyways.

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
canuck
Member
**
Offline Offline

Activity: 116


View Profile
October 09, 2013, 07:08:35 PM
 #6

**Post deleted by Canuck**

Dont try to think of neat ideas with a nasty head cold.
glendall
Hero Member
*****
Offline Offline

Activity: 924



View Profile
October 09, 2013, 07:17:44 PM
 #7

Hey guys.. just wanted to let you know that there are two initiatives that I know of with similar goals under way.

open transactions http://opentransactions.org/wiki/index.php?title=Main_Page

& especially

bitcoinx   http://www.bitcoinx.org/


I'm sure they could use your help or at least promotion if you want to see them succeed (like myself, I think a decentralized security exchange is the way to go forward and avoid the entities which all ready have a monopoly control over most of the financial system.)
talnted
Full Member
***
Offline Offline

Activity: 236


www.bitcoingem.com


View Profile WWW
October 09, 2013, 07:20:22 PM
 #8

colored bitcoins

bitcoinx   http://www.bitcoinx.org/


The Original and Most Popular Gem Game: www.bitcoingem.com
Over 800+ BTC Paid Out!  1110+ Buyers of the Gem!
Luckybit
Hero Member
*****
Offline Offline

Activity: 714



View Profile
October 09, 2013, 11:46:08 PM
 #9

I was thinking about this some yesterday and I think the simplest way to have a distributed exchange without modifying the bitcoin protocol at all would be something similar to the following (see below). It would require a peer-to-peer network built to facilitate finding buyers and sellers for trading and distributing information regarding the securities but the transactions themselves would be conducted using the blockchain. This basic idea could be extended to facilitate bonds with buyback in addition to stocks although I haven't though through the details yet. The concept is similar to the idea of colored coins.

I'm willing to start building this, but I don't have the time to do it all alone, so if there are any talented programmers out there, please let me know if you are interested.

Here are the details:


   * Each security would be represented by a single bitcoin address. The issuer of the security would hold the private key for this bitcoin address. Information regarding the security, including any news, announcements, or updates to the security would be signed by the issuer using the security's private key thus ensuring that the information is truly coming from the issuer.
   * Shares in the security would be represented by the bitcoins belonging to the bitcoin address. Each satoshi would represent a single share. The security must be funded by a single transaction that represents the number of shares for that security. The total number of shares can never be increased or decreased. Any additional deposits made to the bitcoin address representing the security will be ignored by the Distributed Security Exchange (DSE) protocol. If the issuer wishes to increase the number of shares available he must create a new security.
   * Shares are traded to investors by transacting bitcoins from this address to a investors bitcoin address. For simplicity sake, each investor should have a separate bitcoin address for each security he invests in. In that way, the value of the coins in his address with represent, in satoshis, the number of shares he holds for a given security. There is nothing to stop him or someone else from depositing more coins into an investors address but the DSE protocol will not count coins that come from an address that can not be traced back to the original security issuer's bitcoin address.
   * Transactions of shares of a security would be performed using contracts. In the simplest case, the contract would involve the security seller transferring a number of satoshis equal to the number of shares he is selling to the buyer and the buyer transferring a the cost in bitcoin back to the seller. The contract would only be valid if both transactions have been signed appropriately by both the buyer and seller. A description of how contracts work in the bitcoin protocol is outside the scope of this document. In this way, both the buyer and seller can be sure that neither one can be cheated.
   * The current price of a security can be determine by using a standalone app (or web service) that scans the blockchain and looks at the most recent price a security was traded for. It can also use this method to get average prices, daily highs and lows, and volumes in addition to other useful statistics on a security.
   * Finding a buyer or seller is a little more difficulty. It is necessary to a use peer-to-peer network for buyers and sellers to connect with each other. A seller or buyer will broadcast how many shares they are looking to buy or sell and what price they are willing to buy or sell at. When a match is found, the trading software can automatically perform the transaction as described above and both parties will be notified of the transactions success. Transactions can occur outside of this peer-to-peer network just as easily so buyers and sellers can be located using other methods such as IRC, forums, and word of mouth, if desired.



Sounds a lot like mastercoin. Why not just develop mastercoin?
http://www.mastercoin.org/
https://bitcointalk.org/index.php?topic=265488.0
You could simply use Ripple for this... Bitcoin is not really made to act as a marketplace from within, so you need an external network for trades anyways.

No you don't. Bitcoin had scripting capabilities built in from the start. It was always meant to do this.


glendall
Hero Member
*****
Offline Offline

Activity: 924



View Profile
October 09, 2013, 11:48:44 PM
 #10

What's Mastercoin?  Excuse my ignorance... with the over 100 scam coins out it's easy to lose track of every new coin.
mgio
Hero Member
*****
Offline Offline

Activity: 546


View Profile
October 10, 2013, 06:57:46 AM
 #11

I've read about many of the other ideas posted here and many of them are similar.

Many of them have a much larger scope than what I am proposing here and some involve either a new alt coin to be created (master coin) or require changes or additions to the bitcoin protocol.

What I'm proposing would be very simple and require no changes to bitcoin at all. I'm looking at the simples way to get a peer-to-peer distributed security exchange up and running as quickly as possible.

There are a lot of great ideas out there (colored coins, zero coin, etc.) but I've yet to actually see a working product. In the meantime I'm going to read about some more up about the other projects talked about in thi s thread.
Luckybit
Hero Member
*****
Offline Offline

Activity: 714



View Profile
October 10, 2013, 07:58:30 AM
 #12

What's Mastercoin?  Excuse my ignorance... with the over 100 scam coins out it's easy to lose track of every new coin.

Mastercoin is not an altcoin. It's a layer built on top of the Bitcoin protocol. http://www.mastercoin.org

I think Mastercoin has the most potential. Colored coin doesn't have the same kind of momentum because Mastercoin has thousands of Bitcoins to fund development and has already been crowdfunded. I suggest you all just go to the Mastercoin thread and work on that, the bounties are already set up. https://bitcointalk.org/index.php?topic=292628.0

https://bitcointalk.org/index.php?topic=265488.0
User705
Hero Member
*****
Offline Offline

Activity: 728



View Profile
October 10, 2013, 08:28:01 AM
 #13

What about fees for transactions?
TradeFortress
VIP
Legendary
*
Offline Offline

Activity: 910


View Profile
October 10, 2013, 09:02:44 AM
 #14

Still works. Some miners still accept transactions less than 5430 satoshis. Any mining company that uses colored coins will happily accept those transactions too.
18RATTT
Sr. Member
****
Offline Offline

Activity: 282



View Profile
October 10, 2013, 10:54:37 AM
 #15

Sounds a lot like mastercoin. Why not just develop mastercoin?
http://www.mastercoin.org/
https://bitcointalk.org/index.php?topic=265488.0
You could simply use Ripple for this... Bitcoin is not really made to act as a marketplace from within, so you need an external network for trades anyways.

No you don't. Bitcoin had scripting capabilities built in from the start. It was always meant to do this.

very disappointing when i go to mastercoin.org
the 52 seconds introductory video does not explain what Mastercoin is, its just showing a logo splash screen, wth?

Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 2002



View Profile WWW
October 10, 2013, 11:16:44 AM
 #16

Colored coins do exactly what you want - they don't need a new blockchain or a change to the Bitcoin protocol, they allow representing arbitrary assets and contracts with atomic trades, and already have working (though experimental) implementations for a color-aware wallet and p2p trade.

bitcoinx.org is outdated, soon http://coloredcoins.org/ will be up to provide information. In the meantime here is a promotional video: http://www.youtube.com/watch?v=fmFjmvwPGKU

I see people have mentioned Mastercoin, it's much more ambitious but is also technically inferior, and more centralized (Mastercoins were issued with a time scale factor of 1 month).

1EofoZNBhWQ3kxfKnvWkhtMns4AivZArhr   |   Who am I?   |   bitcoin-otc WoT
Bitcoil - Exchange bitcoins for ILS (thread)   |   Israel Bitcoin community homepage (thread)
Analysis of Bitcoin Pooled Mining Reward Systems (thread, summary)  |   PureMining - Infinite-term, deterministic mining bond
jgarzik
Legendary
*
Offline Offline

Activity: 1470


View Profile
October 10, 2013, 11:31:39 AM
 #17


RE OP:  designs for decentralized exchanges already exist.

Mike Hearn, years ago, posted this design:

          https://en.bitcoin.it/wiki/Distributed_markets

I implemented that design in pybond, which got renamed to smartcoin:

          https://github.com/jgarzik/smartcoin

However, some smart cookies came up with colored coins as an alternate transit method:

          https://bitcointalk.org/index.php?topic=106449.msg1203918#msg1203918

People should research existing material; this subject has been around for years before the Silk Road bust ;p


Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Luckybit
Hero Member
*****
Offline Offline

Activity: 714



View Profile
October 10, 2013, 01:03:04 PM
 #18

Colored coins do exactly what you want - they don't need a new blockchain or a change to the Bitcoin protocol, they allow representing arbitrary assets and contracts with atomic trades, and already have working (though experimental) implementations for a color-aware wallet and p2p trade.

bitcoinx.org is outdated, soon http://coloredcoins.org/ will be up to provide information. In the meantime here is a promotional video: http://www.youtube.com/watch?v=fmFjmvwPGKU

I see people have mentioned Mastercoin, it's much more ambitious but is also technically inferior, and more centralized (Mastercoins were issued with a time scale factor of 1 month).

It's also crowdfunded, which means Mastercoin will probably be developed faster and better. For that reason I don't think it can be considered technically inferior.

Maybe you mean conceptually inferior? But none of the colored coin implementations are going to be superior to Mastercoin when Mastercoin has so much momentum. I do agree that it is a bit too centralized, dacoinminster has most of the Mastercoins and it's almost like Ripple. The code is open source though so even if that is the case the code can be adapted as needed to other projects. I just think the code written for Mastercoin and the organization around developing it is far superior to colored coin which seems to be stalled in its progress by comparison.

very disappointing when i go to mastercoin.org
the 52 seconds introductory video does not explain what Mastercoin is, its just showing a logo splash screen, wth?
https://sites.google.com/site/2ndbtcwpaper/

Colored coin doesn't even have a site. See what I mean?
thehun
Hero Member
*****
Offline Offline

Activity: 784


ICO Marketing & Moderation services


View Profile
October 10, 2013, 01:26:15 PM
 #19

The idea is good but the problems I can see after a quick thought are:

a) as already pointed out, 1 satoshi transactions are banned
b) trust issues (how can a "contract" enforce that both parties keep their word)
c) bloating of bitcoin blockchain (if microtransactions are used for share movement)

I have been also having thoughts about this and presented my idea yesterday with a similar approach but creating instead a "share-coin" where 1 satoshi transactions are allowed (each one representing a share) and an in-build automatic escrow.

https://bitcointalk.org/index.php?topic=308841.0

Quote
I have spent some time reading through the different proposals which are around to implement a decentralized exchange system (Mastercoin, Bitshares, Colored Coins, Hops, Open Transactions). I haven’t had enough time to review them all thoroughly but I have the impression that all ideas are great in their own way but they either tend to aim quite high leaving many implementation questions still open or need to rely on middlemen/escrows to complete transactions. Since time is against us after the recent events related to BTCT and Bitfunder, I think what we should initially aim for is a “quick and dirty” solution which gives us the basic functionality necessary for trading shares between two persons, and nothing more.

I have given this a quick thought and come to what I can foresee as a fast solution to this. I have taken ideas from several people in the group and simplified them as much as possible and added some thoughts of my own. I’m sure there will be several flows as I have many things going on and I haven’t dedicated more than a few hours to this.

Ok, so I will explain the idea: basically a “Sharecoin” is to be created, which will be 100% pre-mined and one share will correspond to the lowest divisible amount of the coin (“share-satoshi” if you will). A wallet will be created in BTC fashion and have a balance of X shares in it, public/private keys, etc, plus a field indicating the number of shares which are "locked" (unconfirmed sale) or "pending" (unconfirmed purchase).

A share transaction shall be completed in 3 steps:
   
   1-   Share seller and buyer agree a price (initially in BTC, but other altcoins could be supported in the future) with each other using whichever means they prefer.
   
   2-   The share seller sends a Sharecoin “payment request” transaction with an embedded message indicating:
        a.   Number of shares to be sold
        b.   Price in BTC per share
        c.   BTC address where payment is to be sent
        d.   Sharecoin address of buyer
        e.   Timeout of the transaction
   This transaction is to be signed with the private key of the seller in order to prove the origin.
   
   3-   After the transaction is confirmed (one confirmation should do) the shares are “locked” so that they can’t be sold twice (any request transaction involving locked shares is to be rejected immediately) and added as "pending" to the buyer's wallet. The buyer takes note of its code and sends the payment to the indicated BTC address and posts a "payment confirmation" Sharecoin transaction (signed with his/her private key) indicating:
       a.   BTC transaction code
       b.   Sharecoin transaction code of the original request

Now all the network has to do is to check that the payment has really been made and confirmed (maybe it can even be confirmed by Sharecoin nodes prioritizing that particular BTC transaction to give some speed, although I’m not sure if this is possible) and immediately the shares of the transaction shall be confirmed by the Sharecoin network. The shares assigned to the buyer’s wallet will no longer be "pending" and the locked shares will be removed from the seller's wallet.

After the defined timeout no "payment confirmation" transaction shall be accepted by the network. If after this defined timeout no payment has been received, the seller must send an “unlock request” transaction to be able to sell the shares to someone else. After confirmation of this transaction, the shares can be put on sale again.

This approach solves trust issues and removes the need for any middlemen, as the Sharecoin protocol would implicitly function as an escrow. It also avoids bloating the BTC blockchain with additional micro-transactions used to send messages. It does however require a certain linkage between the BTC and Sharecoin networks, and the way it is devised Sharecoin miners would not receive any rewards for confirming transactions or generating blocks. A possible variation to solve this last point would be to allow subdividing the shares (for example, leaving 1/1000th of a share for the miner confirming the transaction)

I'll be glad to receive your comments/criticism

P.S. I have no experience in Bitcoin-related development and my knowledge of the intricacies of the protocol isn't at pro-level either so I do realize I might have made some dumb assumptions.


In any case, I hope that if we join our efforts we can come to a working solution

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
███▌▄███████████▄
             ▐███
      ▄████████████▄
     ████████████████
     ██            ██
  ▄▄▄▄▄▄▄▄▄        ██
 ▐█████████▌       ██
 ▐█       █▌       ██
█▐█       █▌       ██
█▐█▄▄▄▄▄▄▄█▌▄▄▄▄▄▄▄██
█▐████ ▐███▌█▌ █████
▀ ▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀
]Professional 24/7 Moderation Services
      ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ WE AIM TO PLEASE
                             ▄▄▄▄▄▄▄▄▄▄▄▄▄
                 ▄▄▄▄██▀▀▀▀▀▀▀           ▀▀▀▀▀▀▀▀██▄▄▄▄
           ▄▄██▀▀                                     ▀▀▀█▄▄▄
       ▄█▀▀                                                 ▀▀█▄▄
    ▄█▀                                                         ▀▀█▄
  ▄█▀      ▄█▄                            ▄▄▄▄ ▄▄▄▄▄ ▄▄▄          ▀█▄
 ██       ▐███▌                          ▐█▀  ▄███▀  ▀▀▀            █▄
▐█▌        ▀████▄   ███▌█████▐██▌ ▄█████▄    ▄████▀   ███▌ ██▄ █▀    ▐█
 █▌       ▀ ▐████▄  ███▌ ███ ▐██▌ ▄█▀ ▀██   ████▀  ▄█ ███▌  ▀██▄     ▐█
  ██   ▄█   ▐████▄ ███▌ ███ ▐██▌ ▀██▄█▀█ ▄████  ▄███ ███▌ █▀ ▀██▄  ▄█
   ▀█▄▄                                                           ▄█▀
      ▀█▄▄                                                     ▄█▀▀
         ▀▀██▄▄                                           ▄▄██▀
              ▀▀▀██▄▄▄▄▄                          ▄▄▄▄██▀▀▀
                       ▀▀▀▀▀███       ▄████▀▀▀▀▀▀▀
                           ▒▓█    ▄▄█▀
                         ▄▒█▀ ▄▄██▀
                       ▄▒████▀▀
AmaZix█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
Anti-Scam/FUD
       Patrol
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
█ ▌█
Social Media Marketing
       for ICOs
                   ▄        ▄     
                  ████       ▀█   
                ▄▀█████ ▄  ▀▄ ▐█▄ 
             ▄▀▀ ▐██████ ▀▄ ▀█ ▐█ 
        ▄▄█▀▀     ▌ ████▌ ▀▌ █▌ █▌
   ▄▄████▌        █ ▐████  █ █▌ █▌
 ▄▌██████▌        ▐▄▐████  ▌ █  █ 
 █▌███████▄▄▄▄▄    ▀█████    ▀  ▀ 
   ▀ ▀▀▀███      ▀▀▀▀███▌      ▀  
        ▀██▄                      
         ███▄                     
          ▀▀▀                     
jgarzik
Legendary
*
Offline Offline

Activity: 1470


View Profile
October 10, 2013, 03:06:35 PM
 #20

Please, instead of these endless discussions, write some code. Even it doesn't work very well. At least you'll see what are the issues.

I posted links to code, even...

Additionally, this code submission for upstream bitcoin is intended to help enable a standard way of encoding metadata -- such as stocks/bonds, rather than current ad hoc methods such as the one employed by mastercoin.

     Relay OP_RETURN data TxOut as standard transaction type.
     https://github.com/bitcoin/bitcoin/pull/2738

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!