Blog > English

Development Progress Report: DApp & Smart Contracts

We are currently very busy with creating an initial pre-release version of the FintechFans Decentralized Marketplace. There have been a couple of Smart-Contract-focused proof-of-concepts in the past, to validate that our ideas worked; but now we are actually creating the first version of a full-fledged DApp-wrapped Smart Contract system.

Because we know this stuff is interesting to many of you, let me walk you through some of our current ideas. Some of these ideas are already set in stone and are described up to some level of detail in our whitepaper. However, a couple of design decisions are currently being made. This is a process that is currently in active flux, so bear in mind that many of these might be altered or adapted in later versions of the software.

High-level overview

The Smart Contract system, as explained previously, is split into multiple parts. For the functioning of the Decentralized Marketplace, only two parts are important:

  1. The FintechCoin Contract, which handles the transfer of FINC between accounts. (This is already live! See Etherscan)
  2. The Decentralized Marketplace Contract, which stores all accounts and listings that people want to post on the marketplace.

The Decentralized Marketplace-contract calls into the FintechCoin Contract by using the ERC20 Allowance mechanism: Some of the calls (like creating a new listing) require a little bit of FINC to be spent. (Part of this will instantly be ‘burned’, another part of this will be locked in place and will be returned as a reward to the interacting parties once the Listing’s procedure has been completed successfully.)

Because of this allowance-mechanism, it is very transparent to the users what the marketplace is and isn’t able to do: they are always in full control of their FINC balance.

The Decentralized Application

In front of these two Smart Contracts, a Decentralized Application is in the works. This will interface with the contracts using your Ethereum Wallet. A way to make it easy to get started for people who are completely new to Ethereum is also in the works, although that will probably wait until a slighlty later version of the software. (More details about that project will definitely also make your way once they are ready to be revealed.) For now, this means interacting with the Web3-javascript-library that lives in your browser, or connecting to a local or remote Ethereum-RPC-client.

We have been investigating a couple of different front-end frameworks and -languages. After investigating the use of React for creating this application in thorough detail, we’ve decided for now to use the Elm programming language, because it:

  • Comes ‘batteries included’ (If you want to create a structured application with React, you end up having to use and learn Redux, Ramda, Flowtyped, Webpack and a whole slew of other libraries as well.)
  • Is very good at creating referentially transparent systems: Readability, Refactoring, Maintainability and (which we consider of great importance!) Auditability become a whole lot easier.
  • Is strongly (ML-style) typed, which will help to reduce the amount of run-time problems that would otherwise need to be tested for. Stability of a DApp is important, because it is difficult to re-deply a DApp (Not impossible like it is with a Smart Contract, but it definitely is not very pleasant).

On a side note: It is slightly too early to show you screenshots; keep checking this blog for future posts, and they’ll get to you!

We are currently researching the best way(s) to deploy our DApp: We will, besides hosting it on our own webservers to be reachable for people who are new to Ethereum, try out hosting on Swarm as well as IPFS. Research on how to best use Parity’s DApp Registry is also ongoing.

And of course: Downloading the (source code of the) DApp and running it locally is also a possibility.

Reputation

One of the major challenges in creating this system, is to create a good Reputation-system. This is what we’ve spent the last couple of months on, and our endeavour in this space isn’t completely finished yet. When two parties are attempting to collaborate in the real world, there are many potential outcomes. It is paramount that all of these can properly be modeled in the Smart-Contract system, including what happens when there is a disagreement between the two parties (Or even a disagreement about whether the parties actually agreed to collaborate!). We also have to consider what happens when one of the parties decides not to respond on the platform any more.

Currently, we are experimenting with a system where a party can decide between agreeing that there is a collaboration and disagreeing (where not doing anything in a given time counts as disagreement as well). Disagreeing means that you lose your chance to regain the reward-stake that was put when the listing was created, but it is a statistic that might influence the rating people receive on the platform.

As for how ratings are calculated: The Decentralized Marketplace first and foremost is open about its calculations, so anyone is able to create their own rating-based system on top of the review-system and agreement/disagreement about collaboration-systems that will be put in place. We will have a simple ‘default’ system which will just be an average of your reviews, but are also considering a more involved system where reviews you obtain are ranked proportionally by the score that the reviewers themselves have. This is similar to the PageRank-based system that search engines use to score websites, as well as the NCDawareRank that is used in the NEM Blockchain to disambugate between honest and dishonest nodes.

Wrapping Up

So, there you go. If you’ve made it this far, you’ve read through a whole stream of consciousness of our team. It is very exciting to be working on this project, and we’ll do our best to keep you updated in the weeks to come.

Thanks!

~Wiebe-Marten, Chief Technical Officer