Blockchain Development

A Complete Guide for Innovators

Blockchain is changing the way we do business, and it’s just getting started. If you’re looking to learn about blockchain and how to incorporate it into your industry, you’re in the right place.

In 2016, tech and finance companies alone invested $1 billion in blockchain. Blockchain has rapidly progressed from an esoteric technology to the forefront of R&D for major financial institutions, governments, universities and multinational corporations.

This guide is designed for founders, entrepreneurs, product managers, innovators and developers looking to learn how blockchain development works, how to incorporate blockchain into their businesses and what’s needed to start a blockchain project right now.

Introducing the Blockchain

As techies and innovators at heart, we could go on for days about blockchain. Regardless, the technology produces some powerful benefits:

  • Decentralization by removing single points of failure
  • Trust through mass consensus
  • Transparency with public transactions
  • Security through immutability

What is “the blockchain”?

What is blockchain? Blockchain simply refers to a type of database — one that’s massive, decentralized, transparent and immutable. It’s called a blockchain because it’s actually a chain of timestamped digital records — aka “blocks” — that are cryptographically linked together.

That’s a mouthful, but what it really means is this: everything that goes into the blockchain stays there. Nothing can be retroactively changed, so nobody can tamper with the blockchain once it’s been created. Case in point, this makes a blockchain safe.

Innovation through Decentralization

Blockchain is powerfully more secure than traditional databases because it removes middlemen like banks, businesses and governments from the safety equation, replacing them with distributed nodes — computers in a blockchain network. Each node hosts its own copy of the blockchain database so it can participate in the blockchain peer-to-peer network.

Blockchain is the first technology combining peer-to-peer networks, public-key encryption and distributed consensus to reduce uncertainty, increase trust and validate data with extremely high certainty. Bonus: all this goodness extends to apps developed on the blockchain.

Look at Bitcoin (which is built on blockchain) for an example: every time there’s a transaction, the blockchain network asks multiple computers (nodes) to approve transactions based upon their local blockchain. In order for the transaction to be approved, 51% of nodes have to be in agreement. The process is beautifully democratic, determining what is true by consensus rather than a decision from one central authority.

Blockchain is Industry Agnostic

It’s understandable that many blockchain discussions feature Bitcoin, but it’s just the tip of the iceberg for blockchain applications. Nearly any form of digital information can be stored in a blockchain, and almost any digital asset can be exchanged with a blockchain-based smart contract.

Because of this, blockchain is a powerful disruptor across some of the world’s largest industries. Here are some of our favorite examples:

  • Identity: An identity blockchain could confirm identities through crowdsourced consensus. With encrypted “proof of existence” biometrically tied to your DNA instead of an easily-compromised identification number, identity theft may become a thing of the past.
  • Property: Instead of writing a contract in legal terms, imagine writing If-Then statements. This is the premise of a smart contract. Once the contract’s conditions are met, the blockchain automatically executes the autonomous “Smart Contract” for asset exchange. If you think this sounds a lot like Ethereum, you’re right. We’ll get to that in a moment.
  • Government: Decentralized government systems can increase transparency by distributing birth, marriage, death and criminal records throughout the blockchain, breaking them out of local silos. Smart contracts could automate formerly bureaucracy-laden processes in court systems. Blockchain security could even make online voting fast and secure.
  • Finance: Blockchain’s strong identity verification and decentralization could reduce financial fraud among stock exchanges and banks. Meanwhile, ICOs (initial coin offerings) are already changing how venture capital is raised. Startups are already shifting to a crowdfunded model while angel investors are bound to start buying ICOs instead of stocks.
  • Healthcare: Imagine a universal, common health record securely stored in the healthcare blockchain. By decentralizing records, there’s no need to transfer them between doctors.
  • Logistics and supply-chain management: Blockchain-based logistics could solve problems like fraud, counterfeiting, product safety and inventory management. For example, blockchain identity verification can ensure shipments aren’t stolen by fake drivers. Someday, blockchain supply chains may provide consumer purchase transparency, with perfect insight into the factory where your clothes were made, the person who made them and even whether the materials were ethically sourced.

While we love a good sci-fi book, every one of these examples are completely real, and many are happening as we speak. The Dubai airport is implementing a blockchain-passport system by 2020; numerous companies, including IBM, are applying blockchain to logistics ; and some hedge funds are already investing in tokens and ICOs .

That being said, blockchain isn’t only for governments and big businesses.

If you’re looking to build technology around trust, transparency, decentralization or automation for your next business, a blockchain application is the new way to do it.

