Author Topic: Can Bitshares incorporate an ACTUAL decentralized exchange?  (Read 6638 times)

0 Members and 1 Guest are viewing this topic.

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
Is there any way the bitshares blockchain can:
1. Randomly generate a public key / private key pair

Yes.

2. The private key is encrypted, and known by no-one besides the blockchain

No.

That's the problem. The very nature of the blockchain means that all of the transactions on it are publicly known and the database state they modify can be deterministically computed by anyone.

To actually trade BTC (or any other cryptocurrency other than the ones existing on the blockchain in which the exchange is implemented on) with other cryptoassets, the exchange would need to be able to control that BTC. Meaning it needs to be able to create signatures on arbitrary hashes using the private key corresponding to the BTC address. Now I believe there is a way using threshold signatures that is compatible with ECDSA to do this while distributing the trust to many parties. For example, one could transfer the BTC to an address that can be only be compromised by collusion of at least 51 of the 101 delegates but still allow transactions to be signed if approved by all 101 delegates. (In practice I would probably make this 46-of-101 because I don't want to require all 101 active delegates to participate. With the t <= (n+1)/2 requirement, t=46 gives t'=91, which means at least 90% of the delegates need to participate in the interactive signature process. This relaxation also helps with the transition process as the set of active delegates gradually changes.) While this is an improvement in decentralization of trust, it is not trust-free like a typical blockchain is. You cannot switch over to a fork of a blockchain and have the ownership properties of that BTC change with it. Also, as the active delegates change, the old delegates are still the ones who control the BTC given to them. You would need to provide economic incentives for them to keep moving the BTC to the updated set of 101 active delegates in a timely manner.

In short, it is not doable in a truly trust-free way. Instead, forget about actually trading BTC. What you care about is trading the value of BTC, and that is what BitBTC is about. Then use gateways that spread the trust of the BTC reserves using multisig to withdraw and deposit your BTC in exchange for GATEBTC.

Edit: Although I have to say, the idea of using the 101 delegates and threshold signatures to implement a BitShares standard gateway for ECDSA-compatible cryptocoins (basically Bitcoin and probably all other altcoins) is a compelling idea. Since it is placing trust in the same entities that are already trusted (via economic incentives) to behave, it gives that gateway a little more legitimacy than any other.
« Last Edit: January 10, 2015, 04:13:32 am by arhag »

Offline fluxer555

  • Hero Member
  • *****
  • Posts: 749
    • View Profile
This may be were Toast's graph edge  theory comes into play. Something about having encrypted information only visible between two transactions. So the private key can be stored on the BitShares blockchain and pass to the other party once the order fills while still being private to everyone else. It can then execute a sweep on the key to the receiver's public BTC address via the BTC blockchain.

The problem with this is that for a short period of time two individuals have access to the private key.

Is there any way the bitshares blockchain can:
1. Randomly generate a public key / private key pair
2. The private key is encrypted, and known by no-one besides the blockchain
3. An event triggers the blockchain to decrypt the private key to a specific user

My intuition says this is not possible... but I'm not sure.

Offline teenagecheese

  • Full Member
  • ***
  • Posts: 134
    • View Profile
I feel like not everyone is understanding me. Regardless of the technical definition of an actual exchange, what I meant was:

I want to be able to just send my bitcoin or dogecoin or whatever directly to my bitshares client and then use it to buy bitusd or maybe bts (and also the reverse, bitusd or bitshares to btc or dogecoin) without having to do any extra steps. It needs to be that convenient. Anything can happen in the background, I don't care, but I don't want to have to interact with a traditional exchange or gateway at all unless I am converting to or from actual fiat.

I think onceuponatime's link is sort of getting at what I'm saying, not totally sure. If so that's awesome.

Did you read today's update? I think it is close enough to what you are wishing for. Here it is:

https://bitsharestalk.org/index.php?topic=12317.15

Ok, made some good progress this week:

Set up another machine in order to test this process more correctly.
Tested sending BTC to the daemon address and correctly got BTS back out again.

Still working on the opposite way around, having some slight issues when the sender is not a registered bitshares account.

All in all, this is close to being the first releasable version! Once this outstanding bug is fixed and I can get some more testing done it will be ready to go!

Have a great weekend!

Cheers, Paul.


Onceuponatime, thanks. I've read it now. I think this is only sort of what I am talking about, still not as convenient. It doesn't sound like it would act as a traditional exchange from the user point of view, i.e., this wouldn't allow me to trade for btc within the bts client and then withdraw actual btc, directly from the bts client, whenever I wanted.

Offline teenagecheese

  • Full Member
  • ***
  • Posts: 134
    • View Profile
I think the problem is that bitcoin private keys need to be owned by real people, and cannot exist trustlessly on the bitshares blockchain. Please tell me if that is incorrect.

This may be were Toast's graph edge  theory comes into play. Something about having encrypted information only visible between two transactions. So the private key can be stored on the BitShares blockchain and pass to the other party once the order fills while still being private to everyone else. It can then execute a sweep on the key to the receiver's public BTC address via the BTC blockchain.

Yes, this is what I was talking about. I share the same kind of concerns about the technical/trust issues, but it would be so great if people who know more than I about this stuff could figure it out. Very interesting conversation I think.

Offline onceuponatime

