Bitcoin/Safecoin

https://en.bitcoin.it/wiki/Atomic_cross-chain_trading

Posting for interested devs to read; very interesting to potential algorithm for Atomic Cross Chain Trading.

Making Bitcoin trade directly for Safecoin. Enjoy :sunrise:

4 Likes

Okay my instincts are telling me this could be brilliant but whoever wrote this sollution utterly failed at communication. If you use variables then define said variables. Math is a language. Programming code written in languages. Writing logic is not an excuse for bad communication skills or obscurity. That’s simply intellectual laziness, especially when you WANT to convey a new idea such as what is being done in the above article.

I didn’t notice a problem with it…

Okay. Please define H? Also does TX represent a transaction fee or are they seperate variables?

Note I merely skimmed the algorithm to get the gist of it. That being said, H(x) seems to just be a hash function whose argument is x, which is given by the user. Tx(1,2,3…) seems to refer to a complete transaction created by users A and B. When it says “A spends TX3 giving x” I don’t think its referring to a coin, I think it means, “A completes the atomic transaction TX3 which returns x as a result”. Could be wrong though.

Mmmhmmm well my point is that these things need to be clearly and explicitly defined when explaining an algorithm or any kind of logical process.

Right, but it is all pretty much explained below the algorithm description:

Bob create and sign the transaction as usual and compute its txid. He sends txid and the transaction body with input scripts/signature blanked to Alice. Alice computes hash of the blanked body, call it blankhash, and constructs transaction with special bitcointxid(blankhash,txid) opcode. Broadcasts the transaction to altchain. Bob waits for altchain tx to confirm and verify its outputs are as
previously agreed - at that point he sends the “uncensored” Bitcoin tx
to Alice who’ll broadcast it. Alice is therefore credited the bitcoin
funds, which in turn validate altchain transaction at the same time
(this is the atomic point). Note that bob releases his tx only if he is sufficiently confident
the altchain will not reorg its transactions, thus possibly double
spend. This might imply that many confirmations in altchain should
come first, however during that time each of them might decide to cancel
the trade with no further consequences.

2 Likes