NVO Decentralized Exchange - Crowdsale


9 posts were merged into an existing topic: Topic for off-topic discussions of SAFE and its worth/success from the NVO topic

Topic for off-topic discussions of SAFE and its worth/success from the NVO topic

Thanks for the input. Negative comments are always surprisingly more motivating.


Hi @nemgun,
I’ve been reading both this and the bitcointalk forum for several days now and trying to make up my mind on whether to invest into this project, but am still struggling.
Anyways, regarding the code you’ve posted. - Could you kindly clarify what you were trying to present here?
I see both the Bancor token constructor code and (I assume) the code from the NVO wallet, but can’t make a connection between the two. I would like to make sure that I’m not missing something important you were trying to point out.

Also, purely from a technical perspective:

  1. The following section from the sendBitcoin() method appears to have a bug.
    Shouldn’t it read unspent.value instead of unspentValue?

As it stands now, the condition would always resolve to False, since unspentValue is undefined.

2.In addition, even if we corrected this condition to use unspent.value, the condition itself could still be invalid, since the unspent value might not be sufficient to cover both the value being sent and the transaction fee.
In which case the value of change would become negative, but the transaction would fail either way as the inputs included would not cover the transaction fee.

3.In the sendBitcoin() method, the section processing more than one unspent transaction appears to include all such transactions as inputs, even if one transaction might have a sufficient unspent value. Now, I haven’t done any development with blockchains, and do realize that this may be a common pattern, but it just looks odd that one would potentially specify a hundred inputs substantially exceeding the amount required, only to consolidate the large amount of change into one return output. Again, perhaps I’m making invalid assumptions here, so your feedback is welcome.


I told you that it is a code that will be matured, I know there are errors, I did not put everything because of the limit of characters by post.

I’m setting up the system, and then I would mature it, it’s an answer to happybeign and dirvine.

There are a few errors, and other functions can be reformulated, I would have 4 months after the crowdsale to finish the code and prepare the platform, for my reflection about bankor is that its Does not serve to give bits of code every time, I prefer to develop the community at the same time that I develop.

feel free to aks questions, or join us on slack.


The code seemed rather trivial and I may have lost track of what @dirvine had been asking for, so I’ll just assume it wasn’t meant to display anything extraordinary.
Now, I’ve been reading your posts regarding the use of multi-signature addresses for trade execution, and am still trying to wrap my head around the logistics of that process.
So, let me just outline how I envision it based on the assumptions I’ve had to make to fill the gaps, and please bear with me here as I’m a very technical person and prefer specifics over abstracts. (Devil is always in the details)

In our typical scenario, user A has BTC and wants to buy ETH, and user B has ETH and wants to sell them for BTC.

  1. At some point in time, user A submits an order expressing his intent to buy 100 ETH @ 0.1 BTC/ETH price
  2. At another point in time, user B submits an order expressing her intent to sell 50 ETH @ 0.1 BTC/ETH price
  3. A match is detected by the validator V (although the match is partial)
    (here I have to start making assumptions based on what you’ve described before)
  4. V creates two 2-of-2 multisig addresses: V&A (BTC) and V&B (ETH).
  5. V requests A to send 5 BTC to V&A
  6. V requests B to send 50 ETH to V&B
  7. V is awaiting the payments
  8. A broadcasts a transaction on the Bitcoin blockchain and sends 5 BTC to V&A from its private Bitcoin address
  9. B broadcasts a transaction on the Ethereum blockchain and sends 50 ETH to V&B from their private Ethereum address
  10. Now they all wait, especially since Bitcoin is involved, - could be several minutes to an hour or longer
  11. V monitors both V&A and V&B until both payments have been received.
  12. V validates the amounts received
  13. V requests A to sign and return a 2-of-2 transaction for sending the previously deposited 5 BTC from V&A to B
  14. V requests B to sign and return a 2-of-2 transaction for sending the previously deposited 50 ETH from V&B to A
  15. Once both transactions have been signed and returned, V parses and validates them to ensure conformance with the original order and amounts/rate etc.
  16. V signs both V&A and V&B transactions using its own escrow key (unique for each trade)
  17. V broadcasts the V&A transaction, effectively sending 5 BTC to B
  18. V broadcasts the V&B transaction, effectively sending 50 ETH to A
  19. V destroys the private keys/addresses related to the completed trade
  20. V modifies the original order submitted by A to reflect the partial fulfillment, - to 50 ETH target
  21. V marks the original order submitted by B as 100% fulfilled, and removes it from the queue