I feel like not everyone is understanding me. Regardless of the technical definition of an actual exchange, what I meant was:

I want to be able to just send my bitcoin or dogecoin or whatever directly to my bitshares client and then use it to buy bitusd or maybe bts (and also the reverse, bitusd or bitshares to btc or dogecoin) without having to do any extra steps. It needs to be that convenient. Anything can happen in the background, I don't care, but I don't want to have to interact with a traditional exchange or gateway at all unless I am converting to or from actual fiat.

I think onceuponatime's link is sort of getting at what I'm saying, not totally sure. If so that's awesome.

Did you read today's update? I think it is close enough to what you are wishing for. Here it is:

https://bitsharestalk.org/index.php?topic=12317.15

Ok, made some good progress this week:

Set up another machine in order to test this process more correctly.
Tested sending BTC to the daemon address and correctly got BTS back out again.

Still working on the opposite way around, having some slight issues when the sender is not a registered bitshares account.

All in all, this is close to being the first releasable version! Once this outstanding bug is fixed and I can get some more testing done it will be ready to go!

Have a great weekend!

Cheers, Paul.

Offline Riverhead

I think the problem is that bitcoin private keys need to be owned by real people, and cannot exist trustlessly on the bitshares blockchain. Please tell me if that is incorrect.

This may be were Toast's graph edge  theory comes into play. Something about having encrypted information only visible between two transactions. So the private key can be stored on the BitShares blockchain and pass to the other party once the order fills while still being private to everyone else. It can then execute a sweep on the key to the receiver's public BTC address via the BTC blockchain.

Offline fluxer555

  • Hero Member
  • *****
  • Posts: 749
    • View Profile
I think the problem is that bitcoin private keys need to be owned by real people, and cannot exist trustlessly on the bitshares blockchain. Please tell me if that is incorrect.

Offline Riverhead


I get where you're coming from now. You want the bitUSD/BTC market in the BitShares client to trade actual BTC on the BTC blockchain for bitUSD on the BitShares blockchain.

Offline teenagecheese

  • Full Member
  • ***
  • Posts: 134
    • View Profile
I feel like not everyone is understanding me. Regardless of the technical definition of an actual exchange, what I meant was:

I want to be able to just send my bitcoin or dogecoin or whatever directly to my bitshares client and then use it to buy bitusd or maybe bts (and also the reverse, bitusd or bitshares to btc or dogecoin) without having to do any extra steps. It needs to be that convenient. Anything can happen in the background, I don't care, but I don't want to have to interact with a traditional exchange or gateway at all unless I am converting to or from actual fiat.

I think onceuponatime's link is sort of getting at what I'm saying, not totally sure. If so that's awesome.

Offline Riverhead

What most people use an exchange for isn't actually an exchange. They are value traders and speculators. Trading in derivatives accomplishes the same thing in pretty much the same way except it takes advantage of the fungible nature of currency.

Traditional Exchange:
- Send them your your money, trade on their site.
- If they get hacked, shutdown, run away, you've lost your money.

BitShares Exchange:
- Send the tradition exchange your money, buy bitAsset and send it back to your wallet.
- If the traditional exchange is hacked, shutdown, etc. they lose (or steal) that money, but not your money. You can still sell your bitAssets at another exchange because your bitAsset isn't tied to their wallets.

Offline onceuponatime

I've heard a lot of talk about how Bitshares is a decentralized exchange, which it is in one form, but this made me wonder. Could it be made to work like a real exchange where you can send your actual cryptocurrency, not an IOU, and exchange it for another? You could have IOU's working within the client and backed by Bitshares somehow, but from a user experience point of view it would just be like using BTER or Cryptsy or whatever.

Yes, I realize this is probably technically very difficult. But, if you did this obviously that would bring HUGE adoption. Nobody likes trusting the current centralized exchanges.

I suppose the most difficult part would be getting around the need for the user's client to have multiple blockchains. Maybe this could be solved in the same way the BTS lightweight client is? Curious here to here devs thoughts.

https://bitsharestalk.org/index.php?topic=12317.0

Offline matt608

  • Hero Member
  • *****
  • Posts: 878
    • View Profile
BitShares is an actual decentralised exchange.  On centralised exchanges when you deposit a cryptocurrency you no longer control the private keys which means what you are seeing is an IOU.  It's not a metaphor, it really is an IOU, they just don't call it an IOU because it being held on the exchange makes it implicit that they owe you that amount.

Offline teenagecheese

  • Full Member
  • ***
  • Posts: 134
    • View Profile
I've heard a lot of talk about how Bitshares is a decentralized exchange, which it is in one form, but this made me wonder. Could it be made to work like a real exchange where you can send your actual cryptocurrency, not an IOU, and exchange it for another? You could have IOU's working within the client and backed by Bitshares somehow, but from a user experience point of view it would just be like using BTER or Cryptsy or whatever.

Yes, I realize this is probably technically very difficult. But, if you did this obviously that would bring HUGE adoption. Nobody likes trusting the current centralized exchanges.

I suppose the most difficult part would be getting around the need for the user's client to have multiple blockchains. Maybe this could be solved in the same way the BTS lightweight client is? Curious to hear devs' thoughts.

« Last Edit: January 11, 2015, 02:28:29 am by teenagecheese »