Building A Blockchain Application In 10 Hours

October 02, 2018

Building A Blockchain Application In 10 Hours

We thought we’d put Corda’s “3 developers, 3 companies, 3 days” mantra to the test and put 24 Java developers in a room with the R3 DevRel team and a load of pizza. Here’s what they came up with…

TLDR: skip to end for a run down the 5 CorDapps created by 5 teams of Corda DLT newbies in 10 hours

The world of blockchain and Distributed Ledger Technology is a world of non-standard technologies; “Solidity”, “Chaincode”, Byzantine Generals lurking behind every corner and a SHA256 sausage machine for every Bitcoin… it’s kind of no mystery why so many programmers have spent far more time reading about it than they have on coding anything.

Even Corda, the enterprise blockchain platform that’s written in Java (or its cousin Kotlin), and whose creators’ mantra is that a Corda app (or CorDapp) can be built by “3 developers, 3 companies, 3 days”, has a relatively low level of penetration in terms of the total Java population.

The reason why of course, is everyone’s busy.

Which was one of the reasons why we set up the Corda Code Club. We think if you can compartmentalise your learning into a Monday night activity which is something you just “do” every week, we can lower the barrier to entry. At the Corda Code Club you can learn a new skill, build your own CorDapp alongside fellow beginners, and benefit from expert Corda tuition.

We thought we’d put the “3 devs 3 days” concept to the test, and worked with the R3 Developer Relations team to set up an introductory course-come-hackathon where a group of developers with little or no Corda experience would have 10 hours over 6 weeks to learn the platform and build their own CorDapps.

On the first night after an initial introductory talk to the platform, the group then divided up into teams (via the type of pizza they happened to pick a slice of ?) and then sat down together to decide what use-case to design their CorDapp around.

The next 5 weeks were all about coding. Each team had its own mentor assigned to them who was on hand to teach the team how Corda works in practice and guide them on what can be done with the platform.

Richard Crook presents the prize for Best Corda Idea

On the final night we invited Richard Crook (then Head of Emerging Technology at RBS, now CTO of Chorum), Barry Childe (Head of Blockchain and Cryptocurrency at HSBC) and Richard Brown (CTO of R3) in to judge the final presentations. And for the prizes, we made sure to chose something suitable, that reflected the prestige of winning a hackathon and would be rare enough to be something that you can’t just pick up anywhere. Nothing less than a Computer Programmer Limited Edition “Lego Minifig” would do:

Lego, for when only the best is good enough

It’s fair to say we learnt a lot of lessons from that first hackathon, although I do think the results speak for themselves. We had 27 participants, 24 of whom turned up to every night and by the end of the hackathon there were 19 developers who’d gone from next to no Corda experience to having built their own working CorDapp. And we had a lot of fun in the process.

We had 27 participants…and by the end of the hackathon there were 19 developers who’d gone from next to no Corda experience to having bui
lt their own working CorDapp. And we had a lot of fun in the process.

I think the most valuable lesson we learnt is how important the mentors are.

No matter how technically able a team is, without a mentor present every night, its easy for the team to lose their way.

In the first few weeks the mentors act as teachers and guides to the platform, explaining what can be done and how to achieve, then once they get going their role changes into something closer to a delivery manager, ensuring the guys stay on track and being there to advise when they hit sticky problems they just can’t solve. We also didn’t anticipate that some of the mentors, due to how comparatively easy they find it to solve problems in Corda, would “go above and beyond the call of duty” and take on large chunks of the actual coding.

The other big lesson we learnt was not to the change the venue one of the evenings… actually it was more of a lesson about properly announcing and publishing the venue locations. Which really is “event management 101”, so pretty unforgivable really. It kind of didn’t help that the one evening that we changed the venue turned out to the be hottest day of the year, so the 3 or 4 guys who didn’t get the message either ended up walking across town at the height of the day’s humidity, or just didn’t make it after arriving at the wrong venue and couldn’t bear the thought of getting back on the underground. That was an important lesson.