So, assuming this is roughly what takes place, there are a couple areas of concern that I’d appreciate your comments on:
1. What happens if the validator loses connection or crashes between steps 17 and 18?
I mean, we don’t have anything like MSDTC for distributed transactions or two-phase commits here, so how do you envision handling such conditions? For example, would a newly created instance of the validator detect this abnormal termination and complete the process?

2. Given the need for the 2-of-2 escrow addresses, the flow of funds in each direction during a trade would supposedly double the amount of transaction fees incurred. (e.g. A=>V&A=>B)
Has this been taken into account? There have been remarks that the 0.2% exchange fee applied on top of the transaction fees may be too excessive and could completely negate any benefits provided by a decentralized exchange.
This issue becomes especially noticeable when multiple transactions are required to fill a single order (which is almost always the case, except when a buy and sell orders produce an absolute 100% match).

3. The whitepaper does not mention multi-sig in the context of online trading, but it does so for the potential implementation of offline trading. And where it does mention that, it also says that the use of multi-sig makes the exchange non-decentralized since the escrow/validator effectively holds the funds for some time.
Now, if multi-sig will need to be used for online trading in order to prevent double-spend, that would make online trading non-decentralized as well. - Is that a correct assumption?

I have provided this step-by-step outline of what the process might look like, so that all of us technical folks on this forum would be able to reference those steps for sharing opinions and ideas, and come to a pretty clear understanding of what a viable solution might look like.
Please do bear in mind that despite my almost 30 years in software development I have never coded anything for blockchains in particular, and the above is purely my attempt at putting together the puzzle of all the scattered piecemeal information I’ve read and heard so far on this thread and what I could infer from it.
I strongly believe that this particular area of the implementation will be the absolute defining factor in the success or failure of this project, therefore I think the discussion should focus on this area as it has remained extremely vague thus far.
Hopefully, focusing on the technical aspects will let us address all the concerns and help all the potential investors move forward with their contributions.


These are the questions that should have been asked 1.6 million dollars ago :stuck_out_tongue: :stuck_out_tongue: or whatever it currently is


Wow, made it to the bottom … I dropped out for a week and only back in today to find so much more to read …

I am not invested (yet) in NVO and do not have an opinion about whether or not NVO could succeed (more on that later), but wanted to point out to the many detractors here who are seeking a lot of specific answers that David Irvine would not have been able to give specific answers in the beginning for many of the solutions that he and the MAIDSAFE team have come up with in the present day. Maidsafe is after all a high risk bet - one that many of us are invested in because we like the concept and we like David and the team.

So, yeah … keep in mind that NVO hasn’t been built yet and I’m sure that there are a lot of nitty gritty details that are going to give the NVO team a lot of sleepless nights ahead.

Even if they’ve some of the theory wrong (not saying they have), they still have time and resources now to rework in order to achieve the vision they’ve put forward … how many times has the MAIDSAFE team had to alter course to insure the success of the vision? A few.

So, IMO, please consider that NVO, like MAIDSAFE is a high risk venture and not replete with in-depth answers … yet.

There is also a cultural and language barrier here that is likely causing some division.

As regards the possibility of their success even if they have the endurance and ability, there is the difficulty in the task - perhaps it is impossible. Given the complexity of the task we cannot know IMO. The vision of MAIDSAFE was, at one point, itself to complex to know if it could succeed, but we invested anyway. NVO is attempting to build atop SafeNet … but that already makes it a more difficult task as SafeNet isn’t yet a firm protocol - things could change out of necessity.