Need help getting started? Talk to our partnerships team.
blockchain development nyc

Building Your First Blockchain App

Before We Jump Into It

  • If you’ve created an app, website or business, you’ve used a database. Remember: when we say “the blockchain”, we’re simply referring to a type of database — one that’s massive, decentralized, peer-to-peer and cryptographically secure.
  • Apps are constantly making implementation choices based on security, performance and programming language constraints. When you base your application on blockchain, it’s really just another implementation choice.
  • Developing an app on a blockchain will influence your programming language choice, app design and testing/debugging processes. In turn, you’ll receive transparency, security and automation (if you develop smart contracts).
  • Although the blockchain community has grown significantly in the last several years, there still aren’t that many blockchain apps or developers. There’s tons of room for innovation and no better time to jump in on the blockchain revolution than now.

Application development for a blockchain app begins the same way as any other app. What problem are you solving? Who are your users? Will it be open sourced? How will you differentiate yourself? Who’s your competition? Answers to these questions will guide your development process from the get-go.

It’s important to note: Blockchain projects often take more time to build than your average mobile application or front-end project. Consider the amount of time it’s actually going to take to build a blockchain app before you start writing code — especially if you’re building it yourself and even more so if it’s your first time.

Once you’ve answered these high-level questions, you can focus on implementation. Ready to get started?

Scoping a Blockchain App

In this section, you’ll see the term “DApp” — decentralized application — quite a bit. We’ll discuss DApps more in-depth later, but here’s what you need to know now: DApps are open-source, autonomous, cryptocurrency-based apps whose backend is a blockchain.

There are three major approaches to building blockchain apps:

  • Platform (Type I DApp)
  • Software (Type II DApp)
  • Specialized Software (Type III DApp)

If you’re a novice or this is your first time developing a blockchain application, we recommend the Platform or Software approach. Forking Bitcoin or Litecoin code is a great way to learn blockchain basics. Likewise, building a simple app on top of platforms like Ethereum is an excellent way to ramp-up early skills.

Remember: There’s no wrong choice here. The approach you choose ultimately depends on your project’s goals, scope and the problem your application solves.

“Platform” (Type I DApp)

This means: Building a new blockchain and token system, either from scratch or by forking existing blockchains. This approach is like creating your own operating system that other people will eventually build on.

Real world examples of DApp I projects include Bitcoin, Ethereum and Hyperledger Fabric, all of which are blockchain platforms other developers can build on.

  • Choose this approach if: You have a broad, systems-oriented vision and want other people to build apps and services on your platform.
  • Pros: You have creative direction over your new blockchain and the ability to differentiate yourself in the blockchain ecosystem. Building a new blockchain by forking Bitcoin, Litecoin or other existing is also one of the best ways to learn how blockchains work.
  • Cons: Building a blockchain from scratch is difficult: it requires understanding everything from cryptography to peer-to-peer network programming. Creating a successful new platform requires careful design, planning and community-building — all of which can take hundreds of hours on top of the blockchain development itself. This is why most new blockchains are Bitcoin or Litecoin forks with a few new enhancements.

“Software” (Type II DApp)

This means: Building an app that uses a pre-existing blockchain platform, i.e. Bitcoin, Ethereum, Hyperledger Fabric or similar. This approach is like creating an app that runs on a known operating system.

Real-world examples include Golem, a “decentralized supercomputer” which leverages users’ spare computing power to process practically anything, and the Twitter-inspired EtherTweet. These are like software because they’re built directly on top of a blockchain like Ethereum.

  • Choose this approach if: You’re addressing a specific problem with a targeted solution. Whether it’s an app or an API, you’re developing on top of a specific blockchain.
  • Pros: You’ll benefit from an established community while still getting to design a scoped solution. Less technical knowledge is typically needed for this than the “Platform” approach mentioned above since the blockchain platform natively handles cryptography and peer-to-peer networking.
  • Cons: Using an existing platform means inheriting that platform’s limitations and bugs.

“Specialized Software” (Type III Dapp)

This means: Building an app, plug-in or protocol that integrates with other blockchain apps or protocols, i.e. any of Bitcoin’s many existing open source projects.

Real-world examples include the cloud-storage solution StorJ, which is built on top of MaidSafe, which is built on top of the SAFE Network. This approach is similar to building specialized software because it’s not built directly on top of the blockchain; it’s built on a blockchain-based service.

  • Choose this approach if: You want to create a specialized solution on top of other community projects, but you don’t necessarily care about directly building on the blockchain or forking blockchain code.
  • Pros: You’ll get the blockchain’s benefits and the ability to leverage robust features of community projects outside your own.
  • Cons: As with the software approach, you’ll inherit the limitations and bugs of whatever community projects you work with.