These were ideas that the teams turned into working CorDapps:

1) Private Health Insurance Management App

Best CorDapp prize went to Team Marge

Team Marge built the winning entry, a private health insurance CorDapp that had 1 node for the hospital, a node each for 2 insurers and 1 node for the bank (for patients account). The hospital doing the treatment would request a quote from the insurers, each insurer responds with their quote, the hospital selects the best quote and then they sign the transaction, then the hospital carries out the treatment and sends the insurer the bill, the insurer pays and the patient pays the rest. As each transaction occurs, only nodes that need to know are informed what has happened.

This CorDapp used Corda’s “frictionless commerce” and the Cordite tool to ensure the financial balances of each account are updated immediately, as well as the selective privacy you get with Corda’s node permissioning.

Here’s a link to the Source Code: https://github.com/corda-codeclub/marge

2) A Decentralised Credit Scoring App

Team Peppa’s CorDapp provided a credit scoring service where the user would invite the retail banks they bank with to share their transactional data via a Corda network, from which a credit report would be produced.

This CorDapp made full use of way Corda creates networks of “known identities” and the core distributed ledger element of the network to remove the need to create a new 3rd party to store the users data for the specific task of producing a Credit Report.

Here’s a link to the Source Code: https://github.com/rafaelazeredo/creditbank

3) Sustainable Fishing Rights

Best Corda Idea prize went to Team Olive.

Team Olive Oyl built a CorDapp that created a system for managing the issuance of fishing rights in the form of digital assets and then allow them to be resold by owners in a way that would automatically inform the regulator. It had 5 nodes, a notary node, a node for the regulatory body issuing the Digital Fishing Rights certificates, a node each for 2 fishermen and a node for the purchaser of the caught.

This CorDapp utilised the “selective privacy” element of a Corda network allowing the regulator to have complete oversight on who has which quotas without revealing which fisherman has which fishing licences to the whole market.

Here’s a link to the Source Code: https://github.com/joeldudleyr3/olive-oyl

4) A Secondary Market for Property Conveyancing

Team “Sloppy Joes” built a CorDapp that would allow people to buy and then resell a property survey they’d paid for. Their app had the first property buyer node requesting a property survey from a conveyancer node, which would then issue an encrypted “digital asset survey” in return and simultaneously send the key to an Oracle. Once the conveyancer confirmed they had received payment from the property buyer, the Oracle would release the key to the property buyer node. This process could then be repeated when the property buyer wanted to resell the survey.

Amazingly this CorDapp utilised pretty much every key element of the Corda framework, from Smart contracts to manage the release of encrypted keys, to made-for-purpose-Oracles to act as 3rd parties, to regulating what each node had access to in the ledger via node permissioning and the Doorman — they got a special mention by the judges for this alone!!

5) Commercial Property Investment

Team Vegan’s Commercial Property Investment Management CorDapp created a network of nodes representing the Land Registry, Property Owners, Property Fund Managers and Property Investors. The shared ledger would allow each of the parties to manage information and have access to a real time picture of what properties they owned and what their status was.

This CorDapp made full use of the asset portability that Corda provides through “Object Serialization”. Each house / property has a unique serial number and because Corda provides a set of Standards for Object Serialization it means that two independently created Property Investment networks could transfer assets between each other without having to rewrite any of the entities in their property databases.

Based in London and want to take on the challenge? The next 6 week Corda Code Club “Monday night hackathon” begins on Monday 8th October and is run in partnership with the Construction Blockchain Consortium on location at UCL. Sign up here.

If you enjoyed this article by Martin Jee, then you check out his other articles about Corda on Medium, contact him at [email protected] for his CorDapp Developer recruitment services or if you’re a programmer in London and you want to improve your CorDapp development skills you can join the weekly Corda Code Club he runs.

Share: