Polkadot 2021 Roundup
By: Gavin Wood
Tags: version 9110

Polkadot 2021 Roundup

The holiday season is coming around again and with the new year, let’s take a quick retrospective about what the Polkadot project achieved over 2021.

By now it seems rather a tradition to begin with a look at the amount of code across the technology at the heart of Polkadot. The development within the Polkadot ecosystem is rocketing and the core of Polkadot is certainly not underperforming. The Substrate repository which powers both the Relay chains of Polkadot and Kusama as well as every parachain in the ecosystem sits just a shave from half a million lines of code. Adding on the size of the Polkadot, Cumulus and Smoldot codebases brings us up to a little over 750k lines. But increasingly work is landing outside of these main three repositories.

There are now a wealth of tools which help working with Substrate-based chains, including for working with transactions, looking into the chain’s history, inspecting what’s going on or helping test the chain. Adding together all of these gives us a massive 300k lines, taking the total well above a million lines.

Lines of code contributed to the Polkadot codebase over time. The big green area shows the huge amount of logic written over the year primarily to ensure that Polkadot’s shards, with which it scales, are both secure and decentralized, a difficult combination to make work.

But still there’s more: in the sphere of smart-contracts, including the Ink contract language and tools, as well as the Substrate EVM (Ethereum)-compatibility platform Frontier, there are around another 200k lines. And Polkadot-JS, the javascript-based API, UI and partial implementation brings in another 600k or so lines. Even at its core it’s likely that Polkadot is topping two million lines of code spread across implementations, tools, user-interfaces and key features, which perhaps should not be so surprising given the overall ambition of the project, but still a staggering amount of coding done since last year when I estimated it at around 600 thousand.

These days, almost ten thousand developers sit in the Substate and Parachain Technical channels on Element, up from 2,600 people twelve short months ago. And over 300 (three hundred!) individual contributors have made changes to the Substrate codebase in over six thousand separate improvements. It has attracted over six thousand stars from across the developer community and has been forked around two thousand times, both doubling over the year.

In terms of staking on Polkadot, the numbers have also increased rather a lot. Last year we had around six thousand individual accounts on Polkadot place nominations, helping economically secure the Polkadot network. This year, alongside improvements to Substrate’s staking logic, over twenty thousand accounts on Polkadot elect a total of 297 validators to maintain the network securely.

At the time of writing, the Polkadot treasury has handed out almost 200,000 DOT and the Kusama treasury around 70,000 KSM to teams and individuals in over one thousand separate funding proposals. The Polkadot treasury sits at over 22 million DOT and Kusama’s at around half a million KSM. For more information you can check the great doTreasury site (which is rather fittingly supported by the treasuries).

At the end of this year, we see 31 Substrate-based mainnets now live. The various parachains on Polkadot and Kusama have almost 3 million user accounts created and are being run by 6,000 validators. 540 forkless upgrades have now been administered, most of which through decentralised governance processes.

Our ecosystem also continues to grow rapidly from an investment perspective— we estimate that it comprises around 350 teams now (that’s about an extra 250 on last year’s estimate). During 2021 alone, about fifty of them together raised over $670m in early-stage funding (seed rounds and series A).

🚀 Launches

2020 was such a pivotal year for Polkadot with the release of its mainnet that it was always going to be difficult for 2021 to put up much of a challenge. However, I think it’s fair to say that 2021 did not disappoint: We had an incredible year seeing the rollout of Parachains, Slot Auctions and Crowdloans across not just one but two Relay-chain networks: Kusama coming live early in the year and Polkadot following up in December.

Before Polkadot and Kusama could host parachains, special logic needed to be designed and written to ensure that each and every parachain ran with equivalent security guarantees to the Relay chain. Squaring up this security with sufficient decentralization while still being scalable is a task not to be underestimated. Having completed Polkadot’s sharding logic, it needed to be rolled out to the live chain before any parachains could be launched. Let’s be clear here: we were attempting to transition a mono-chain into a sharded “multi-chain”. Not only this, but a so-called heterogeneous multi-chain, one in which the shards are each specialized for doing a particular job very efficiently. And not only this, but it had to be done on a live network holding a total value that would rival the majority of companies on the Fortune 500.

If the awesome power of a WebAssembly metaprotocol was ever called into question, then this episode would surely be a crushing repost. Substrate’s governance and live upgrade system made the near-impossible seem so mundane, that it was barely distinguishable from magic, at least in the blockchain realm. On block #7,229,126 the nodes of the Polkadot mainnet each upgraded to runtime version 9110 on the back of a binding, decentralized voting process. In a world-first on several levels, several thousand nodes spread across the world run by thousands of different people, went from maintaining a “normal” mono-chain to helping run a sharded, heterogeneous multi-chain in as much time as it took to author and create the next block — about six seconds.

