Re-posting @nemgun's response from
https://safenetforum.org/t/nvo-decentralized-exchange-crowdsale/13608/630In our typical scenario, user A has BTC and wants to buy ETH, and user B has an ETH and wants to sell them for BTC.
1. At any given time User A shall submit an order expressing its intention to purchase 100 ETH @ 0.1 BTC / ETH prices
The order will be the procedure of creating address 2of2
* The validator part in the wallet named safe browser will create a 2of2 address with the amount, price, ETH reception address, it will call the smart contract encrypted in double sha 256.
* The private key of the address will be stored in the safenet
* The decryption key for the private key that is stored in the safenetwork will be stored on a blocked encrypted blockchain this blockchain is the inverse of a standard blockchain it encrypts the information.
* The mini blockchain will place the order in the order book
* The mini block chain has the role of syncronizing the wallets and it allows communication between them.
2. At another time, User B will issue an order to sell 50 ETH Awards @ 0.1 BTC / ETH
The validator part in the wallet named safe browser will create a 2of2 address with the amount, price, ETH reception address, it will call the smart contract encrypted in double sha 256.
3.Calculation Exchange Procedure
* The mini block chain will detect the deal by logical price
* She will call the two smart contracts that will be compared
* At the end of this verification, the active wallet will engage the safebrowser
* The safebrowser vas creates the ultimate smart contract that will be named the smarcontract swap
* The smartcontract swap will compare the amounts to deduct the excess with the exchange addresses.
* The excess will remain on the smart contract which will be returned on the safenetwork waiting for another deal the ride will be 0.04994 btc all from hangs from sending fee.
* The smartcontract swap will be copied into 4 online wallets in case of disconnection, the blockchain will specify the wallets online in a way aleatoir.
* It will take 4 copies of the smart contract for the deal to be realized, once synchronised the smartcontract swap realises the swap en then is deleted.
* Arrive at this stage the smart contract will be deleted.
This is where my logic model stops because for the following I am in test phase for the 0conf.