1

I am using a digital currency exchange platform to swap between cryptos (Bitfinex, although the specific Exchange shouldn't matter I guess) and noticed something that I wanted to confirm. I started by transferring some Zcash from my desktop wallet to my "Exchange Wallet" on Bitfinex (the t-addr was generated using Bitfinex's "Deposit" functionality). When the transfer was confirmed and my Total Balance showed the correct amount, I placed an order to swap all of the Zcash for Bitcoins; the order is still active (not executed nor canceled). I then incidentally checked my balance on explorer.zcha.in and noticed it was zero, even though the order has not yet being executed. Indeed, by exploring the chain itself I found an actual transfer of my Zcash to another t-addr, with the corresponding transaction being inserted on a block and mined. The questions/comments are:

1) Does the Exchange (to avoid double spending?) temporarily transfer the money to an escrow t-addr until the order is executed? (And when that happens it both clears my Zcash Balance and increments my Bitcoins balance I assume).

2) If the order is indeed executed, I am assuming the Exchange does a second transfer, this time sending the Zcash from the escrow t-addr to the buyer's t-addr. This means two transactions on the chain for a successful trade.

3) On the other hand, if I cancel the order I assume the Exchange transfers the Zcash back to my t-addr, creating another transaction on the chain that needs to be mined. Similarly, if I instead modify the order (price or amount) does the Exchange need to refund my Zcash first, and then do another "escrow transfer" with the updated order parameters? (meaning additional transactions on the chain).

4) Item "3" above implies that several modifications in a given order will create many transactions back-and-forth the chain which need to get mined. Do these "pseudo-transactions" require a fee as well? Also, if I end up canceling the order after several order modifications, will I have generated some "useless" work on the chain for the sole purpose of speculative trading?

Is this the way Exchanges actually work? If so, is there a (safe) way this type of control can be done without creating various transactions which are not "real transactions" in a sense?

Hope the question is not confusing, thank you for any help.

2

I don't have any specific knowledge about Bitfinex, but I doubt that it works that way.

The most straighforward way to run an exchange is to pool all customer deposits. When you make a deposit (to a "t-addr"), the exchange credits your account (in their internal books), and the coins in that address are considered part of the "pool" and no longer have anything to do with you specifically. They're not "escrowed" in any way; they literally belong to the exchange now, and you have to trust that the corresponding credit in your account will be paid out by the exchange upon your demand. And there's no need to move coins gratuitously to avoid double spending; it wouldn't help.

Any external transfers that have to be made from the pool (customer withdrawals, moves to cold storage, Bitfinex extracting their earned fees, etc) are made from arbitrarily selected pool addresses. Trades that take place on the exchange can be done just by crediting and debiting the internal accounts of the customers involved, and typically would not provoke any external transactions, neither in cryptocurrencies (on the blockchains) nor in fiat (in actual bank accounts), until one of the customers wants to make a withdrawal. That would just be a needless expense in (external) transaction fees.

I suspect the blockchain transaction you saw around the time of your trade was just a coincidence, meaning only that the exchange needed to move funds for some reason (as described above) and happened to choose "your" address for that purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.