This article is more than three months old

What are forks and how to track them

What are forks and how to track them
What are forks and how to track them on DefiLlama. Credit: Andrés Tapia/DL News

Spend enough time reading about crypto and DeFi and you’ll come across forks, a pretty enigmatic term for those who don’t spend their days digging through Github repositories.

But fear not — forks are easy to understand.

Forking refers to any time a developer copies open-source code and uses it as the base for a new, separate project. In DeFi this most often takes the form of copying the code for an existing protocol and deploying it again, sometimes on a different blockchain, and often with small but significant changes.

Some of the largest DeFi protocols are forks. In 2020, Sushiswap, a fork of decentralised exchange Uniswap, reached a total value locked of over $8 billion at its peak as it challenged the dominance of the protocol whose code it had copied. Uniswap had a TVL of around $10 billion at the time.

But forking isn’t limited to DeFi protocols. The blockchains that an entire DeFi ecosystem is built on can also be forked.

The term is also used to describe any time blockchain developers agree to implement an update. When updating, developers must create a fork, as most blockchains cannot be updated without doing so.

As we’ll explore later, forks can be contentious, and some have created great schisms within blockchain communities.

But first, let’s explore how to use DeFiLlama to track DeFi protocol forks.

Join the community to get our latest stories and updates

How to track forks on DefiLlama

To navigate to Forks dashboard, click on the DeFi tab on the left of the DefiLlama home page then click on the forks subsection.

At the top of the dashboard are two charts showing the popularity of different forks. Uniswap v2 is currently the most-forked protocol, accounting for almost 35% of all the forks DefiLlama tracks.

Uniswap v2, Compound v2, and Aave v3 are the three most commonly forked DeFi protocols.

Lower down you’ll find a list of 88 different DeFi protocols and all the forks that use their code.

The list includes three columns. This first shows the number of forks of a protocol, the second shows the total value locked — or TVL — in that protocol, and the third shows the TVL of all forks of that protocol relative to its own.

The greater this figure is, the more successful the spinoffs are that used the original protocol’s code.

DefiLlama forked protocols list

Take Solidly for example, an exchange protocol whose forks have amassed a TVL 105,511% that of the original. Solidly’s launch was marred by bugs, and so bad was its reception that its creator, Andre Cronje, quit the project just three weeks after launch.

But other developers eyed opportunity where Cronje gave up, and forked the protocol into more successful projects, like Velodrome.

Many forks are near identical copies of existing protocols, just deployed on a different blockchain. However, some use the existing protocol as a starting block to build something completely new.

For example, Frax Swap is a fork of Uniswap v2, but it is just one part of the larger Frax protocol that also includes an Ether liquid staking protocol and an algorithmic stablecoin.

Forking blockchains

Forking doesn’t just apply to the code behind DeFi protocols. As blockchains are also just lines of code on computers, they too can be forked.

The most common reason to fork a blockchain is to implement an upgrade. Blockchains have no centralised point of control, so everyone running nodes on the network must agree to switch to the upgraded version of the blockchain and leave the old one behind. This is sometimes referred to as a blockchain’s social consensus.

Ethereum’s Shapella upgrade in April 2023 is a recent example of a blockchain fork. The update changed Ethereum’s underlying code to allow users to withdraw staked Ether from the blockchain’s staking contract.

However, while everyone running Ethereum nodes agreed on the Shapella fork and switched over to the new network, this doesn’t always happen.

In 2016, an incident known as the DAO hack ruptured the Ethereum network, causing it to split into two blockchains: Ethereum and Ethereum Classic.

A hacker stole $60 million worth of Ether — about 14% of all Ether in circulation at that time — from The DAO, an early decentralised autonomous organisation that intended to act as an investor-directed venture capital firm.

After much debate, a majority of Ethereum stakeholders chose to fork the blockchain, effectively rolling back Ethereum’s history to before the hack. This rolled back version is the main version of Ethereum used today.

However, the decision was controversial — blockchains are meant to be immutable. Those who disagreed with the decision to roll back Ethereum continued to support the original blockchain, which is now known as Ethereum Classic.

Ethereum Classic is not the only forked blockchain. Bitcoin also has several forked versions that are still active, including Bitcoin Cash, Bitcoin Satoshi Vision, and Litecoin.

Next steps

Related Topics