Flow blockchain is a PoS-based fast, decentralized, and developer-friendly blockchain by NFT pioneer Dapper Labs that aims to provide high scalability to the next generation of Dapps without the use of complex scaling techniques like sharding.
The background of almost every third-generation public blockchain is connected with Ethereum as it gave birth to two amazing blockchain-powered markets: decentralized finance (DeFI) and non-fungible tokens (NFTs).
NFT is now a multi-billion market and has yet to reach its full potential. Dapper Labs was first the company to deploy blockchain technology for recreation through the world’s first NFT-based blockchain game CryptoKitties. CryptoKitties is a blockchain game on Ethereum that allows players to purchase, collect, breed, and sell virtual cats.
CryptoKitties was released on Nov 28, 2017, and became so popular within a week that Ethereum blockchain was griding to cope with the transactions. The network became so congested that the CrytptoKitties’ team had to increase Kitties’ birth fees to incentivize miners.
Dapper Labs was creating another NFT platform called NBA Top Shot. Frustrated with Ethereum, Dapper Labs set out to solve the scalability problems they encountered. The result of their efforts was Flow blockchain that employs a multi-node, multi-role architecture to offer the scalability required for the next generation of blockchain apps.
Let’s take a look at Flow.
What is Flow Blockchain?
Flow Documentation describes it as:
“Flow is a fast, decentralized, and developer-friendly blockchain, designed as the foundation for a new generation of games, apps, and the digital assets that power them. It is based on a unique, multi-role architecture, and designed to scale without sharding, allowing for massive improvements in speed and throughput while preserving a developer-friendly, ACID-compliant environment.”
Many scalable blockchains now exist in the industry that use sharding to improve the scalability of blockchains by fragmenting them into interconnected networks. However, Flow-developer believes that sharding increases the “complexity of the programming model by breaking ACID guarantees (Atomicity, Consistency, Isolation, and Durability), increasing the cost and time for application development.”
Flow is also a Byzantine-Fault-Tolerant (BFT) Proof-of-Stake (PoS) blockchain but uses a novel approach to its throughput. This blockchain does so by working on the principle of ‘separation of concerns. In other words, Flow separates consensus from computing.
In PoS blockchain networks, every full node in the network is required to examine and execute each proposed block to update their local copy of the blockchain’s state. Every node stores the entire state (account balances, smart contract code, etc.) and performs all of the work associated with processing every transaction in the chain. This means adding new nodes to the network will not provide any benefit in the network throughput as the “message complexity to finalize a block increases super-linearly with the number of consensus nodes.”
Let’s see how Flow increases throughput without sharding.
The Flow architecture addresses throughput limitations by fundamentally changing how the blockchain is formed. This is done by dividing the rule of validators nodes. Flow uses pipelining techniques used by modern CPUs.
Flow applies pipelining technique by separating the jobs of a validator node into four different roles: Collection, Consensus, Execution, and Verification. For each role, a minimum stake deposit is required from each of the participating nodes. All these nodes work in parallel to perform their required actions. Every validator node still participates in the validation of every transaction, but they do so only at one of the stages of validation.
According to the technical primer provided by the Flow website, “consensus nodes decide the presence and order of transactions on the blockchain.”
According to the three technical papers, this separation of node roles is based on objective (deterministic) tasks and subjective (non-deterministic) tasks. In Flow, the Consensus Nodes are tasked with all subjective tasks.
According to the technical paper “Flow: Separating Consensus and Compute– Block Formation and Execution –”:
“In Flow, the Consensus Nodes maintain the chain of blocks and are responsible for the chain extension by appending new blocks. They receive hash references to the guaranteed collections that were generated by the Collector Nodes. Furthermore, Consensus Nodes run a Byzantine Fault Tolerant (BFT) consensus algorithm to reach an agreement over the set of collections to be included in the next block.”
These nodes are also responsible for the sealing of blocks and maintaining a part of the state of the system related to the stakes of the nodes, receiving and adjudicating the slashing challenges, and slashing faulty nodes.
The following figure describes the workflow of the Flow network.
In simple words, “execution nodes perform the computation associated with each transaction.” These nodes perform the objective tasks.
Execution nodes execute the finalized blocks generated by the consensus nodes and publish the results as ‘execution receipt’. The results are then sent to verification nodes to check the execution result. The paper reads:
“For this purpose, Execution Nodes break the computations of a block into chunks. Each Execution Node publishes additional information about each chunk in its Execution Receipt for the block executed.”
As all nodes work in parallel, execution nodes take data directly from collector nodes while consensus nodes perform their action at the same time. Only malicious actions are reported back to consensus nodes.
Verification Nodes are responsible for collectively verifying the correctness of the execution nodes’ published results. Each verification node only checks a small fraction of chunks. In this way, all verification nodes of the network check all chunks of the executed blocks with an overwhelming probability.
These nodes publish a ‘Result Approval’ for all the chunks of an executed block which is then sent to consensus nodes for Block Sealing.
As the name suggests, collectors nodes collect transactions from applications running on the network. All collector nodes are staked equally for the sake of load balancing. At the start of each epoch, each collection node is randomly assigned to exactly one cluster. A cluster contains somewhere between 20 and 80 nodes. The paper describes the working of these nodes as:
“An external client submits their transaction to a Collector Node. Upon receiving a submitted, well-formed 3 transaction, a Collector Node introduces it to the rest of its cluster. The Collector Nodes of one cluster batch the received transactions into so-called collections. Only a hash reference to a collection is submitted to the Consensus Nodes for inclusion in a block.”
The following figure describes the simple working of all Flow nodes.
As flow is designed for the next generation of Dapps with a special focus on NFTs, Flow offers several development tools to provide a comfortable development environment. Core to is development infrastructure is a new programming language, Cadence. Cadence is a new Resource-oriented programming language for developing smart contracts on the Flow blockchain. The Flow team has a series of open-source tools to help developers get started.
Flow Playground is a hosted in-browser development environment where users can learn and try out Cadence smart contract language without any setup needed. The Playground is the fastest way to prototype Cadence projects and experiment with the language.
Flow Go SDK
The Flow GO SDK is a powerful full-featured set of tools for creating applications and services that leverage the Flow blockchain. it is the best tool for developers looking for backend integration with scalability in mind.
Visual Studio Code Extension
It is the extension of the VSCode Editor that integrates Cadence into Visual Studio Code.
Features of Flow
Upgradeable Smart Contracts
The important feature of Flow is that it features upgradeable smart contracts. In most smart contract blockchains, the contract code could never be changed after it is released. They become immutable and even the developer cannot change the state outside of their predefined scope, and more importantly, cannot change the code.
This is a problem as no one can write the perfect code without testing it in the real operation. Flow allows smart contracts to be deployed to the mainnet in a “beta state”, where the code can be incrementally updated by the original authors. Once the developer is confident about his code, he can “irrevocably release their control on the contract, and it becomes perfectly immutable for the rest of time.”
Smart User Accounts
Flow features many enhancements to the Ethereum account model. Smart user accounts on Flow blockchain provide optional, modular, smart contract functionality built into every Flow wallet.
Smart user accounts on flow support automated processes for more sophisticated authorization controls and secure account recovery processes. Furthermore, this feature also provides added “security through optional multiple signature support, with the ability to cycle out old keys regularly to avoid security leaks.”
Human Readable Transaction Format
According to the technical premier:
“The Flow transaction format makes very strong guarantees about what kinds of changes a transaction can and can not make. This makes it easy for the wallet to ensure users are making informed decisions about what they are approving.”
Flow Port is a gateway between users and the Flow ecosystem. The Flow team describes it as a “portal to the decentralized world of Flow.” By creating a Flow Port account, users can interact with the Flow blockchain, manage their assets, stake, delegate, and more.
Flow Token Standards
Flow allows developers to create and issue both fungible tokens (FTS) and non-fungible tokens (NFTs) by using Flow’s token standards that are equivalent to Ethereum’s ERC20 and ERC-721 token standards.
Flow (FLOW) Token
FLOW is the native token of the Flow protocol, meaning it is used for all protocol-level fee payments, rewards, and staking transactions. It uses the Flow Fungible Token (FT) standard. Flow’s native FLOW token was initially offered to the public in October 2020 through CoinList.
The most use of FLOW is staking. To become a node, users need to own and stake FLOW tokens, which also allows them to participate in the governance of the platform. Flow rewards these users with a combination of newly minted FLOW and a portion of the transaction fees. FLOW holders can also delegate their assets to a validator node to participate in the network on their behalf.
Developers can also incorporate FLOW in their dapps as the main currency used for payments, transactions, and earning rewards. Developers can also create their custom cryptocurrency on Flow if they want using Flow Fungible token (FT) standard.
Flow USD (FUSD) Stablecoin
Flow USD (FUSD) is a stablecoin issued by Prime Trust, a Nevada-based trust company, that is backed 1:1 by the US Dollar. It acts as an alternative for users who may not be holding the native FLOW token. According to the documentation:
“FUSD is a USD-backed stablecoin issued as a fungible token on the Flow network. Its primary purpose is to provide a more consistently-priced payment experience for Dapp developers and their users.”
NBA Top Shot on Flow
Flow is designed to support complex NFT applications and NBA Top Shot is currently the most anticipated NFT project on Flow, developed by the blockchain developer, Dapper Labs, itself.
Currently in open beta, NBA Top Shot is a non-fungible token (NFT) marketplace where fans can buy, sell and trade NBA moments, which are packaged highlight clips that operate like trading cards. According to DappRadar, in the last 30 days, 3.62 million transactions took place on the marketplace with a monthly trading volume of $40.88 million. Nearly 100K NFT sales were recorded on the platform in the last 30 days.
Technical Premier: https://www.onflow.org/primer#primer-intro
Technical Papers: https://www.onflow.org/technical-paper
Flow Port: https://port.onflow.org/
Flow Playground: https://www.onflow.org/play