The very first parachain launched on Polkadot a little while later with the Shell chain. Shell’s job was to warm up a parachain seat so it could later be upgraded to the common-good Statemint parachain which came a while later in December. In addition to Statemint, several community parachains launched. To select which teams could launch first, five parachain slots were auctioned off in two year leases to the highest bidders.

Polkadot completed its first five auctions and saw them each launch days ago, completing the final stage of its launch process. All in all, well over one hundred million DOT (106m, representing a whopping 9% of total supply) has been locked up for two years in order to lease out these first few slots. And with the extensive testing done on our Rococo testnet, all five parachains on both Polkadot and Kusama hit the ground running, producing blocks the moment that their slot went live.

Six further auctions are under way, which began on the 23rd of December and will finish on March 10th. Barring any technical issues, we would expect auctions to continue largely unabated for 2022.

Kusama, meanwhile, now sees sixteen parachains launched and running on its Relay, with a promise of a further five launching in the coming fortnight. For Kusama with just sixteen parachains, over three million KSM has been locked in place for 12 months, that’s 31% of total supply or about one KSM in every three! For more information on parachains, there’s the awesome Parachains.info.

With parachains now launched, Rococo’s initial value proposition as a testnet for the new parachain logic is at an end. It will however find a new purpose as a community parachain testnet-hub, an initiative launched a little while ago. Community teams will be able to onboard their parachains to test technologies such as XCM between themselves in a no-stakes environment.

2021 also saw some important third-party service launches. SubSquid and SubQuery, two powerful multi-chain indexer services, launched and gained widespread adoption in the ecosystem. SubSpace and OnFinality launched their Kusama archival program, using Web3 technology to archive all chain data throughout the Kusama parachain ecosystem. On the more institutional side, Deutsche Telekom announced its participation in Polkadot’s security and maintenance. It noted that it had acquired DOT tokens and was running validator nodes as a means of promoting Polkadot and XCMP — the way that its independent parachains are able to trustlessly communicate with each other. And almost 12 months ago at the beginning of 2021, Fireblocks (the institutionally-focussed crypto custodian) also announced support for holding and staking DOT.

💡 Technology

While development continued apace across the gamut of features and functionality of Polkadot, 2021 saw the release of several core pieces of the puzzle for the Polkadot ecosystem. The new metadata format signalled a huge change for so many developers in the ecosystem minimizing development friction and reducing the chance of bugs.

Metadata is crucially important for inspecting, comprehending and transacting between the various different systems which connect to Polkadot, Kusama and Substrate-based parachains. Whether it is block explorers, dashboards, mining operations, exchanges or user-interfaces, all need to get a rich insight into what the on-chain business logic is doing. This difficult job is made all the harder by the fact that Substrate chains are heavily customised to their particular job, often introducing complex datatypes in order to effectively represent the information which they process. It’s made more difficult still from Substrate’s industry-leading upgradability meaning that these datatypes might change at any given time through an on-chain upgrade to the core logic.

With the new metadata system it becomes trivial for the Rust-language developer who is writing the on-chain business logic to ensure that all of the far-flung systems (usually written in different languages and running on different platforms) which want to get a deep insight into those the various datatypes can do so perfectly and with zero fuss, and are kept up to date with any changes that might happen.

Another major delivery in Polkadot which happened this year was version 2 of XCM, Polkadot’s message format making it easy for different consensus systems to interact. XCM v2 is the first “production ready” version of XCM and has debuted on Polkadot in the last weeks, carrying the upgrade instruction from Polkadot’s governance down into what would become the Statemint parachain.

XCM’s main purpose at present is to allow for several forms of asset-transfers between chains as well as provide a general transaction layer allowing chains which know each other to interact with their specialised functionality. It also brings with it version-awareness, allowing chains to upgrade in their own time without fear of losing communication with others who upgrade before. It also contains several pieces of functionality to safeguard when things go unexpectedly wrong, from error detection and reporting, to a special “safety net” which catches assets which are unexpectedly left unspent at the end of a message.

Polkadot’s staking technology has also been evolving over 2021. The number of nominator accounts it can support has tripled from 6,000 at the end of 2020 to 22,000 at its peak this year. This happened primarily through a change to ensure that staking elections can happen in multiple stages.

FRAME, the API and framework which allows for easily-composable modules of on-chain business logic, was also upgraded across the board so now all pallets (modules) utilize the much cleaner and more idiomatic procedural macro. In 2021, it saw the addition of several pallets including Assets and Uniques which unlocked Polkadot’s capabilities in tokens and NFTs respectively. The Statemine and Statemint chains utilize these pallets for their core feature set.