Choosing the Best Blockchain for Your Project

From here on out, we’ll assume you’re building on an existing blockchain (Type II and III DApps).

If you’re just getting started, go straight for Ethereum — it’s purpose-built for blockchain software development and the easiest to start with.

If you’re still evaluating different options, check out the top blockchain platforms below to help you choose the right  blockchain for your project.

Ethereum

Use it if: You want to develop public, decentralized apps with smart contracts and don’t want to reinvent the blockchain yourself. 

Ethereum was specifically designed as a general programming platform, so there’s no surprise that it’s quickly become the platform of choice for decentralized app (“DApp”) developers. In fact, you can implement any application using Ethereum as your platform, including smart contracts which automatically enforce and execute agreements and asset exchange between parties.

Program it with: Solidity. It’s Ethereum’s flagship, Javascript-esque object-oriented language.

It’s well-maintained, easy to learn and has excellent Javascript API interoperability (especially key for web developers).

Programmers looking for more fine-tuned control may also consider giving LLL a whirl for some nitty gritty direct memory and storage access. LLL’s great for efficiently hand-tuning smart contracts and getting significantly smaller compiled binaries. However, new Ethereum developers usually won’t need to worry about these.

Hyperledger Fabric

Use it if: You want to develop business-ready blockchain apps using smart contracts on a private, permissioned blockchain.

Hyperledger Fabric is a B2B open-source project developed as a collaboration between IBM and the Linux Foundation. Beyond privacy and permissions support, participants can even create “channels” where ledgers are only visible within that channel.

Program it with: Go chaincode or Java (support for Java is still in beta).

Bitcoin

Use it if: You want to develop Bitcoin-based currency applications or API.

Bitcoin is best if you’re committed to working with Bitcoin and want to build a transactional app of some kind. For example, your app could send Bitcoins like BitPesa, the Kenyan money-sending app; it could be a web-hosted wallet like Coinbase; or it could even be a third-party API to improve Bitcoin for an entire community.

Program it with: C#/NBitcoin. It’s user-friendly, object-oriented and widely supported.

If you’re using Python, Ruby or Node.js , Coinbase provides a robust API which lets apps send, receive, buy, sell and store Bitcoin.

If you’re interested in developing on Bitcoin , we also recommend looking at Bitcoin forks like Bitcoin Cash and Litecoin. Both modify the base Bitcoin code and address specific issues like transaction sizes and speeds.

IOTA

Use it if: You want support for microtransactions and quantum-safe technology (IOTA’s encryption won’t be cracked by quantum computers in the future).

IOTA has quickly gained momentum since its 2016 white paper. It’s now being called the future of blockchain for Internet of Things. Ironically, there’s actually no blockchain. Instead, IOTA uses a “tangle”.

IOTA is definitely worth checking out, even if you’re just curious about exploring a technology that’s even newer than Bitcoin or Ethereum.
blockchain development - chain

DApps, Security and Bugs

Even after several years of community investment and development, blockchain is fairly new. It can take some time to ramp up and wrap your head around it, although you’re bound to see the similarities to other forms of app development after just a bit of time.

Making a Decision About DApps

Develop on Ethereum and you’ll quickly discover that DApps are the next big thing. Some people are using DApp shorthand to describe any application built on a blockchain, but it’s not widely agreed upon as there are some specific suggestions for what makes a DApp a DApp . Take a look before you start loosely throwing the term around.

DApps have huge benefits because they can function like autonomous startups. At launch time, they often self-fund with an initial coin offering or ICO (they can also establish themselves through token-mining or incentivize community developers through token “bounties”).

ICOs are like a cross between a startup IPO and project crowdfunding. This initial token auction allows them to fund their project with Bitcoins, Ethereum or fiat currencies. If crowdfunding your project with cryptocurrency sounds fun, a DApp is what you’re looking for.

We cover startups, ICOs and the future of funding in Volume #29 of the Short Stack Want to be part of our weekly newsletter? Sign up here

Is Blockchain Really Secure?

One of the main reasons blockchain appeals to so many people is due to its decentralization, trust through mass consensus, transparency and security through immutability. That being said, blockchain-based systems are not perfect. It’s almost guaranteed that systems with as much value as Bitcoin and Ethereum ($62 billion and $26 billion), will be targeted by thieves.