So I am giving a large leeway here for NVO’s success or failure, I’m still here listening though :slight_smile:

The question for me to invest is really whether I believe in the vision and in the ability & endurance of the players to see it through – to the bloody end if needed!! lol

Keep calm and carry on NVO and MAIDSAFE!


Great post. I think making the parallels NVO / MaidSafe is a bit of a stretch and may be a little insulting to David. See the background on David Irvine pre MaidSafe 14 years ago and tell me he had a good start at knowing which end is up. Making up a great concept and suggesting it can come to fruition with no talent is absurd.


Well I don’t know about talent with regard to NVO guys … it is unproven - but that does not imply that it doesn’t exist.

I also don’t think David would take insult to my comparison - I know David has a strong background in networking - but building Internet 3.0 would be crazy hard even for a team of Nobel Laureates.

So I think, yes, NVO is a high risk investment … so is SafeNet, even with a dozen David Irvine’s at the helm.

If you want a safe investment, buy some gold and bury it in the back yard I reckon … if you are willing to suffer the ups and downs of a high risk investment, then ask yourself if you really love the vision and trust in the endurance/will of the people involved - ability/talent can be learned in time if there is the will.

Well that’s what I believe anyway … if you don’t trust in their will to push forward, then don’t take the risk with your money.


In this case, and for multitude of reasons, it does imply that. This is not about investments, it never was.


Well for me it’s about an investment … what is your reason for commenting on this thread otherwise?

As for their talent, I have looked into some of their past work and it is related, so IMO they do have some talent in this area. The question for me is, whether they have the will … and that’s what I’m up in the air about.


Alright then. Good luck.

Well, it started with questions that still have not been answered.

Time will tell.


I’ve taken your scenario, and I thank you, I think it’s the most beautiful question I’ve had since the beginning of the crowdsale, and I appreciate your discipline and the fact that your questions are organized.

In 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.

From here I can not continue to answer because the logic of your question does not have the logic of the functioning of the validator, I hope to have helped you and I ask you to take in concideration model j atend with pleasure the following Of your questions.


Your post just boosted me, I thank you really, it was a very emotional :cry: moment that made me think of an episode of dragon ball Z, and that the survival of the universe depended on me, it is like if I was sangohan and I had to beat cell, and everything depended on my will to win. Thank you so much.


:slight_smile: I’m a dragonball fan too. I read your post mentioning it before and it gave me hope that you do have the will to pull it off - lol - well you anyway … don’t know about the rest of the NVO team yet.


All the team watches a new episode of Dragon Ball Super every sunday to decompress :slightly_smiling_face:


IMO, so much in life is about what you believe … I think that, if it is possible at all, then success or failure all depends on you.


The difference is, David and team presented detailed white papers, years of research material, presentations and David responded calmly and in detail to the many questions. That latter in particular sold it for me and I happily invested in to him and his plans.

I am not seeing parallels with NVO here.


Fair enough … however SafeNet is a much larger project and is attempting something that hasn’t been done before … and while a decentralized exchange is a relatively new idea, it’s not unique … e.g. open-bazaar, NXT’s decentralized exchange as other examples. David is also a native english speaker … so all in all I, personally, would allow some leeway in terms of up-front expectations and I think they’ve put in a lot of work toward their goal … not saying of course that they are anywhere near it yet, but you have to start somewhere and labor isn’t a cost free input, let alone labor in a highly technical field …

Still you have to make your own interpretation of the risk - as risk is relative to the investor.


Hi NVO developers,
Who or any firm will audit and do quality control on the software you plan to develop?


Yes, will be contacting some developers from bitcoin core to audit the code, i think they are the best ones to do it, especially blockstream (gmaxwell, lukejr …) as they are related to most of these technologies. Plus the bitcoin core dev is a decentralized entity of all the developers who participated to the bitcoin development. And i totally trust them.