Pages:
Author

Topic: Idea for a decentralized security exchange - page 2. (Read 3146 times)

legendary
Activity: 1212
Merit: 1037
October 10, 2013, 08:26:15 AM
#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://bitcointalksearch.org/topic/possible-quick-and-simple-solution-for-a-decentralized-exchange-308841

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
hero member
Activity: 714
Merit: 510
October 10, 2013, 08:03:04 AM
#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?
legendary
Activity: 1596
Merit: 1100
October 10, 2013, 06: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://bitcointalksearch.org/topic/m.1203918

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

donator
Activity: 2058
Merit: 1054
October 10, 2013, 06: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).
sr. member
Activity: 282
Merit: 250
October 10, 2013, 05:54:37 AM
#15
Sounds a lot like mastercoin. Why not just develop mastercoin?
http://www.mastercoin.org/
https://bitcointalksearch.org/topic/mastercoin-new-protocol-layer-starting-from-the-exodus-address-265488
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?
vip
Activity: 1316
Merit: 1043
👻
October 10, 2013, 04: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.
legendary
Activity: 896
Merit: 1006
First 100% Liquid Stablecoin Backed by Gold
October 10, 2013, 03:28:01 AM
#13
What about fees for transactions?
hero member
Activity: 714
Merit: 510
October 10, 2013, 02: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://bitcointalksearch.org/topic/300-btc-coding-contest-distributed-exchange-mastercoin-developer-thread-292628

https://bitcointalksearch.org/topic/mastercoin-new-protocol-layer-starting-from-the-exodus-address-265488
hero member
Activity: 546
Merit: 500
October 10, 2013, 01: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.
legendary
Activity: 2156
Merit: 1018
Buzz App - Spin wheel, farm rewards
October 09, 2013, 06: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.
hero member
Activity: 714
Merit: 510
October 09, 2013, 06: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://bitcointalksearch.org/topic/mastercoin-new-protocol-layer-starting-from-the-exodus-address-265488
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.


full member
Activity: 236
Merit: 100
www.bitcoingem.com
October 09, 2013, 02:20:22 PM
#8
colored bitcoins

bitcoinx   http://www.bitcoinx.org/

legendary
Activity: 2156
Merit: 1018
Buzz App - Spin wheel, farm rewards
October 09, 2013, 02: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.)
member
Activity: 116
Merit: 10
October 09, 2013, 02:08:35 PM
#6
**Post deleted by Canuck**

Dont try to think of neat ideas with a nasty head cold.
legendary
Activity: 2618
Merit: 1007
October 09, 2013, 01: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.
hero member
Activity: 546
Merit: 500
October 09, 2013, 12: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.
legendary
Activity: 1133
Merit: 1050
October 09, 2013, 12: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.
legendary
Activity: 2142
Merit: 1010
Newbie
October 09, 2013, 12:13:03 PM
#2
Each satoshi would represent a single share.

Won't work. Try to send 1 satoshi to any address.
hero member
Activity: 546
Merit: 500
October 09, 2013, 12: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.
Pages:
Jump to: