Hello!

© 2024 Kishan Kumar. All rights reserved.

A Simple Guide to Understanding Fantom's Lachesis Protocol and DAG Structure

Fantom is a blockchain platform designed to provide fast and scalable transactions, making it a promising platform for the future of decentralized finance and beyond.

June 23, 2023

Hero

Fantom is a blockchain platform designed to provide fast and scalable transactions, making it a promising platform for the future of decentralized finance and beyond.

Unlike traditional blockchain platforms, Fantom uses a directed acyclic graph (DAG) as its underlying data structure. It uses a consensus mechanism called Lachesis that enables transactions to be finalized in a second and cost a fraction of a cent.

Lachesis is a proof-of-stake, DAG-based, aBFT (asynchronous Byzantine Fault Tolerance) consensus mechanism. Let me break down what these terms mean:

Proof-Of-Stake

Proof-of-stake means validators stake their FTM tokens to participate in the network and earn rewards. The more FTM they stake, the more validating power they have. Validators can also be slashed if they act maliciously or go offline.

I have written a dedicated article on this; you can also refer to that.

Unlocking Efficiency and Sustainability: The Power of Proof of Stake in Blockchain

Proof of Stake (PoS) is a consensus algorithm used in blockchain networks to achieve agreement on the state of the blockchain and validate transactions.

aBFT

aBFT stands for asynchronous Byzantine Fault Tolerant, which is a property of a distributed system that can reach consensus even if some nodes are faulty or malicious. Byzantine Fault Tolerance (BFT) means that the system can tolerate nodes that behave arbitrarily, such as sending incorrect or conflicting information or not sending any information at all. This is important for distributed systems operating in an open and trustless environment, where anyone can join and leave the network, and nodes may have different incentives or goals.

Asynchronous means there is no assumption about the timing or order of messages between nodes, making the system more resilient to network delays or disruptions. This differs from synchronous or partially synchronous systems, where nodes have to wait for a certain amount of time or receive a certain number of messages before making a decision.

Some examples of aBFT systems are Lachesis (Fantom's consensus mechanism), Tendermint (Cosmos's consensus mechanism), and HotStuff (Libra's consensus mechanism).

DAG

DAG

DAG

DAG stands for Directed Acyclic Graph, a data structure consisting of vertices (or nodes) and edges (or links) that connect them. A DAG has two properties:

  1. It is directed, meaning that each edge has a direction from one vertex to another. For example, A -> B implies that there is an edge from A to B but not from B to A.
  2. It is acyclic, meaning there is no way to start from a vertex and follow the edges to return to the same vertex. For example, A -> B -> C -> A is not a DAG because it forms a cycle.

In the Fantom blockchain, each validator has its own local block DAG, called OPERA DAG, and batches incoming transactions into event blocks, which they add to their DAG as vertices. Each event block is a vertex in the validator's DAG full of transactions. Validators also reference two previous event blocks from other validators when creating a new event block, forming edges between vertices. This way, validators can confirm transactions asynchronously, which significantly increases speed.

Lachesis Consensus (optional)

Lachesis uses a three-step process to achieve consensus on the event blocks and transactions:

  • First, it selects roots, which are event blocks with at least two-thirds of validating power directly or indirectly referencing them. Roots are used to determine the quorum (the set of validators who can participate in consensus) and the stake distribution.
  • Second, it selects Clothos, which are roots that have at least two-thirds of validating power directly referencing them. Clothos determine the order of event blocks within each epoch (a checkpoint in the DAG history).
  • Third, it selects Atropos, which are Clothos that have at least two-thirds of validating power referencing them via other Clothos. Atropos are the final and irreversible event blocks that form the main chain of the DAG. They are assigned timestamps based on their logical order and used to determine the order of transactions across epochs.

Lachesis also allows for the dynamic participation of new nodes into the network by using epochs as checkpoints. Each epoch has a different set of validators and stake distribution based on the roots selected in that epoch.

Fantom Ecosystem

One of the critical features of Fantom is its ability to support multiple virtual machines (VMs), including Ethereum and EVM-compatible VMs, which makes it easier for developers to build decentralized applications (dApps) on top of the Fantom network. This approach also makes it easier for developers to migrate their existing dApps to the Fantom network.

Fantom has a rich and growing ecosystem of dApps that spans domains such as DeFi, NFTs, gaming, supply chain, governance, etc. Fantom also offers multiple tools and APIs for developers to build on top of its platform. Some popular dApps on Fantom include SpookySwap, SpiritSwap, Curve Finance, Scream, Artion, etc.

FTM Ecosystem

FTM Ecosystem

Another advantage of Fantom is its ability to support staking and governance through its native FTM token. Users can stake their FTM tokens and participate in the network's consensus mechanism to earn rewards. They can also participate in on-chain governance by voting on proposals and decisions about the platform's development. This approach allows users to be more engaged in the platform's development while earning rewards for their participation.

Overall, Fantom's innovative approach to blockchain technology, combined with its focus on scalability, interoperability, and decentralized governance, makes it a promising platform for the future of decentralized finance and beyond. As more developers and users discover the benefits of the Fantom network, we can expect to see even more exciting developments emerge from this platform in the years to come.

.   .   .

Thank you for taking the time to read my article. If you found this article valuable, I would greatly appreciate your support through claps and subscriptions.

.   .   .

The 0xkishan Newsletter

Subscribe to the newsletter to learn more about the decentralized web, AI and technology.

Comments on this article

Please be respectful!

© 2024 Kishan Kumar. All rights reserved.