CoZ first dApps competition dApp review

A few days ago, the first City of Zion dApps competition submission deadline was reached, and 17 valid projects were submitted. This post provides a brief overview of each project and the integrated components. The projects are presented in alphabetical order.

The developers of all 17 projects contributed input, feedback and quotes for this post (thanks a lot everyone!). The quotes next to the project descriptions are always direct quotes of the team.

I hope this post will be a useful resource for developers looking for inspiration and knowledge to build upon!


What’s a dApp?

“dApp is the abbreviated form of “decentralized application”, which means that the backend code runs on a decentralized peer-to-peer network. dApps typically also have frontend code and user interfaces (eg. website, mobile apps, etc.), written in any language, that can make calls to its backend.

Here is a list of components frequently integrated in decentralized applications:

  • Smart contract
  • Blockchain middleware: talks to both the blockchain and other services such as the website backend.
  • App backend: provides resources for the app frontend and interacts with the blockchain via the blockchain middleware. Sometimes the blockchain middleware is bundled with the app backend.
  • App frontend (eg. website, mobile app, etc.)

To integrate the various components, dApps often utilize message queues, publish-subscribe mechanisms, caches and various forms of databases.


NeoAuth (prev. BlockAuth)

NeoAuth (previously BlockAuth) allows users to login (authenticate) to apps and websites by invoking a NEO smart contract from a NEO address tied to the user’s account. It aims to be the Blockchain OpenID.
My aim from the start was to develop a blockchain based solution that any business could use. I thought that authentication and identification would have the widest impact, and so settled on the idea behind NeoAuth.
The NeoAuth smart contract was initially written in Go to test the logic flow. I then tried porting it to Java but found that the resources and community made it hard to progress. I then switched to Python and was incredible impressed by the amount of support from the community on Slack and the maturity of the project.
Looking to the future; if successful I am planning on building a NeoAuth team to expand the idea and enter the Microsoft DevCon competition in March 2018.

BlockSaver

Saving smart contract, with interests and fines. You can define how long to lock NEO and GAS assets, the smart contract defines an interest rate, and the system has a penalty for early withdrawal.

With the advantages of smart contracts, BlockSaver rewards faithful investors and punishes those eager on quick profit. That means that once deployed on the blockchain, you know how the smart contract will behave and who can access your funds in which manner. At any point you can trigger the smart contract and get back your money without waiting for some third party.
  • GitHub / Authors: mpetrunic, morrigan
  • Smart Contract: SmartSavingContract.cs (C#)
  • Web Backend: backend (Node.js). REST API for serving the frontend and communicating with the smart contract.
  • Desktop App: app (Node.js / Electron). Smart savings desktop application, cross-platform.
It was quite painful when we first started with Java and Linux, there were plenty of issues. C# on Windows was a lot more streamlined and gave a nicer experience. There was a lot of lost days in our efforts to invoke the contract via RPC (master and dev branch of neon-js was very different and wasn’t very documented).
 
There was a lot of activity on slack and people there were very responsive and helpful. Only drawback was slack itself and his lack of option to search channel cause we had a feeling that a lot of questions were repeating endlessly.

Chain Line

Peer-to-peer courier platform. Couriers transport items to fulfill demands and earn courier fees.

The project aims to solve problems of availability and price inconsistencies of products through creation of a global, trustless, peer-to-peer network of couriers coordinating with a smart contract.
This was my first crack at a dApp project and it was a fun challenge. A source of inspiration for the idea came from of this image posted on Ctrip’s WeChat feed at the time of the Apple keynote: https://d.pr/i/uAcW9w+. One of the project’s key innovations is its use of “reserved funds” meaning deposits never leave control of the user’s own private keys, yet are still managed in a limited sense by the contract. Therefore this contract is immune to the kind of attacks carried out on the DAO and Parity Wallet contracts. Hope you like the idea and implementation!

imusify

imusify is a free, blockchain based, incentified and decentralized platform for music related digital content such as audio, video, apps, images, and blogging where anyone can join, contribute and get paid $IMU.

Lucky NEO

Lucky NEO allows anyone to send their extra gas to a raffle contest. One winner will be chosen every two weeks and automatically paid out. Lucky NEO uses an admin account to automatically pay out the winner to the address that sent the funds; so you don’t have to follow the contest and claim the gas yourself.

NeoTrade

NeoTrade is a NEP5 trading platform.

Inspired by Etherdelta, NeoTrade is a NEO based smart contract that allows users to deposit NEO, GAS or any other NEP-5 asset directly to the smart contract and trade amongst themselves.

Neo Fund

Neo Fund is a decentralised crowdfunding platform, similar to Kickstarter. The basic function is to set a goal amount, and date limit. If the goal is reached the creator of the fund will be awarded the funds, and if not the contributors can redeem their funds again.

My idea and plan for Neo Fund was to provide a way for small projects to raise the capital and interest to be able to deploy a SC on NEO. The benefit of having this in a decentralised manner 100% guarantees where the funds will go beforehand, depending on the outcome, no middle man is required. The other alternative in crypto is to launch an ICO which is overkill for small projects.
While this is great for community based projects I want to implement incentives for donators to make it appealing for investors. Potentially a mini ICO where a small group has shares on profits only if the goal is reached.

Neo Raffle

A smart contract that enables a raffle/lottery on the Neo block chain. Send GAS, win GAS! This project also demonstrates a solid way to use random numbers in a smart contract [1] [2] [3].

For my first project in blockchain Smart Contracts, I wanted to start simple, but the project ended up being more complex than I realized. One of the most important things to me, was that players shouldn’t need to do anything other than send a regular transaction from any Neo wallet to play the game. When I first started working on this, it turns out, that was going to be impossible, as the VM couldn’t read the storage context during a verification portion (i.e. the payout) of the contract execution. Thankfully, this changed during the contest, and I was able to devise a way for raffle players to not need to invoke the contract themselves in order to play. Read the comments in the contract source for more on that!

Neo Smart IoT

Control IoT (Internet of Things) devices via Neo smart contracts (first device is an ESP8266).

We saw two primary benefits to smart contracts when we first learned about them — the first is being able to accept micropayments with low or no fees, and second, being able to programmatically define when and how events should take place in the real world in a deterministic and verifiable way. Neo Smart IoT incorporates both of these ideas, drawing on our experience with inexpensive IoT devices like the NodeMCU to make it easy to simply accept a payment to do a “thing”, with no middleman taking a cut of the profits.

NepSwap

Protocol and smart contract for trading NEP-5 based assets.

NepSwap is a protocol and smart contract for trading NEP-5 assets. This prototype idea is based on Etherdelta and Bancor. It doesn’t have a personal token or ICO, this project is intended for community, and non-profit. NepSwap is generic, so any asset at any time can be traded or kept as balance on the account.
The next version is expected to be able to:
* keep order-book for each pair
* trade an existing order / place new order
* keep personal account database with each asset
* queue pending withdrawals
* have a decent frontend / web interface (edited)

Krypton

KRYPTON is a Smart Contract and ecosystem to provide SIP registration on the NEO blockchain using a KRYPTON compatible SIP provider.

KRYPTON is a decentralized version of Skype, where your wallet is your identity. With KRYPTON you can register your identity (public address) on any available provider and communicate with other identities. Communication includes voice calling, direct messaging and directly sending money. Just like Skype you can also make outbound voice calls (PSTN) if you have some credit. The difference here is that you can use any provider and the credit will stay in your wallet, under your control. This makes switching provider easier than ever.

Phantasma

Phantasma is a platform where the users control their own content, instead of relying in third parties servers. The platform support any kind of transactions between users, eg: email, chat, files, money transfers. NEO was used for this project due to its fast transactions and C# support, combined with IPFS (a distributed file system) to store the actual messages, encrypted with the keys from the NEO wallets.
The beginning was very very difficult, the documentation for NEO was very incomplete, however I spent many hours reading the NEO source code and also folks around [the Slack] guided me in the right direction, and in the last week everything went smoothly and during this I even developed the NEO debugger to help me learn more about the whole which is now part of the city of zion github projects. So I can consider the whole process was a very interesting experience :)

