paint-brush
Why You Should Choose Blockchain Based on Programming Languagesby@mattracz
576 reads
576 reads

Why You Should Choose Blockchain Based on Programming Languages

by Mateusz RaczynskiAugust 26th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Each ecosystem comes with its own communities and incentives for builders and founders, as with a different value proposition. Some blockchains are better suitable for NFTs or smart contracts, but others are relatively easy to scale the team as your project grows. With less-popular blockchains, you compete with fewer companies if you apply for a grants program to finance your endeavor. Here’s a comparison to help you make an informed decision on the best blockchains to build on. Each has its pros and cons, but which one should you choose?

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Why You Should Choose Blockchain Based on Programming Languages
Mateusz Raczynski HackerNoon profile picture


When starting a new project in the crypto space, it’s worth considering a few different blockchains to build on. Each has its pros and cons, but which one should you choose? Here’s a short overview of some blockchains and the key features for the founders.


While blockchains are communicating with each other more and more, they are technically separate islands with different rules, consensus protocols, and blockchain programming languages. Each ecosystem comes with its own communities and incentives for builders and founders, as with a different value proposition.


Some are better suitable for NFTs or smart contracts. In others, it’s relatively easy to scale the team as your project grows. With less-popular blockchains, you compete with fewer companies if you apply for a grants program to finance your endeavor.


All that matters when you’re starting a new blockchain venture, but which blockchain will suit you the most. Here’s a comparison to help you make an informed decision.


Blockchains covered:

  • Ethereum
  • Polygon
  • Algorand
  • Solana
  • NEAR Protocol
  • Polkadot
  • Avalanche
  • Cardano
  • Cosmos
  • Flow


Most popular blockchains for application development

Source: Electric Capital


Ethereum

Programming language: Solidity

**Developer count:**4,000
Best for:DeFi, NFTs, Smart Contracts
Main advantages:Largest community & Decentralization, Easy to find a team
Main disadvantages: Solidity, High transaction fees, Scalability, Harder to find a reliable team


Bitcoin is the father of cryptocurrencies, but the mother of all decentralized applications is Ethereum, created in 2015. Today, Ethereum is still the most popular platform for smart contracts, DeFi, and most blockchain applications.


5 years in technology is a long time and Ethereum has stood the test of time well, but not in terms of scalability and transaction costs that make using ETH reasonable only with larger amounts. The founders are working with the community on improving the situation, although the deadline of the Merge, after which Ethereum will switch from Proof of Work to Proof of Stake consensus, keeps being rescheduled. Ethereum, however, is extremely popular among developers and has a large community and a large knowledge base. It is also highly decentralized which makes it more secure than many of the so-called “Ethereum killers.”


Ethereum is programmed with Solidity, a language created specifically to support EVM (Ethereum Virtual Machine). Solidity has been quite rightly criticized for its level of complexity during audits. It's not hard to learn, but due to Turing's completeness, it's harder to extract all the potential and even obvious errors and bugs.


Solidity will be quite familiar to current web developers, but due to the aforementioned issues, the development should be taken with extra care. Ideally, you’ll want top developers for a project that involves Ethereum smart contracts and that raises the budget–for the audits, too.


Polygon

Programming language:Solidity
Developer count:350
Best for:DeFi, NFTs, Micropayments, Smart Contracts
Main advantages:Ethereum L2, Low transaction fees, Low entry barrier for Solidity developers
Main disadvantages: Solidity


Polygon is much faster than Ethereum and has much cheaper transactions, but as a layer 2 for Ethereum, it benefits from its decentralization and belongs to the same community. Polygon already uses Proof of Stake and can therefore be used to create exactly the same applications as Ethereum, but we will use a more modern “back-end”.


Here’s an example of the most viable reason for using Polygon. On Ethereum, making 100 payments at $100 each would cost $1200 (100x$12 gas fee). This is 12% of the transaction alone, which only becomes less important when we move larger amounts. The same transaction can be made by transferring the amount to Polygon, performing all 100 operations with MATIC, and then converting back to ETH (if you have to). In that case, the Ethereum gas fees would only be around 2x$12 for bridging from and to Ethereum. The fees on MATIC are around $0.01 per transaction, so the difference is quite clear.


