Basically, ideas what the specific goals of CCT are regarding NXT.
1) define an API
- heavily use case dependent
- you should contribute what you want to achieve with cross-chain trading
- price negotiations?
2) design questions
- I fear we need something like a plugin architecture as transactions of different cryptocurrencies can look completely different
- re-use of current AE infrastructure?
- re-use of AT infrastructure?
Here is my proposal on using AE for trading one crypto to another:
Let us assume that we have a NXT asset that corresponds to all the cryptos, eg. BTC, DOGE, AUR, etc. The following example will work with any pair, but for clarity, lets pick BTC and AUR. People who had BTC would be able to do a 1:1 swap for BTCAUR and people who had AUR would be able to do a 1:1 swap for AURBTC. The reverse is possible, these are just trading pairs that lets us use the NXT AE for people to trade. We definitely will need more decimal places in the prices, but the biggest change is that these "swap" assets need to be denominated in one of the cryptos and it usually wont be NXT.
The orderbook would be bids for AURBTC and the asks would be inverse of BTCAUR. This is exactly like forex trading pairs. The market settles on which currency the market is traded in and for crypto when BTC is involved, it is the one that the prices are in. So when a trade is done, here comes the required NXTcore changes!, instead of exchanging the asset for NXT, the asset is exchanged for the agreed amount of the underlying currency, in this case BTC.
The owner of AUR swaps for AURBTC, agrees to trade at 0.1 BTC and gets BTC asset, the other party gets the AURBTC, which is freely convertible to AUR.
I just realized that if we can make change to the NXT API for asset trading to specify the trading to be in units of an asset,then we dont have to bother with all the AURBTC 1:1 swaps! We just directly trade AUR assets for BTC assets and specify that the trade is denominated in BTC. With one simple change to NXT AE handling in the NXT core, we get to use NXT AE for trading any crypto against any crypto that the gateway supports.
This isnt exactly automatic cross chain, but I think it will be what people will want to do, namely trade cryptos. Just one change in NXT API and we can do this as soon as NXT core supports fractions!!
************
Now let us say that Mr 47...88 is not satisfied with the above and wants a solution without any gateway involved. In that case we wont have assurance that either party actually has what they say they want to trade, since presumably they are wanting to trade directly from their wallets. It also requires making a crypto to crypto exchange GUI and an interface that prompts the users to locally sign their transactions. Since each transaction would need manual intervention by both parties to complete, I would think that its use would be limited to large transactions only.
I think having the gateways provide an abstracted (and peer reviewed) interface to the external blockchains would allow an AT to manage the transaction process. Something has to interface with the bitcoind and it cant be the AT directly, so I am having trouble seeing how it is possible to do automated cross chain in a totally decentralized way.
************
Unless I hear otherwise, I will assume that Mr 47...88 wants NXT to be able to trade crypto to crypto within NXT. My top solution does that and actually has several advantages over a pure cross chain solution, eg. funds are verified and no need to invoke lengthy blockchain transactions for each trade. I will proceed on the assumption that this is acceptable and that we will be able to make the one change in the NXT API.
James