BitShares Forum

Main => General Discussion => Topic started by: bernard on January 01, 2015, 04:17:11 am

Title: BitUSD atomic cross chain trading
Post by: bernard on January 01, 2015, 04:17:11 am
How easy would it be to implement this in BitShares? TLDR; Payments are locked for nBlocks and refunded unless a secret from receiver is revealed.

https://bitcointalk.org/index.php?topic=628547.0
http://upcoder.com/11/atomic-cross-chain-exchange/

I would love to be able to trade BitUSD for Bitcoin or other alts directly and not have to deal with going though BTS everytime.
Title: Re: BitUSD atomic cross chain trading
Post by: bytemaster on January 01, 2015, 01:36:05 pm
Already supported at protocol level
Title: Re: BitUSD atomic cross chain trading
Post by: bernard on January 01, 2015, 03:06:18 pm
Already supported at protocol level

Not sure what that means.. I guess technically Bitcoin supports this at a protocol level as long as someone changes the client to create and accept these two new tx types (PayOnSecretReveal & SecretReveal).

So i'm assuming it also needs to be implemented in Bitshares? How much work would it be? Is anyone interested in implementing it?  I think it would increase demand for BitUSD if people can swap it for their own prefered coin.

What can I do to help make this happen? A couple of new API calls would be a good start perhaps?
Title: Re: BitUSD atomic cross chain trading
Post by: toast on January 01, 2015, 03:49:51 pm
Already supported at protocol level

Not sure what that means.. I guess technically Bitcoin supports this at a protocol level as long as someone changes the client to create and accept these two new tx types (PayOnSecretReveal & SecretReveal).

So i'm assuming it also needs to be implemented in Bitshares? How much work would it be? Is anyone interested in implementing it?  I think it would increase demand for BitUSD if people can swap it for their own prefered coin.

What can I do to help make this happen? A couple of new API calls would be a good start perhaps?

We don't have a scripting engine like BTC so "supported a protocol level" is slight more significant - there had to be deliberate effort to add that feature and it is there. But yes, someone has to change the wallet to craft the proper transaction.
Title: Re: BitUSD atomic cross chain trading
Post by: bernard on January 02, 2015, 12:43:41 am
Thanks Toast, that sounds promising.

If we can get a few coins to support this we can start a truly trust free cross chain trading.. how can I raise the profile of this change? i'd love to see it implemented in an upcoming release.
Title: Re: BitUSD atomic cross chain trading
Post by: xeroc on January 02, 2015, 01:35:22 am
Search the forums for a thread opened by me that has crosschain in tge titel .. that post describes how xct works under the hood
Title: Re: BitUSD atomic cross chain trading
Post by: bernard on January 02, 2015, 02:50:14 am
Thanks

https://bitsharestalk.org/index.php?topic=10132.0 (https://bitsharestalk.org/index.php?topic=10132.0)
Title: Re: BitUSD atomic cross chain trading
Post by: luckybit on January 03, 2015, 10:10:04 am
Already supported at protocol level

Maybe this is something to implement before 1.0. I could see it being very useful once Peertracks and other DACs are running.
Title: Re: BitUSD atomic cross chain trading
Post by: xeroc on January 03, 2015, 12:57:58 pm
Already supported at protocol level

Maybe this is something to implement before 1.0. I could see it being very useful once Peertracks and other DACs are running.
Totally agree! Even though the devs see escrow more as important (iirc)
Title: Re: BitUSD atomic cross chain trading
Post by: Akado on January 03, 2015, 03:23:17 pm
it seems something similar to this is already being done? https://bitcointalk.org/index.php?topic=904374.0
Title: Re: BitUSD atomic cross chain trading
Post by: vikram on January 06, 2015, 07:26:16 pm
Already supported at protocol level

Not sure what that means.. I guess technically Bitcoin supports this at a protocol level as long as someone changes the client to create and accept these two new tx types (PayOnSecretReveal & SecretReveal).

So i'm assuming it also needs to be implemented in Bitshares? How much work would it be? Is anyone interested in implementing it?  I think it would increase demand for BitUSD if people can swap it for their own prefered coin.

