For those that did not attend the latest dev hangout, BM briefly explained how cross-chain trading would work.
However, he also stated that ACCT is very low in priority as they see more value from developing escrow ... (imho they are right)
Anyway, I'd like to also let you know how ACCT works.
Let's assume we have Alice wanting to trade 1 bitUSD on BTSX chain for 1 bitUSD
on the DNS chain. Bob wants to do the same .. but the other way round.
Alice goes first (could also be Bob) .. and generates a random passphrase. Let's say
Alice generates the hash of the passphrase and gets something like
Alice uses a new kind of transaction (not so new.. it's already in the blockchain and called withdraw_password_type
that transaction goes towards bob and has the following rules
- the transaction is going TO bob
- it has a expiration of .. say 24h .. after that only alice can claim the transaction again
- bob can claim (within 24h) .. ONLY if he knows the password
Alice broadcasts this transaction in the BTSX chain and thus "transfers" the
funds to bob .. who will only be able to claim the shares if alice tells the password!
In the meantime, Bob creates a new transaction in the DNS chain. That
transaction goes to the account name of alice, and uses the exact same hash of
the passphrase (bob see that passphrase from alice's transaction in the btsx
chain) .. and he set's a expiration of less then 24h ..
So, if alice wants to have her shares in the DNS chain, she needs to reveal the
password in order to claim the withdraw_password_type
-transaction in DNS.
By doing so, Bob sees the passphrase and can take his shares in the BTSX chain,
beacuse it uses the same passphrase.
Tada .. everything worked out .. everybody happy
- It is crucial to have the the second transaction (bob does not know the
passphrase) .. expire WAY earlier than the first transaction to ensure that
alice cannot reclaim an EXPIRED ACCT transaction
- It is crucial (as usual) that the passphrase is chosen securely, and randomly!!
Anything I forgot to describe? Anything unclear?