Numerous underlying improvements have also quietly made it into the Substrate codebase not least the production readiness of the ParityDB, our highly optimised blockchain database designed specifically for Substrate chains which need maximal performance. Tooling and especially the weights system — the reason Substrate chains do not need the slow dynamic metering of smart contract platforms — has been honed, ready for launch.

Smoldot has also been progressing in the background. Started as a part-time project, Smoldot is an alternative implementation of a Substrate/Polkadot node, designed to run especially well in resource-constrained environments where retaining a large database and executing every transaction is impractical. Smoldot has demonstrated that it is practical to use Polkadot and its Substrate-based parachains in environments such as a web page and Raspberry Pi.

🤝 Social & Sites

One of the very first things to happen in the last year was the approval of rebranding for Polkadot by the network’s on-chain governance. A few months later, Polkadot became the world’s first globally decentralised system which determined its own brand with over two thousand DOT holders voting. A quadratic voting system was used in an effort to balance DOT ownership with individuality and try to ensure that the result is one which has a broad base of appeal.

Polkadot’s online growth has been raging over 2021: its website saw roughly two million page views of which about a quarter were unique users, about four times the total of the previous year. Twitter followers have more than 10x-ed in the same time, from under one hundred thousand at the end of 2020 to more than a million now and Wechat subscribers have nearly tripled from 18,000 (in 2020) to almost 50,000 now. Kusama’s Twitter fanbase meanwhile grew from around 30,000 to over 200,000, representing a slightly more modest but still substantial growth of over 500%.

In other online media, totals have also been growing, with the Polkadot Reddit now seeing 70,000 members, and Discord pushing 20,000. The YouTube channel now has over 40,000 subscribers and has seen 1.1 million viewers watch 126,200 hours of Polkadot educational materials. And over the last twelve months, we’ve published hundreds of Polkadot and Substrate-related articles, news and videos.

The Polkadot Wiki meanwhile went through some big revamps in 2021. 160 contributors created its content which over the year saw 1.5 million visitors, with 3.2 million page views served. The ambassador programme also continued through 2021 seeing its total grow to 2,391 candidates and ambassadors.

After it became clear that a simple Element chatroom was no longer the optimal forum for around-the-clock technical Q&A, especially in terms of the ability to search for previous answers, we looked towards Stack Exchange as a potential utility to help in the near term. After a short couple of months going through their “prove yourself” process, we now find ourselves with our very own Substrate beta Stack Exchange site. Many thanks to all involved in that effort.

👥 Getting Together

Despite the pandemic, we have seen many community events this year, counting almost four hundred meet-ups (both offline and hybrid) happening globally, the most popular being in Lima on December 15th, with 500 RSVPs alone. Community-led online events were even bigger in nature, with many seeing hundreds of people attend and the Polkadot Korea meet-up seeing over 1,500 people register.

This year’s Polkadot Decoded though, back in May, was far and away the biggest conference for the Polkadot community. It featured over forty community-selected speakers covering everything from parachains and NFTs to privacy and identity. Over 27,000 people registered for the live feed, a four-times growth from 2020.

However, Decoded wasn’t a patch on the recent Parachain Launch Party, which earned itself the title of Biggest Polkadot Event of all time. A massive 220,000 people tuned in to see segments with each of the winning parachain founders and some of the key people behind Polkadot.

Polkadot and Substrate have also been topics of conversation in some the crypto ecosystem’s biggest conferences: Coindesk Consensus, Messari Mainnet, Unfinished Live, Paris Blockchain Week, ETH Denver, EthCC Paris, Blockchance Europe and Digital Euro Summit to name just a few.

Over the course of 2021 in China we’ve had over 50 online and offline events and presentations together with community and local partners, including invitations to some of the highest profile blockchain events to present Polkadot and Substrate like the Wanxiang Blockchain Summit, World Blockchain Conference and CNBC East Tech West.

The Wanxiang Blockchain Summit, 2021.

Over 2021, more than a thousand developers attended one of ten Substrate courses, with 70% of them graduating. Meanwhile, four hackathons had fifty teams build projects in the our ecosystem, ten of whom have already won the slots on the Relay chains such as Acala and Astar or are bidding for the slots via crowdloan.

Separately, twelve teams graduated Web 3.0 Bootcamp, themselves selected from more than fifty projects across the US, Europe and China. The bootcamp, a high-touch programme of incubation and education, included four online panels, regular check-ins, numerous awareness campaigns, open lectures and one-on-one sessions to give teams the maximum chances of success by providing full-spectrum assistance. Alumni teams like Acala and Moonbeam have already been successful in getting parachain slots on Kusama and Polkadot.

