The way to a distributed exchange for Peercoin?

Some of you might have seen my question to Sunnyking about what he thinks about distributed exchanges. I think the current exchanges are one of the weaknesses, by not being distributed, in the crypto world. When I started buying coins I wondered why I had to trust vague organisations overseas not having any regulations. We have seen what this means with Mt. Gox and some smaller exchanges. So trading peer-to-peer would be the next logical step.

So what I think we need is a distributed exchange. A kind of wallet which lives on your PC together with the Peercoin wallet and advertises the amount of cryptos you want to sell and what you want to buy. Conceptually this seemed quite simple to me as you would only create an automated escrow service. Ensure both parties are happy (e.g. sign messages) with their transactions to an agreed independent address and let the network execute the transaction. Well, it sounds easy but it did take a bit longer than I expected. It was probably a bit more complicated. But finally our friends at Mastercoin have managed to put something together to exchange Mastercoins and Bitcoin in this way. It is called Masterchest wallet and you can find the Bitcointalk thread here: https://bitcointalk.org/index.php?topic=484025.0;all. It is all still alpha so please be extremely careful if you want to have a go at it. Edit: Here are some debug pictures of the exchange someone posted in the thread: http://i.imgur.com/lffLvCB.png

So what is the Peercoin link? Well, there isn’t any yet. However, we are in the processes of adding Peercoin functionality to the Omniwallet webwallet (donate here: http://peer4commit.com/projects/17) . The Omniwallet is recognised by the Masterchest wallet (the distributed exchange). So it occurred to me that if we also have a go at the Masterchest wallet and add Peercoin functionality to it, we will have a distributed BTC/PPC and possibly PPC/MSC exchange. How about that?

Any thoughts, too complicated, doable? Should we just fork the Masterchest wallet and add to peer4commit? Can we skip the Omniwallet step and use PPC wallet directly for this purpose? Or are there other developments I’m not aware of going on which would stop us persueing this?

Many questions, hope we can have a bit of a discussion here to find some answers. I guess it would also be interesting for Peershares to have a distributed exchange as they potentially face regulatory issues when trading on official exchanges, but that is maybe good for another thread.

My apologies for the long thread, but I like to take people on the journey to include to make it a bit accessible. Please let me know if you don’t get it, will try to explain better where I can.

I thought I bumped this as it is hard for me to believe that the community is not interested in this.

Maybe most of us missed it not being posted in General Discussion, the timing of the post or too long?
Or do I have it wrong? Wrong direction with exchanges? Wrong people to work with?

Anyway, looking forward to your responses.

BTW In the context of the ‘hot’ discussions around modularity and block chain bloating. This exchange wallet is working alongside the crypto networks, so no blockchain bloating as far a I understand.

I would love it if buying XYZ company on Peershares is as simple as downloading their client and buying trustlessly right there in it. Especially for re-investing dividends.

A distributed exchange would be great. I haven’t followed its development. How do you do price discovery in a distributed exchange? Every time there is a deal the price is broadcasted? How do I know the ask/bid prices and market depth?

Yes, prices are broadcasted, history is shown and bid and ask prices are shown. Not sure about market depth, but technically this shouldn’t be a problem as long as all clients broadcast their bids and asks regularly. The screenshots as posted before give you a bit of an idea of the current functionality: http://i.imgur.com/lffLvCB.png

@JonnyLatte
Yes, I agree that there is potential. Hope to hear Jordan’s view. I think piggy-backing on a generic platform will certainly give more visibility.

Truly: Shares Accessible For Everyone!

But we better be realistic and get Peercoin on it first. If the community really wants this we need to make sure a trusted developer will host this and establish contact with original developer. That is the hardest part moving it to the next level. Suspect that it won’t be too hard to get this funded given the funds already raised, but will see when time comes.

A distributed exchange is a logical step for a decentralized/distributed commodity/currency/whatever.
The need for trust should be limited to an absolute minimum - basically to the concept itself.

For payments the trust boundary is often extended to payment processors as is the trust extended for exchanging the crypto coins.
That should be worked on if the crypto coin world wants to achieve/maintain its decentralized character.

I have not yet read the Mastercoin/masterchest thread and so my response is for the time being limited to a conceptional point of view.
It is hard for me to tell whether to follow that trail of Omniwallet and Masterchest is a good way.
But I’ll investigate that once I have some time

But I think the idea is in line with what Peershares is going to do with stock markets (IPOs and dividend distribution).
As the Peershares project is on its way to allow for decentralized securities (another important step if crypto coins really want to help the world get rid of corrupt financial systems), so should other approaches to free the world be thought of.

Isn’t one of the Peershares hypothetical use cases exactly what we are discussing about?

[quote=“Jordan Lee, post:1, topic:382”]The shutdown of BTC Trading Corp and Litecoin Global has caused me to consider if there is a way for businesses to manage publicly held shares in a decentralized fashion. I realized it is possible to leverage Peercoin and proof of stake to accomplish this in an elegant and resilient way using a design I will call Peershare. I’d like to present my preliminary design and have my plan criticized and improved by the community. I am seriously considering doing most or all of the development of Peershare myself. Though I am very busy with prior development commitments, I think Peershare can be a critical enabler that brings depth and sophistication to the crypto economy so that it may be worthy of being prioritized above what I am currently focusing on. I’m hoping a community discussion will clarify whether that is true.

First I will talk about what the solution looks like technically. Next I will explain the advantages it offers over centralized security exchanges such as BTC Trading. I will wrap up by walking through what a couple Peershare use cases might look like.
[…]
Advantages of Peershare over a centralized solution such as BTC Trading Corp
[…]
2. Somewhat decentralized exchange of Peershares: Exchange of Peershares are decentralized in the same way exchange of Peercoins are. For example, if Vircurex shut down and ceased trading Peercoins, they would continue to be available at BTC-e, Crypto-Trade, Bter, etc., without any disruption. The present scramble we are seeing by issuers using BTC Trading to re-list their securities on another securities exchange would never occur because the issuer provides the key functions of IPO and dividend distribution themselves so shares can be traded on many exchanges or even person to person.
[…]
Hypothetical use case – Example of delisting from a centralized security exchange

Best Miner is currently listed on a centralized security exchange such as BTC Trading and would like to delist and take advantage of Peershare instead.

First, Best Miner raises a motion to make the switch. It is approved. Next, they change a single number in the Peershare blockchain source code to make the genesis block produce the number of shares they have actually issued instead of the default number of shares. They start the blockchain and secure it using a server on hand. They arrange to have Best Miner Peershares traded at a couple of exchanges. Shareholders download the Peershare client configured to use Best Miner (which only requires a .conf setting) and each shareholder sends Best Miner their public Peershare address. Trading at the centralized exchange is halted. Shares are transferred to the Peershare addresses supplied. Trading continues at exchanges such as Crypto-Trade and Cryptsy.
[…][/quote]

A decentralized exchange is one of the features of NXT, which I liked the moment I read about it.
The corresponding discussion thread for the NXT decentralized exchange is here: https://bitcointalk.org/index.php?topic=460343.0
Maybe there’s something helpful in it.

TL;DR
I want a distributed exchange, only I don’t know the way!

I’m not sure how I missed this, Cyb, but it’s definitely something that excites me. It also is a concept that opens the door to a lot of very hard technical questions (e.g., how to get fiat >< exchange), but certainly ones that deserve to be answered.

I’ll keep an eye on the discussions here and contribute when I can.