is there a transactional flow chart of a trade cycle?

#1

I am trying to understand the underlying processes that happen when a trade is executed. How is the ETH/BTC moved from one persons wallet to the others.

Does this have to be done manually?

Does the BC wallet of each chain act as a smart wallet that does the transaction for you?

3 Likes
#2

Hi Satoshi,

So first let me point you towards the Borderless Webinar that would be helpful in your understanding of how Borderless functions.

As to your questions;

How is the ETH/BTC moved from one persons wallet to the others? Does this have to be done manually?

I would start to watch the Webinar at the 07:20 mark as this is when Arjun gets into this.

When you take or make an order from the order book, the order is “Matched”. Once the order is matched the trader has a set time in which to “Sign trade”. This signing of the trade is automated sending of the transaction through the Borderless platform.

From my discussions with Arjun: “The Borderless interface will have a nice interface to easily sign and send transactions (basically you will just decrypt your private key locally and the transaction will be signed and send). Users can choose for this to be automatic as orders are matched or they can do it manually.”

Once you have sent your transaction, the counterparty also has a set time to send the transaction. If either party fails to go through with the trade the NRG they used as collateral will be forfeit.

Does the BC wallet of each chain act as a smart wallet that does the transaction for you?

No it doesn’t. The Borderless platform simply acts as the means to push the transaction. The rovers pick the transaction up and send it to the miners. My belief is that once that transaction is mined, the opposing party knows immutably the state of the other chain, that the trade has been successful. In my mind it’s about proving the state of chains to the traders.

Hopefully that clears things up for you. @multichain can correct me if said anything wrong.

5 Likes
#3

Also this thread is good, similar questions asked:

2 Likes
#4

Disclaimer: the following is based on my own understanding, it could be INCORRECT.

Basic idea is all blockchain only recognize their own native asset, and have control over it. The only native asset BC can control directly with its own scripting language (BEAM) is NRG

So what happening during a trade is basically

  1. Maker create offer and commit the NRG collateral, it is locked up by the SC logic written in BEAM script, a timeout is also set to determine the validity period of the offer.
  2. Taker and maker found each other and intend to trade
  3. Taker take up the offer by committing the same amount of NRG collaterals, locked up by BEAM SC as well.
  4. Now both parties need to send each other the agreed amount within the timeout enforced, by “signing” the transaction on Borderless (think of it like simply sending each other’s the said amount of coins via a typical crypto wallet)
  5. BC multichain (via your miner + rover) will be able to tell if the coins have reached the destination address as both maker’s and taker’s memberchain addresses on BC multichain are always observed and state changes are mined. The state changes are determined via the consensus from all miners running the Proof of distance.
  6. lastly, if the coins reach the destination address, the NRG is returned to the original owner, if it is not, it will be sent over to the counterparty to make up for their “losses”. Remember NRG can be moved around like that is because it is NATIVE asset of BC that can be controlled by BEAM script.

@multichain correct me if I was wrong about this explanation.

3 Likes
#5

I feel this is accurate but i too could be completely wrong. I love this elegant explanation David! Thanks for chipping in :smiley:

2 Likes
#6

While the transaction flow on Borderless might seems “easy” but remember this is an exchange without centralized server, so actually all your trades, offer, are transmitted to everyone accurately, as on-chain transactions on BC multichain. Why this is important? Because abuse can come in many forms not just at the late stages of the flow that involve the wallet. Imagine if you were presented an offer at 13 NEO per ETH but it is actually modified / hacked value by exploiter which in reality was in a rate that favor the bad actor (says 1.3 NEO per ETH) this kind of hackery can happen with centralized exchange but a true on-chain DEX avoid this issue because each and every data presented to you is result of mined smart contract transactions, going thru consensus. This is just one example.

3 Likes
#7

This is a great explanation! Very well put. The only thing that I would like to add is that takers may also take partial orders but committing a multiple of the min order fulfillment requirement. This means as a maker I specify the minimum amount of collateral to take my order and the full amount. So for example a maker collateralizes an order for 100 NRG and choose the min fulfillment to be 10NRG. Now any taker can come and fulfill that order in increments of 10NRG. Once they do and their transaction wins in that block, the original maker order is taken and a new one is spun up with the leftover collateral not taken by the taker.

4 Likes
#8

So takers can sign partial filled orders?? I assume so as the “Matched order” would only show what ever was matched at the increments they set?

#9

Yes takers can sign partial orders and then in the list of matched orders they receive, it would only show that response amount that was filled.

1 Like
#10

Thanks David! I think this post will clear a lot of confusion on how BC works.

Question. Are the transactions in Step 4 sent through the rovers? Can a user set up those transactions (i.e., tx of coins in member chains) so that they are triggered by a BEAM script? Basically where I am trying to get is if BC can communicate from Multichain to Member Chains, or those transactions need to be done by the user client (in this case Borderless).

1 Like
#11

As of now, you/the user is responsible for signing/sending these transactions while Borderless is in SAFE/UD Mode.

4 Likes
#12

The implication being the application in not safe mode will push the transactions for you?

1 Like
#13

The implication is that post the vote period, Borderless will give users and option for automatic signing/sending if the user wishes to do so.

1 Like
#14

How does internally work? Can any rover push those transactions? Is there a fee in NRG? How to ensure transactions go through when offline?

#15

Fundamentally your rovers are connected to the miners of other chains, so your rover would just be pushing transactions to them (in the same way that you can push transactions to the ETH Network by running your own geth node).

2 Likes
#16

Right, but that would require my rover to be online, no? If I must be the one initiating the transaction, then it is not censoship resistant, and requires me to be online constantly. Ideally I would expect that in Borderless I set a maker order and then leave waiting for it do its magic so that when I come back I have my coins in my wallet.

Generalizing this idea. If the multichain was to relay data between smart contracts in different blockchains, I don’t think it would make sense to expect the interested parties to be online running rovers/miners.

Perhaps, I am not getting, but this is a conversation I have been waiting for a long time to have. :slight_smile:

#17

You are correct, in the current model it would have to require you to be online in order for you to sign/send your transaction. In the future, you could definitely presign a transaction that gets translated into the respective chain’s transaction format for when a taker takes your order. In this case, you would pay miners for processing that transaction for you.

2 Likes
#18

How long does it take for the BC blockchain to confirm that a user wants to TAKE an order? And I assume the order status would change once a user TAKES the order so its no longer available in the order book, or it errors out if many users try to take the same order. So it would behave like the early days of EtherDelta correct?

#19

Is there a scenario chart of the possible outcomes to different situations?

For example one that comes to mind is if a user TAKES an order and he is required to send BTC, but the time limit is 4 hours, what would happen if it takes 5 hours for the BTC transaction to get mined?

Also how are the transaction fees calculated and are they editable before confirming a trade or signing a transaction?

#20

Basically if the transaction is accepted within a block and it has the highest fee for the miners amongst competing taker transactions for the same order, that transaction will be included in the block.

2 Likes