What can I do to help make this happen? A couple of new API calls would be a good start perhaps?

We don't have a scripting engine like BTC so "supported a protocol level" is slight more significant - there had to be deliberate effort to add that feature and it is there. But yes, someone has to change the wallet to craft the proper transaction.

This is wrong--support for this along with all other untested operations are completely disabled in BitShares. Combine this with the fact that such functionality has never seen testing, and the only accurate thing to say is that we have NO support whatsoever for such a feature.
Title: Re: BitUSD atomic cross chain trading
Post by: xeroc on January 06, 2015, 07:41:42 pm
"disabled in BitShares" equals disabled on blockchain/protocol level? or just client-side?
no withdraw_by_password anymore?

when did this happen.. that's (unfortunate) news to me :(
Title: Re: BitUSD atomic cross chain trading
Post by: ronpaulmoneyman on January 25, 2015, 10:06:19 pm

So this means this isn't about to happen anytime soon?  It would need to be enabled in devshares but there is no secondary chain to trade with. However Monsterer suggested I use this as it would be better but I'm not seeing it.

Is the code in toolkit branch to be enabled?

So how about I enable it in RPM then get it released and you guys enable it in Devshares? Then Devshares can have their price valued in RPMs! Katie bar the door! 

Or should i go back to running a gateway. <grin>  It seems preferable to exchanges at this point.

Title: Re: BitUSD atomic cross chain trading
Post by: xeroc on January 26, 2015, 07:24:22 am
As for CrossChain trading a "password" is shared it should be possible to test transactions without a second chain ..
basically it is just a "redeem with password"-kind of transaction .. those have to be enabled in devshares ..
@vikram : any chance to have withdraw_by_password_type transactions enabled in devshares so that people can finally test the implementation?
Title: Re: BitUSD atomic cross chain trading
Post by: vikram on January 26, 2015, 08:41:39 am
As for CrossChain trading a "password" is shared it should be possible to test transactions without a second chain ..
basically it is just a "redeem with password"-kind of transaction .. those have to be enabled in devshares ..
@vikram : any chance to have withdraw_by_password_type transactions enabled in devshares so that people can finally test the implementation?

No plans to enable it at the moment; every small thing we add will further delay 1.0. If the community thinks it is necessary though we can work on it.
Title: Re: BitUSD atomic cross chain trading
Post by: xeroc on January 26, 2015, 08:44:05 am
As for CrossChain trading a "password" is shared it should be possible to test transactions without a second chain ..
basically it is just a "redeem with password"-kind of transaction .. those have to be enabled in devshares ..
@vikram : any chance to have withdraw_by_password_type transactions enabled in devshares so that people can finally test the implementation?

No plans to enable it at the moment; every small thing we add will further delay 1.0. If the community thinks it is necessary though we can work on it.
IMHO an easy to use BTC<->bitBTC would be forth it ..

How much work is left to get those transactions to work?
Title: Re: BitUSD atomic cross chain trading
Post by: vikram on January 26, 2015, 06:19:05 pm
As for CrossChain trading a "password" is shared it should be possible to test transactions without a second chain ..
basically it is just a "redeem with password"-kind of transaction .. those have to be enabled in devshares ..
@vikram : any chance to have withdraw_by_password_type transactions enabled in devshares so that people can finally test the implementation?

No plans to enable it at the moment; every small thing we add will further delay 1.0. If the community thinks it is necessary though we can work on it.
IMHO an easy to use BTC<->bitBTC would be forth it ..

How much work is left to get those transactions to work?

There is no code for them other than a basic definition of what the condition for withdrawal should look like.
Title: Re: BitUSD atomic cross chain trading
Post by: teenagecheese on January 26, 2015, 06:22:48 pm
How easy would it be to implement this in BitShares? TLDR; Payments are locked for nBlocks and refunded unless a secret from receiver is revealed.

https://bitcointalk.org/index.php?topic=628547.0
http://upcoder.com/11/atomic-cross-chain-exchange/