By leveraging Solidity, Polygon can be used by any of the 4,000 developers building on Ethereum, apart from the 350 that can be identified as working full-time on Polygon projects. Both chains use the same language and support EVM.


The drawback is in the added complexity of using layer 2. The users either have to manually bridge their assets to Polygon or buy Polygon-native tokens on a CEX – this is much less popular than standard ERC-20 listings. It is simpler if you want to build your project to support Polygon via a custody wallet.


Algorand

Programming language:TEAL, Python (PyTEAL)
Developer count:200
Best for:DeFi, NFTs, Online payments, Smart Contracts
Main advantages:Smart Contract Security, Scalability, Low Transaction Fees, Grants Program, Smaller competition, Easy team scaling with Python, Fast development
Main disadvantages: Smaller community, Missing parts of the ecosystem, Fewer developers


Algorand was created as a response to all mentioned Ethereum problems. It has a much higher throughput of ~1000 transactions per second (TPS) versus ~15 TPS on Ethereum; the operation costs are negligible, as they cost 0.001 ALGO, which is approximately $ 0.0004 in the current market (as of the time of writing). This makes it suitable for small, everyday payments as well as security-suits enterprise-grade solutions.


Algorand made its name through the unique architecture created by Silvio Micali from MIT. He’s one of the fathers of modern cryptography, who won the prestigious Turing Award. Algorand uses a variation of PoS called Pure Proof of Stake. The whole difference is that in PoS, when the number of validators is not large enough, the cost to take control of the network might be relatively small. An attacker could cooperate or bribe multiple validators to take over 51% of the network and verify double spends and malicious transactions.


Algorand is protected against such behavior through a randomly and secretly selected committee of validators that are chosen to produce blocks. This way all the validators participate in the network but only a limited number of them produce new blocks at a given time – and since they rotate and are hard to identify, the cost of performing such a 51% attack is extremely high.


Algorand also solved the Solidity problem by introducing the TEAL language, which supports Algorand Virtual Machine (AVM), an alternative to EVM. TEAL is not Turing-complete and is therefore easily auditable. The developer can easily read the code and understand its results.

TEAL is a low-level language similar to assembly language.


This makes the code executed on Algorand very fast, but the entry threshold for developers can be high. There’s also a PyTEAL library that allows interaction with AVM by using Python. We strongly advise coding on AVM with PyTEAL as it would be less prone to bugs, but the developers still have to understand TEAL for debugging purposes.


Solana

Programming language:RUST
Developer count:900
Best for:DeFi, NFTs, Payments, Smart Contracts
Main advantages:Speed, Scalability, Low Transaction Fees, Grants Program, Easy team scaling
Main disadvantages: Downtime during heavy load


Solana is still one of the hottest blockchains out there, attracting masses of companies and developers. Its success comes from world-class marketing and branding and technology, as Solana is currently the fastest blockchain out there, with a huge throughput. If Ethereum supports 15 TPS and Algorand 1,000 TPS, Solana can reach up to 50,000 TPS. Transactions are confirmed in just a few seconds.


Solana uses a unique version of Proof of Stake that is called Proof of History. PoH uses a time variable in blocks as proof that a certain amount of time has elapsed since proposing the previous block. Unlike other consensus models, PoH means that validators do not have to constantly communicate to establish a common course of time. Hence, Solana's speed is also due to the validators' ability to run smart contracts in parallel at the same time, because ultimately the time and operation order will be known.


According to the creators, the speed of Solana is limited only by the available hardware, so if, for example, even faster GPUs appear on the market, Solana will be even faster. Of course, no technology is perfect–Solana struggles with overloading and stops working under high loads such as when markets tumble. So far, this has only happened a few times, but the problem has not yet been resolved.


Solana also has a specific smart contracts framework that doesn’t use a Virtual Machine – the code is written on-chain in low-level language Rust. This means that every smart contract has to be written from scratch and requires more work. However, Rust as a language is highly popular, so finding a developer for this technology is not that hard. This means you can quite easily scale your team.


NEAR Protocol

Programming language:Rust
Developer count:400
**Best for:**DeFi, NFTs
Main advantages:Smart Contract Security, Scalability, Low Transaction Fees, Grants Program, Easy team scaling
Main disadvantages: Smaller community, Missing parts of the ecosystem


NEAR is another RUST-based blockchain, which is already the 6th largest force in terms of the number of developers working with this technology full-time.