Smart Promise

Smart Promise is an electronic journal of smart promises developed through Blockchain. User of such an environment receives a reward for each of his fulfilled promises. The concept of the idea contains the possibility to get a strong motivation to action that user pointed in promise.

The team is planning to extend this to a platform in which users can share their experiences by creating personal trainings and courses, and which allows users to interact with each other, thereby increasing personal motivation and responsibility.

Sunny dApp

This dApp allows you to insure against bad weather conditions on a given day. If the relative sunshine duration on that day is lower than 50 percent, you get paid.

The contract I created unlocks funds to a user on basis of input of an oracle. This can serve as an example for many use-cases in which a pay out depends on such input.

Switcheo

Switcheo is a decentralised exchange built on NEO’s blockchain. It supports trading of NEP-5 tokens and NEO system assets like GAS & NEO. It aims to be a truly decentralised exchange while still providing for a superb user experience.

YouTube Introduction / Website / GitHub / Authors: RavenXce, henrychua, jackyeu

We designed Switcheo with the idea of creating a true decentralised exchange — by keeping the application as on-chain and trustless as possible without unnecessary off-chain features, while having it still work like a traditional exchange. Our biggest challenge was to create features which mimic traditional centralised exchanges like order splitting, partial fills and refunds/cancellations as these features are essential to the User Experience of an exchange, ensuring the user pays a fair price for their tokens and minimising order slippages. Figuring out how the NEO blockchain worked as a pioneer with little examples to go on with was a fun and fulfilling experience!

TripShares

Trip sharing with deposits. Travellers commit to a shared seat by depositing $TRS NEP-5 tokens, which are used as insurance when the passenger cancels the trip after a set date.

This dApp is made for people which are confident in their travel plans. Drivers can make a higher deposit to be sure a trip will happen, passengers can search for higher deposit trips. So everyone will be happy in any case. With the smart contract as broker you don’t need a reliable middleman to hold deposit and solve disputes.

Turing Complete Smart Contract

A smart contract which interprets encoded classical Turing machines.

This was the second programming language (a year after the lambda calculus, 1935) that was shown to be what is today called computationally universal and that’s a feature now found in most popular languages. The idea is to upload code routines to the internal storage in a way that they can be executed from within. The demonstrated concept enables, for the chosen modules of the smart contract, a re-programming even after a contract has been deployed to the blockchain.

Several other great things which already came out of this dApp competition:

  • Massive distribution of knowledge on developing with the NEO blockchain. Plenty new people got in touch with it, and many people vastly increased and deepened their knowledge, understanding and experiences.
  • Building and development of the NEO community. A staggering amount of communication and sharing of knowledge has occurred, people helped each other 24/7, and many CoZ projects gained new members and contributors.
  • A huge amount of improvements around the developer tools and experience. The difference between developing a dApp on NEO two months ago and today is enormous.
  • Honorable mention: We now have NeoLink, a Chrome extension wallet to interact with smart contracts and dApps from the Browser. NeoLink is similar to how the MetaMask extension works in the Ethereum world.

Thanks a lot everyone. Looking forward to the next generation of projects and collaborations!


You can reach the author of this post via @metachris.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.