1
Ardor General Discussion / Re: Proposal for consensus-enforced atomic swaps between NXT, ARDOR and all clones
« on: September 18, 2019, 08:45:47 pm »Quote
It is only necessary that each platform understand how to interpret (and verify the signature of) one extra-platform transaction type - when submitted as an attachment of a native transaction (as described) to unlock a phased transaction. This is the key to guaranteeing that unlocking the funds on one platform can also can unlock the funds on the other (and that the keys are simultaneously accessible to both participants).
This is not enough to guarantee that Bob cannot immediately unlock and claim Alice funds right after she locked the 150 NXT. Bob can submit a valid Ardor transaction (valid bytes, validly signed) on the NXT blockchain, but his account may be already empty on the Ardor blockchain. Which the NXT nodes cannot know because they are not processing the Ardor blockchain, they only check the bytes and signature (right?).
Quote
I am very interested to learn how Migretor implemented their atomic swap protocol. Would you kindly provide a link to this information, or if you have the patience to explain, even if briefly, the protocol?I think they used the good old atomic swap protocol: https://en.bitcoin.it/wiki/Atomic_swap
Quote
Perhaps it is as simple as a phased transaction on each platform locked by two hashed secrets - only one is known to each. Both transaction's phased block height limits (approximated to time) are staggered so that one expires much sooner than the other and the protocol requires that the trader who has the later limit be the first to broadcast their secret. This will allow a safe margin of time for the trader with the first limit to decide if there is enough time to broadcast both secrets on the opposing platform. Something like this?Generally yes, but there is only one secret. Something like this:
1. Alice generates a secret and hash-locks her funds for very long time tA > 4 confirmations_periods. Bob can claim the coins during this period if he knows the secret. But only the hash of the secret is known here.
2. Bob waits for 1 confirmations_period and locks his funds on his blockchain with the same hash which Alice used, for a period of tB < tA - 2 confirmations_periods
3. Alice waits for 1 confirmations_periods and claims Bob's funds. This shows the secret. Notice that she can wait almost until Bob's lock period ends. So Bob's period must end before Alice's period, or else she can get back her coins and also claim Bob's coins.
4. Bob now knows the secret and has at least 1 confirmation_time to claim Alice coins.