Hello! Part 1, Analysis of Facebook Libra, was about the Libra white paper. Part 2 is about the Libra Blockchain white paper, also called yellow paper. I’m going to highlight what I think important and explain it. So let’s go!
This is not your typical crypto white paper full of shit. It has 45 authors, product managers, engineers, researchers, and economists. Surprisingly just a few of them have prior blockchain experience. Weird.
Libra is a decentralized, programmable database. Ah! Is not a blockchain!? No is not, as we’ll see in a moment.
The full nodes are referred to as validators.
Validators keep the database in sync with the Libra protocol. The DB stores a ledger of the resources, such as the Libra coins.
Two types of entity interact using the Libra protocol: the validators and the clients.
Validators take turns as a leader to validate the transactions.
Clients can keep a copy of the ledger. What use could they do with it? I guess none, since clients don’t have governance power. In Bitcoin, everyone can be a full node and become part of the governance. That’s clearly not the case in Libra.
All data is stored in a single versioned database. Each transaction is sequential. This basically means that there’s a single source of truth. Is still not clear how Libra manages network partition and forks. How a blockchain/database reorg happen and how is resolved.
Libra uses an account-based data model just like Ethereum. That data model is simpler than the Bitcoin’s UTXO model, which focuses on security.
Some technicality for generating a private and public key. Nothing new here.
Oh shit! Libra is pseudo-anonymous like Bitcoin or Ethereum. Well, until you create a wallet connected to Facebook via Calibra, then you’re not anonymous and you’re probably deanonymizing the people you’re transacting with.
Resources and Models
In Libra tokens (resources) and smart contracts(models) are separated, and both are first citizen.
A module defines the behavior of a resource. Libra smart contracts are written in Move.
In case you’re wondering, yes, Ethereum got this wrong.
Models are immutable (for now)
The only way to change the state of the blockchain is by executing a transaction. Nothing strange.
All the core components of Libra are defined in the genesis state as Move models and resources. For example the Libra coin, the logic of accounts, the transaction validation and validator selection.
Basically the Libra core components are defined at the smart contract level, wherein Bitcoin are defined at the core level.
Transactions are deterministic: Libra is a state machine.
Libra transactions have a fee cost, just like the Ethereum gas model. This is to avoid a DOS attack. I’m assuming from this that Libra is a Turing Complete machine, like Ethereum. As opposed to Bitcoin.
The fee is calculated by the cost of an action and the price of the gas at that moment.
Probably not worth reading, but I’ll post it here anyway.
Same. If interesting to you, read it. But in short, there’s nothing new here.
Move Programming Language
Aw shit! The Libra team decided to create a new programming language. What’s cool about it? The clear separation between tokens and smart contracts as we’ll see.
Transactions scripts are the main procedure in the Libra protocol. A transaction is a Move script. This means you can program Libra coin to send on each transaction 0.1% donation to a wallet—I could really appreciate that.
The relation between modules and resources is comparable to the relationship between classes and objects.
This reads just as “Fuck you Ethereum. We got this right.”
Move virtual machine
The Move virtual machine is basically an interpreter that compiles Move into bytecode.
This section shows how Libra uses Merkle Trees signs each transaction.
Here, in fact, is explained how the ledger uses a single Merkle Tree to provide the history.
Because is the history is a Merkle Tree, it can be pruned to reduce the necessary storage.
Libra Consensus Algorithm
Libra consensus algorithm uses the HotStuff BFT protocol.
Libra engineers evaluated different BFT-based protocols and decided to use HotStuff BFT because is simple and modular. And because was promising in the early experiments. This means that Libra may change it later on.
I’m always hairy about too smart sentences. This is basically saying that the validator elections are managed by a Move module.
Each change of validators is called New Epoch.
Too long to read. In short, Libra nodes are connected via peer-to-peer via TCP.
Libra protocol can manage 1000 payments/transactions per second. With a 10 second of finality to make sure they’re irreversible. Considering the semi-centralized validator system, it seems a reasonable number to me.
Validators need 40 MBps of internet connection. That’s not a lot honestly. Also required 16TB of SSD storage. That’s a lot of space.
Why the Blockchain paper talks about the reserve. Because, this is related to the incentives to the validators. As we’ll see soon after.
The reserve is managed by the Libra Association. A closed group of Founding Members. In the future, this should be open, and it may require different market incentives. The authors here admit that Proof of Stake may have some governance issue, and we need to explore mechanism to protect the smaller stakeholders and the service providers. This means: PoS is an experiment.
We’re working to launch Libra Blockchain with the Libra Association
Libra Blockchain—My thoughts (2)
I find Libra to be a fascinating project. Why? 8 years ago I asked my CTO to get my salary in Bitcoin. I was laughed at. Every year one colleague (you know who you are) keep telling me “Bitcoin is dead. It’s just ded.”.
Today Facebook one of the largest company in the world is creating its own cryptocurrency. Just think about it.
From a tech perspective, Libra is not a breakthrough—it’s a decentralized database—yet is interesting, because its DNA gives us hints for the Facebook strategy.
Libra is designed to be pseudo-anonymous. Although Calibra may be able to deanonymize the FB accounts who use Libra.
The LibraBFT is designed to decentralize the governance with the Libra Foundation. Facebook knows that regulators will try to stop it. Decentralizing liabilities, compliances, KYC/AML, reserve, etc. IMHO is an attempt to go around the regulator. While maintaining an indirect control on the blockchain.
Libra is a really interesting project. My favorite part of Libra is that it confirms Bitcoin. In fact, Bitcoin it’s also cited at the end of the paper.
Like it or not. Libra is an important step towards a global change of our economy. And Bitcoin is here to stay!