🧑‍💻 Substrate Builders: teaming with projects

Substrate Builders Program is rocking away: 163 new teams applied for a place on the program over 2021 with 36 being lucky to get accepted for a spot. Over the year 53 technical reviews were conducted for teams in the program with eleven teams completing all milestones set.

Some highlights from this year include Ajuna Network introducing fully featured SDKs for using Unity and Unreal with Substrate. Bit.Country, a platform for metaverses and games also hit its first milestone finalizing logic for its economy, governance and global NFT marketplace. SubSpace (a Substrate-based scalable platform for storage and computation) completed its initial work with a novel consensus mechanism called Proof-of-Archival-Storage and launched the Aries Test Network, their testnet for this great new technology.

And on the infrastructure side, Automata Network, a middleware stack for privacy-orientated DeFi, completed milestone number one with their ERC20 token cross-chain bridge and launch of ContextFree, their canary network.

On the assets side, Chainflip Labs (cross-chain asset swap specialists) crossed their second milestone with deployments of their tech on Ethereum testnets together with their main State-chain testnet (Substrate-based, naturally!), and Firefly (né dTrade), a decentralized exchange which brings fast-trading to DeFi hit their third milestone with a deployment on Kusama’s Moonriver and finalized plans for deployment onto Polkadot’s Moonbeam. And back in April, Chainlink gave the Polkadot community some great news: it made its oracle service available to all Substrate-based chains meaning that it will be effectively available for parachains to use as they need.

Being a (or indeed, the world’s only) layer-0 platform, our layer-1 platforms are building up their own builder communities. Both Astar and Moonbeam have now launched Builders Programs of their own.

Over at Parity we’ve seen some substantial expansion, with the team growing to two hundred people over the course of 2021. Parity’s team is spread globally as ever but will see some renewed concentration on London for some of its new hiring together with an expansion of presence in several other places of the world. And the Web3 Foundation is also pushing forward with some great hires of its own, very notably beginning with the introduction of Bertrand Perez as its Chief Operating Officer.

🙌 Look, no scams

In 2021 people from Web3 Foundation and Parity Technologies came together and formed the Anti-Scam team, determined to put a stop to scammers’ free reign and make Polkadot a safe ecosystem for its stakeholders. An additional $130,000 was spent from the Polkadot Treasury and Web3 Foundation for fighting scams.

Over the year, close to a thousand sites and other scams have been taken down overall, with more than 460 scam sites identified by the community. To incentivize this, 550 DOT in rewards were claimed by and given to those who reported them. The phishing repository, a comprehensive list of sites and addresses involved in phishing and scams, now includes more than 2,300 entries.

2022 will see the evolution of the Anti-Scam Community Initiative to cover a lot more than scam sites, become community-driven, collaborate with other ecosystem projects and teams, and set the foundations for the first on-chain and decentralised scam fighting campaign.

👣 Best foot forward

Looking back to what I wrote 12 months ago, I was hoping for a little more physical freedom from Covid restrictions and a return to the global meetup culture which lies at the social heart of the crypto industry. Sadly that didn’t really come to pass in 2021, but here’s hoping that 2022 will fare a little better. I for one am looking forward to enjoying a good 重庆火锅 and some すき焼き — it’s been too long.

Hopes of travel aside, 2021 was the year of final delivery and the end of the chapter we started in 2016 with the release of the initial white (well… polka dot 🙌) paper. More than any year yet, 2022 is the beginning of our next chapter in Polkadot’s story. We’ll see the prospect of scaled hyper-connectivity under a single security umbrella which Polkadot provides come to life as the more parachain teams win auctions and join the Polkadot party. With more than 150 chains serving a variety of purposes under development, many of which already with test-nets, there is much to anticipate. We also have the launch of decentralized bridges to look forward to, initially Parity’s bridge which will connect Polkadot to Kusama, and later Snowfork’s which will connect Polkadot to Ethereum.

On the core side, we will be spending some time refactoring and optimizing the code, and introducing new technology which will help reduce costs and latency associated with message passing. Our goal with this is to allow each one of Polkadot’s parachains to push upwards towards our 1,000 sTPS per-shard target. (sTPS is our standard Transactions Per Second, a cross chain standard in what counts as a transaction, and basically means a balance-transfer from one pre-existing account to another pre-existing account with neither account having been read from or written to in the block.)

Beyond that, the Polkadot team’s efforts will be focussed on the parathread feature, allowing teams who do not win an auction to still ensure they have the security guaranteed by Polkadot and get all the benefits of XCMP.

Wrapping up…

Once again we come to the end. I’ll be signing off for another year, and I’m left to wish you a festive holiday season and a safe, healthy and happy new year!