There are a few ways you can beef up your security from the start for your blockchain application:

  1. Systems are only as good as their underlying technology. A recent security audit revealed serious concerns about Serpent, Ethereum’s original Python-like programming language. Now Ethereum developers are being encouraged to use Solidity. However, hackers stole $50 million of ether due to a Solidity security flaw in 2016 and many are asking for a Solidity security audit.
  2. Writing secure code is a critical part of development security. Even if Solidity was bulletproof, Ethereum developers must understand how to write secure smart contracts in order for them to act as such.
  3. Even “foolproof” systems have loopholes. Bitcoin and blockchain have mostly solved the issue of double spending. But, if a merchant doesn’t wait for Bitcoin transaction confirmation, a fraudster could double spend Bitcoins. It’s rarely worthwhile, but still possible. This is why it’s important for Bitcoin merchant apps to follow transaction protocol recommendations.
  4. Single points of failure can re-introduce flaws. Poor app design can add hacker-exploitable flaws, even in decentralized systems. For example, web-hosted cryptocurrency wallets often require a username and password. Accounts can still be compromised by hacking or social engineering — this is a vulnerable, single point of failure, even with SSL and two-factor authentication.

That being said — blockchains are still secure. The blockchain addresses many fundamental security issues: single middleman vulnerability, data theft and loss, denial-of-service attacks and more. Blockchains are highly encrypted, and their communities are constantly monitoring and improving security. For example, during the major Ethereum coin-theft, the community voted to hard fork the blockchain and reverse the transaction.

Ultimately, any programming language and platform comes with some risks, blockchain or not. We believe that blockchain’s promise and the current level of capital investment are huge incentives for the community to keep making improvements.

How to Squash Blockchain Bugs

Blockchain’s biggest development challenge is arguably debugging, thanks to its perfect storm of decentralization and immutability. To tackle some of those pesky bugs, we recommend:

    1. Using a testnet. This is a private blockchain which runs on your host computer. The goal of a testnet is to debug your blockchain app code without spending real cryptocurrency.
    2. Stepping through your blocks. Stepping through code to debug is always a good idea. It’s especially advisable when you’re debugging a smart contract or other blockchain and trying to visualize how the data is propagating throughout the data structure and network. If you’re using Ethereum, the web-based Remix IDE debugger lets you paste in smart contract code and go through it block by block.
    3. Remembering that immutability is great, until it isn’t. Unchangeable data is one of blockchain’s selling points. But if you deploy a blockchain with a buggy smart contract and actually write that block, that bug is there forever unless you hard fork. Pro tip: just use a testnet. Source

How to Find Blockchain Developers

Great blockchain devs are out there, but they’re not the easiest to find. During your search, remember that familiarity with Solidity, NBitcoin or Go chaincode is necessary, but not alone sufficient. Any dev you hire needs to nail writing secure smart contracts and testing decentralized code. We’ve created smart contracts, need advice? We can help.

We like the nontraditional approaches of recruiting from online cryptocurrency communities like Blockgeeks , Bitcointalk , Coinality , Slack , Gitter and Reddit ; cryptocurrency meetups and conferences ; and occasionally through freelancing sites like Upwork .

There are a limited number of development firms specializing in blockchain development companies, but they’re out there.

Here at Jakt, we work with technologies of all types — including blockchain — to help people and businesses solve problems with innovative solutions. If you have a question about your blockchain app, we’d love to chat.

Looking Forward to the Future of Blockchain

3.2 billion people use the internet. It’s a fundamental part of our daily lives, yet very few people understand it. It’s only a matter of time before the same becomes true about blockchain. Blockchain will soon underpin an incredible number of systems and industries, even if most people don’t actually know how it works.

Blockchain is booming and it’s here to stay. What will you build with it?


Jakt is a product and innovation studio based in NYC. If you’re looking to build an application that includes blockchain, get in touchwe’d love to learn more about your project.

 


4 Comments

Cancel
Incubasys blockchain
·   Mar 26, 2018 at04:03 am / Reply

Thanks for an awesome blockchain development guide. As a team member of a blockchain development company I have a thirst of knowledge for blockchain.

Anthony Tumbiolo
·   Mar 28, 2018 at07:03 am / Reply

Thanks, glad you found this useful!

Bakshish Singh
·   Mar 27, 2018 at06:03 am / Reply

I really want to know about creating type I DApp. Please guide me how I can start and what all is required to create one

Torah
·   Jun 25, 2018 at04:06 pm / Reply

Thank you so much for the helpful guide. I appreciate the information and advice you have provided. I enjoy reading this information, really explained everything in detail about blockchain. I would like to share additional information according to this theme. Find out more here: https://mlsdev.com/blockchain