Often chosen for similar reasons as Solana, Near boasts a large throughput thanks to the proprietary approach to sharding called Nightshade Sharding, i.e. splitting transaction verification between validators. In essence, this means that fragments of Near are processed in parallel, and the degree of this fragmentation is determined dynamically based on the network load and resource consumption.


Data consistency is ensured by the TPoS (Thresholded Proof of Stake) consensus model, which selects validators on the auction basis, and dynamically sets the minimum number of tokens that must be controlled by the validator to take part in confirming transactions.


Such architecture allows NEAR to theoretically reach up to 1 million TPS, but sharding adds a few complications, where cross-shard communication is the greatest. Therefore, 1 million TPS sounds good but is not entirely comparable to the throughput of blockchains that perform well without using this technique, such as Solana.


NEAR is highly efficient thanks to operating on two consensus protocols. The mentioned TPoS ensures composability between shards, and the second one – DoomSlug – is responsible for block production. Thanks to that architecture, the transactions are confirmed almost instantly, after just one round of communication between validators.


On Ethereum or other blockchains, several rounds are usually required which slows down the transaction verification process.


NEAR is EVM-compatible, so people with Solidity experience can quickly find their way here, but there’s also a native network for smart contracts called Aurora–and this is where Rust comes in handy.


Polkadot

Programming language:Rust, C++, Golang
Developer count:1,400
Best for:DeFi, NFTs, Interoperability, Smart Contracts
Main advantages:Smart Contract Security, Scalability, Low Transaction Fees, Grants Program, Easy team scaling with Rust, the Large community
Main disadvantages: Missing parts of the ecosystem


Polkadot was one of the first blockchains to identify as "layer 0". Just like the other blockchains mentioned are layer 1 or 2, Polkadot was created for communication between different blockchains–not only for token transfers but also for data itself.


The concept itself is quite complicated due to its unique structure. There are several elements here:

  • Relay Chain – the main network responsible for security, cross-chain consensus and compatibility with other blockchains. It supports about 1,500 TPS and confirms transactions in 60 seconds.
  • Parachains – separate blockchains built on Polkadot, with each having its own features and tokens
  • Parathreads ecosystem – blockchains that communicate with the base layer in a less-frequent manner. You’d use it to save resources, but there’s not a big difference between Parachains and Parathreads from the development standpoint.
  • Bridges – for allowing Parachains and Parathreads to communicate with Ethereum, Bitcoin, etc.


Polkadot uses an open-source tech stack called Substrate. It compiles into WebAssembly and thus can be handled by any language that is compatible with it, including Rust, C / C ++, C #, and TypeScript.


Perhaps developer accessibility is the reason why it’s the second-largest blockchain ecosystem out there, losing only to Ethereum.


Avalanche

Programming language:Golang, JavaScript, Solidity
Developer count:~280
**Best for:**DeFi, NFTs, Interoperability, Large-scale operations, Smart Contracts
Main advantages:Smart Contract Security, Scalability, Low Transaction Fees, Grants Program
Main disadvantages: Smaller community, Missing parts of the ecosystem


Avalanche was created to solve Ethereum’s scalability issues. This is another blockchain that uses sharding to increase throughput. Avalanche, however, solves the problem of network fragmentation caused by sharding through atomic broadcasts. Transactions are propagated immediately throughout the whole network, in all subnets.


There are three types of chains in Avalanche:

  • X-Chain (Exchange Chain) – used for token management and instant transfers. It uses a DAG-optimized consensus protocol called Avalanche.
  • C-Chain – for smart contracts. It has its own Snowman consensus, which works similar to the Avalanche, but in a linear process
  • P-Chain – for coordinating validators' work. It also uses the Snowman consensus protocol.


The aforementioned architecture is similar to Algorand, so tokens are transferred on a separate layer, ensuring the speed of transactions, and the code of smart contracts is executed on another layer.


The advantage of Avalanche is the speed and throughput of 6,500 TPS. Avalanche is EVM compatible, and Solidity works out of the box. You can also build on Avalanche with developers that know Go, and JavaScript (Typescript / Vue)–the last one especially if you’d want to integrate the wallet to your front end or use Avalanche API.


Cardano

