NEP5 Trading Platform
NeoTrade is an a smart contract based trading platform for NEO, GAS and NEP5 tokens inspired by EtherDelta.
Features
Browser based contract interaction
NeoTrade implemented, using neon-js, basic wallet management features. This allows the user to safely load their WIF, which is encrypted and stored locally in their browser, to perform, via contract invocation, actions such as: Minting Tokens (purchasing tokens from a NEP5 enabled contract), creating buy/sell orders and transferring assets.
Python transfer listener
Due to the way that contract addresses are created (they are unique based on the public key of the user) the dApp is unable to allow users to perform a withdrawal directly from a NEO contract address. This necessitated the creation of a transfer listener which monitored Refund/Transfer notification events, generated by the smart contract, to perform actions such as withdraw from the contract. This is a major problem when attempting to create a DEX as you are still required to trust a third party to approve the withdraw.
Developer Q&A
Can you outline the basic functionality of NeoTrade?
Users can, via a web interface, transfer NEO, GAS or NEP5 tokens to a NeoTrade account. Once funds are credited they can trade using any NEO based currency pair. After trading they are able to withdraw their assets back to their wallet/address.
What are your plans for ongoing development?
I have decided not to proceed with development of NeoTrade. During development both NEX and Aphelion made announcements of their intention to create a smart contract based, distributed exchange. I am now involved in a new NEO based project, Moonlight, which was recently announced at the Cambridge meet.
Looking at the NEX and Aphelion projects, how does their approach compare to the direction you would have taken with NeoTrade?
The key difference between NeoTrade and the other recently announced DEX platforms is that NeoTrade required the end user to trust me (the smart contract owner) to be honest with their assets which is not a position I want to be in. Since the contest has finished some of the NEX team, who are also key CoZ members, have proposed NEP5.1 which addresses some of the issues I faced in creating a trust-less NEP5 trading solution.
How many development hours do you think you spent building NeoTrade, and what was the most challenging feature?
I worked on NeoTrade on and off for about a month while also working in my full-time role. The NEO development ecosystem has changed dramatically over the last few months. For example I made extensive use of the neon-js library for the front end wallet features of NeoTrade and used neo-python for the smart contract event listeners. Both of these projects have had major rewrites/refactoring since I stopped working on NeoTrade and both teams have done a fantastic job. The most challenging aspect was the lack of clear documentation in many parts of NEO - something I am happy to say is rapidly being rectified by City of Zion contributors.
.
What language did you use for development?
C# for the smart contract. Javascript for the web interface and Python for some of the middleware.
What SDKs, APIs or frameworks did you use to develop NeoTrade?
C# - the official NEO smart contract framework.
Neon-js - I used the Neon Javascript library to implement the browser based wallet tools (importing a WIF, signing a transaction, contract invocations)
Neo-Python - I used the neo-python toolset to allow the transfer of funds (withdrawals and NEP5 transfers). NEP5 is now changing to allow trustless management of tokens which would allow NEP5 assets to be transferred without requiring middleware.
How would you describe your experience developing on the NEO platform?
Developing contracts on NEO has changed dramatically over the last 6 months. Initially there was little documentation and it fell upon the developer to figure out how things worked. There has been a massive effort undertaken by the community, mainly driven by City of Zion, to address this. Developers now have a wealth of knowledge available to kick start their NEO journey and there are some exciting projects in the works that should make 2018 an interesting year.
Based on your experiences developing for the first dApp competition, what advice would you give to developers thinking about getting involved in the second round?
I have two pieces of advice to second round entrants:
1) Take advantage of the resources the community has spent a great deal of time developing (Google “awesome-neo”).
2) Jump on Discord and don’t be afraid to ask questions.
“Personally for me NeoTrade was an entry that stood out because of the Smart Contract structure and the comments inside it explaining the functionality in a clear way. It also provided a nice UI with NEP5 token integration from the get-go and displays where NEO is going in the future.”
totalvamp
City of Zion Council
Join the NEO Stack Exchange
The NEO Blockchain Stack Exchange site was proposed in order to give developers a place to ask questions, get answers, and discuss the NEO blockchain with each other. We're about halfway to getting the site to Beta status, and every commit to the proposal helps.
Commit to the proposal here!