I would love to be able to trade BitUSD for Bitcoin or other alts directly and not have to deal with going though BTS everytime.

I would love to see this. Ant not even have bitBTC at all, just real BTC on the internal exchange. Wow can you imagine how useful this would be, a real decentralized exchange you can send bitcoin to directly. This would raise the value of bitshares tremendously. People would love this. I know this is possible, I hope it gets implemented.
Title: Re: BitUSD atomic cross chain trading
Post by: toast on January 26, 2015, 09:30:32 pm
How easy would it be to implement this in BitShares? TLDR; Payments are locked for nBlocks and refunded unless a secret from receiver is revealed.

https://bitcointalk.org/index.php?topic=628547.0
http://upcoder.com/11/atomic-cross-chain-exchange/

I would love to be able to trade BitUSD for Bitcoin or other alts directly and not have to deal with going though BTS everytime.

I would love to see this. Ant not even have bitBTC at all, just real BTC on the internal exchange. Wow can you imagine how useful this would be, a real decentralized exchange you can send bitcoin to directly. This would raise the value of bitshares tremendously. People would love this. I know this is possible, I hope it gets implemented.

You know it's possible? Please enlighten us..
Title: Re: BitUSD atomic cross chain trading
Post by: Tuck Fheman on January 26, 2015, 09:41:57 pm
How easy would it be to implement this in BitShares? TLDR; Payments are locked for nBlocks and refunded unless a secret from receiver is revealed.

https://bitcointalk.org/index.php?topic=628547.0
http://upcoder.com/11/atomic-cross-chain-exchange/

I would love to be able to trade BitUSD for Bitcoin or other alts directly and not have to deal with going though BTS everytime.



I would love to see this. Ant not even have bitBTC at all, just real BTC on the internal exchange. Wow can you imagine how useful this would be, a real decentralized exchange you can send bitcoin to directly. This would raise the value of bitshares tremendously. People would love this. I know this is possible, I hope it gets implemented.

You know it's possible? Please enlighten us..