Programming language:Haskell
Developer count:350
Best for:DeFi, NFTs
Main advantages:Smart Contract Security, Scalability, Low Transaction Fees, Grants Program
Main disadvantages: Smaller community, Missing parts of the ecosystem, Hard programming language


Cardano has a loyal following, despite some comments about slow development progress. However, it’s caused by a unique approach to the R&D process that resembles scientific methods. Many proposals undergo a peer-review process before being implemented. This means that all assumptions regarding algorithms must first be proven on paper and confirmed by other experts, and only then they are implemented by developers.


Cardano is another PoS blockchain that uses its own variation called Ouroboros. Their whole consensus protocol has been peer-reviewed and has mathematical guarantees of security–as long as 51% of ADA tokens (the native currency) are staked by honest network users.


The blocks are produced after a leader is randomly selected which in this case is a selected staking pool. Cardano has its own Daedalus wallet that supports transacting and staking.


Cardano tries to maximize security and scalability in an academic manner, so it is not surprising that the Haskell language is used here, which–being low-level–requires a specific skill set. According to research by Electric Capital, Cardano, with around 400 developers, ranks roughly in the same place as the NEAR Protocol in terms of popularity. This number has doubled over 2021.


Cosmos

Programming language:Golang, Rust, Ethermint (Solidity)
Developer count:950
Best for:DeFi, NFTs, Interoperability, Smart Contracts
Main advantages:Smart Contract Security, Scalability, Low Transaction Fees, Grants Program, Large community, Easy team scaling, Interoperability, Fast development
Main disadvantages: Missing parts of the ecosystem


Cosmos is the third most popular blockchain among developers, and also one of the more mature ecosystems. It dates back to 2014, and the first whitepaper was released in 2016. The first blockchain, Cosmos Hub, has been released in 2019. Cosmos uses Proof of Stake consensus and was one of the first to offer blockchain interoperability and support multiple blockchains in one ecosystem.


One of the core goals of Cosmos was its ease of use, which is probably why it is so popular with developers. It has a modular structure, so you can largely build on it using existing. This largely speeds up the development process.


Cosmos supports Golang as all its infrastructure has been built using it, as well as the Cosmos SDK that is used to launch new blockchains.


Cosmos SDK can also use CosmWASM (WebAssembly) modules which allow you to write in Rust and Ethermint, a copy of Solidity. Thanks to this, you can create applications using both Cosmos and Ethereum or other blockchains using WASM, such as Polkadot.


Flow

Programming language:Cadence
Developer count:160
Best for:NFTs, Games
Main advantages:Smart Contract Security, Scalability, Low Transaction Fees, Grants Program
Main disadvantages: Smaller community, Missing parts of the ecosystem


Flow is not as popular as all the previous ecosystems, but it changes rather dynamically–mainly due to its specialization. Flow is the blockchain for NFTs and decentralized gaming. It has been created by the creators of CryptoKitties–one of the first blockchain games built on Ethereum. At one point, it became so popular that it regularly congested Ethereum.


Probably this is why Flow creators have built a blockchain that is better at supporting gaming use cases. The PoS consensus ensures cheaper transactions and quick processing. The projects that have been so far built on Flow are impressive in terms of brands.


The most popular is NBA Top Shots, the official NBA collector's game that contributed heavily to the outbreak of the NFT trend in 2021. Other brands that have used Flow include UFC, MotoGP, NFL, and Samsung.


Technically, Flow uses the proprietary language of Cadence, which is a bit like Swift, Kotlin, and Rust, so if you or your developers have experience with any of them, you will have no problem getting started. Cadence focuses on security, good code readability, and ease of programming which contribute to a seamless development experience.


How to choose the best blockchain for your project?

In many cases, the clients that contact us regarding their projects have already one or few blockchains in mind. If you haven’t decided yet, you can look at the list above and pick the one that suits your idea the most. Among the factors, you should consider the potential for growth of the ecosystem and your team, as well as their own features such as ease of development, security, speed, etc.


Building on-chain is not always the case, too. Sometimes, applications can work perfectly fine in the cloud and use cryptocurrencies for settlements through APIs. For such purposes, the development is simpler and the app user experience is usually much better.

Source: Electric Capital


And if you care about market cycles, the mentioned Electric Capital has some optimistic news. At least so far, with each cycle, the number of developers active in the space grew, but it didn’t fall back when the markets made a U-turn.



Also published here.