(https://41.media.tumblr.com/a5139c534b2aceda426bfb6dab38942a/tumblr_nit081uILv1rtef2wo1_400.jpg)
Title: Re: BitUSD atomic cross chain trading
Post by: arhag on January 26, 2015, 10:47:49 pm
I would love to be able to trade BitUSD for Bitcoin or other alts directly and not have to deal with going though BTS everytime.

I would love to see this. Ant not even have bitBTC at all, just real BTC on the internal exchange. Wow can you imagine how useful this would be, a real decentralized exchange you can send bitcoin to directly. This would raise the value of bitshares tremendously. People would love this. I know this is possible, I hope it gets implemented.

You know it's possible? Please enlighten us..

It is possible for certain definitions of "decentralized" and "real BTC".  You have to be willing to limit decentralization from "blockchain consensus cannot be changed/violated without approval/collusion of a super majority of stakeholders (which is typically a very large number of people)" to "block chain consensus cannot be changed/violated without approval/collusion of 46 active delegates". You also have to define "real BTC" as "I hold the private keys to control ownership/movement of the BTC and no one can realistically change that (assuming the cryptography isn't broken and is strengthened to keep up with the computational capacity of computers available) unless they either steal my private keys or the blockchain consensus is changed/violated (as explained earlier in the definition of decentralized)".

If you are willing to accept these definitions, then it is possible to exchange BitUSD for "real BTC" on our internal exchange in a "decentralized" manner. I explain how to do that here (https://bitsharestalk.org/index.php?topic=13101.msg171855#msg171855).
Title: Re: BitUSD atomic cross chain trading
Post by: ronpaulmoneyman on January 27, 2015, 09:12:57 pm

These nLock transactions that have timeouts. There is a potential attack there because they require constant overhead they could bloat up the Delegates. I mean obviously programmers can write code to mitigate it or limit the number of these transactions but they're not like regular transactions. It is O(n^2) vs O(n) to validate these types of transactions.
Title: Re: BitUSD atomic cross chain trading
Post by: teenagecheese on January 27, 2015, 11:03:14 pm
I would love to be able to trade BitUSD for Bitcoin or other alts directly and not have to deal with going though BTS everytime.

I would love to see this. Ant not even have bitBTC at all, just real BTC on the internal exchange. Wow can you imagine how useful this would be, a real decentralized exchange you can send bitcoin to directly. This would raise the value of bitshares tremendously. People would love this. I know this is possible, I hope it gets implemented.

You know it's possible? Please enlighten us..

It is possible for certain definitions of "decentralized" and "real BTC".  You have to be willing to limit decentralization from "blockchain consensus cannot be changed/violated without approval/collusion of a super majority of stakeholders (which is typically a very large number of people)" to "block chain consensus cannot be changed/violated without approval/collusion of 46 active delegates". You also have to define "real BTC" as "I hold the private keys to control ownership/movement of the BTC and no one can realistically change that (assuming the cryptography isn't broken and is strengthened to keep up with the computational capacity of computers available) unless they either steal my private keys or the blockchain consensus is changed/violated (as explained earlier in the definition of decentralized)".

If you are willing to accept these definitions, then it is possible to exchange BitUSD for "real BTC" on our internal exchange in a "decentralized" manner. I explain how to do that here (https://bitsharestalk.org/index.php?topic=13101.msg171855#msg171855).

I think it's possible with something along the lines of what arhag describes. I am willing to except varying levels of decentralization and disassociation to put it in effect. The important thing is that from a user standpoint, they only have to send their bitcoin to the bitshares exchange and then it shows up. Whether it's actually an IOU or held by a trusted gateway or whatever is ok as long as it is more decentralized than a standard exchange. I do not know enough about the technical details to actually explian it, but from my basic knowledge I believe that somehow, in some form, this user experience could be made to be AS IF you were trading real BTC. I should have specified this.

I would also guess that some incredible technical innovation would make a 100% decentralized version possible. That comes from all of my reading about atomic cross chain trading. Maybe it's not, you (toast) definitely know more than me, or almost anyone, about this.

My comment was really just an attempt to inspire some devs to create what I think would be a killer app for bitshares. I feel that we need one really good reason for an early adopter user base to start using bitshares, and a real decentralized exchange that accepts real BTC is the best I can think of. Once you get a user base like that, it is easier to get users for all of the other features bitshares has/will have.
Title: Re: BitUSD atomic cross chain trading
Post by: teenagecheese on January 27, 2015, 11:11:26 pm
One important thing I want to emphasize is that, if nothing else, I don't want to have to manually exchange my BTC to bitBTC through some gateway. That is too much work. I just want to send BTC to the bitshares exchange trade it, and then send it directly to my BTC wallet when I am done. Maybe integrate a BTC wallet into the client? I don't know, just trying to see a way to make it work. I can tell you I would definitely use the service if it were available. I HATE having to trust my bitcoin on regular exchanges.

I hope coinbase or the winklevoss don't add pegged assets or something similar into their exchanges, because those I would trust to use and they would effectively have all the same functionality as the bitshares exchange. Don't put too much importance on the decentralize aspect of bitshares, most people just want to trade what they want to trade, when they want to trade it, quickly and in a safe and easy way whether it's decentralized or not. It's the same concept as what bytemaster says about the light wallet, most people won't care that it is less decentralized.
Title: BitUSD atomic cross chain trading
Post by: carpet ride on January 27, 2015, 11:25:40 pm
One important thing I want to emphasize is that, if nothing else, I don't want to have to manually exchange my BTC to bitBTC through some gateway. That is too much work. I just want to send BTC to the bitshares exchange trade it, and then send it directly to my BTC wallet when I am done. Maybe integrate a BTC wallet into the client? I don't know, just trying to see a way to make it work. I can tell you I would definitely use the service if it were available. I HATE having to trust my bitcoin on regular exchanges.

I hope coinbase or the winklevoss don't add pegged assets or something similar into their exchanges, because those I would trust to use and they would effectively have all the same functionality as the bitshares exchange. Don't put too much importance on the decentralize aspect of bitshares, most people just want to trade what they want to trade, when they want to trade it, quickly and in a safe and easy way whether it's decentralized or not. It's the same concept as what bytemaster says about the light wallet, most people won't care that it is less decentralized.

It's true, people do not care about 'decentralized'. They care about security.

That's why I think we should not advertise as the 'Decentralized' Automated Exchange, but rather 'Blockchain-Automated Currency and Asset Exchange'.  This naturally implies security and everything else Satoshi Nakomoto blockchain.  That's before mentioning that 'Blockchain' is becoming a revered term in the Internet of things. We should be using it to our talking and selling points.






Sent from my iPhone using Tapatalk
Title: Re: BitUSD atomic cross chain trading
Post by: Tuck Fheman on January 28, 2015, 12:31:04 am
It's true, people do not care about 'decentralized'.

blasphemy! 

(https://38.media.tumblr.com/96efdd3a28a9ecbf530dc9a238687480/tumblr_ng6xzsUb8M1rtef2wo1_1280.jpg)

 :P
Title: BitUSD atomic cross chain trading
Post by: carpet ride on January 28, 2015, 01:46:00 am
It's true, people do not care about 'decentralized'.

blasphemy! 

(https://38.media.tumblr.com/96efdd3a28a9ecbf530dc9a238687480/tumblr_ng6xzsUb8M1rtef2wo1_1280.jpg)

 :P

Painfully waiting to market security and utility at 1.0.  However I am glad we at least have ideology and decentralization to market in the meantime


Sent from my iPhone using Tapatalk
Title: Re: BitUSD atomic cross chain trading
Post by: xiahui135 on January 28, 2015, 01:59:03 am
Good. Bts is just the share.
we should promote applications of the bitAssets.
Title: Re: BitUSD atomic cross chain trading
Post by: Akado on February 22, 2015, 12:43:43 am
It seems these guys made it? https://bitcointalk.org/index.php?topic=946174.0

"Mercury is a desktop wallet that eliminates the need for centralized exchanges. Currencies can be traded peer-to-peer, directly from the wallets of the traders.

Mercury Wallet implements the Cross-Chain Atomic Swap protocol, allowing users to buy and sell different cryptocurrencies, without any third-parties holding their funds. Trades happen on the blockchain(s), not in some exchange's database."

I think it's worth checking that out.
Title: Re: BitUSD atomic cross chain trading
Post by: joereform on February 22, 2015, 01:45:33 am
It's true, people do not care about 'decentralized'. They care about security.

I, along with many, many others, care about both. The former contributes to the latter.
Title: Re: BitUSD atomic cross chain trading
Post by: vegolino on February 22, 2015, 12:57:12 pm
It seems these guys made it? https://bitcointalk.org/index.php?topic=946174.0

"Mercury is a desktop wallet that eliminates the need for centralized exchanges. Currencies can be traded peer-to-peer, directly from the wallets of the traders.

Mercury Wallet implements the Cross-Chain Atomic Swap protocol, allowing users to buy and sell different cryptocurrencies, without any third-parties holding their funds. Trades happen on the blockchain(s), not in some exchange's database."

I think it's worth checking that out.
Great find thanks Akado  +5%
Title: Re: BitUSD atomic cross chain trading
Post by: Akado on February 22, 2015, 02:29:46 pm
It seems these guys made it? https://bitcointalk.org/index.php?topic=946174.0

"Mercury is a desktop wallet that eliminates the need for centralized exchanges. Currencies can be traded peer-to-peer, directly from the wallets of the traders.

Mercury Wallet implements the Cross-Chain Atomic Swap protocol, allowing users to buy and sell different cryptocurrencies, without any third-parties holding their funds. Trades happen on the blockchain(s), not in some exchange's database."

I think it's worth checking that out.
Great find thanks Akado  +5%

I guess that should be added to the "to do list" once v1.0 is released?
Title: Re: BitUSD atomic cross chain trading
Post by: betax on February 22, 2015, 07:56:39 pm
 +5% +5%