Divi's Solution To Prevent UTXO Bloat

Before you’ll be able to understand why Divi’s solution to the UTXO bloat problem is so cool, I’ll first explain to you what UTXOs are.

What are UTXOs?

UTXO stands for Unspent Transaction Output.

Divi is based on PIVX, which is based on Dash, which is based on Bitcoin. UTXOs are part of Bitcoin since the very beginning, and an inherent component of blockchain itself. It’s important to understand that blockchains like Bitcoin don’t have balances on them, unlike a traditional ledger would have. This will sound crazy to most people who hear it for the first time, but instead, every single transaction that’s ever happened, back from the beginning of time, is stored on each node’s hard drive, and when it’s needed to know a wallet’s balance, it adds up all the relevant transactions to arrive at the amount. Thus, a single wallet address balance will often be pieced together from left-over remnants of many older transactions. These unspent transaction outputs are called UTXOs.

In order for nodes to operate quickly, every single UTXO for the entire blockchain is stored not just on the hard drive, but also kept in RAM! And for a big blockchain like Bitcoin has, that’s a huge number of UTXOs. You can see how many that is here:


The Problem of UTXO Bloat

As of this moment, it’s over 49 million UTXOs that take up more than 2.6 GB of RAM. And this amount is growing.

Wallet engineers are expected to try to find strategies to reduce this “UTXO bloat” with smart practices, such as described in this fabulous article by Jameson Lopp, the creator of statoshi.info: The Challenges of Optimizing UTXOs


Yet despite all these efforts, Bitcoin (and most cryptocurrencies) continue to have growing UTXO sets. This happens not just from new users and more transactions, but also every UTXO since the beginning of time, if left unspent, will be stored in the RAM of thousands of nodes around the world. This huge UTXO set slows down every node in every cryptocurrency network, resulting in wasted resources. While cryptocurrencies are chasing faster transaction times and searching for scaling solutions, forces like UTXO bloat are working against them.

Divi’s Solution

It turns out that Divi’s 100% PoS (Proof of Stake) system presents us with an opportunity that’s unavailable to PoW blockchains such as Bitcoin. From what I understand, something similar was done by Peercoin, and we've created our own version. (And as far as I know, this wasn't picked up by either Dash or PIVX.)

So what does it do? It's fairly simple actually. When our Smart Wallet stakes coins, it will automatically re-combine all the small UTXOs of 50,000 DIVI or less into 50,000 DIVI pieces. And it will do this without a transaction fee.

Doing this will mean that our nodes will keep far fewer UTXOs in RAM, freeing system resources for other tasks, and ultimately we hope will help us process more data to improve our TPS (Transactions Per Second.) A high TPS is important for mass adoption of cryptocurrencies. Reducing the use of RAM in Divi's nodes also may help us achieve the goal of being able to run cloud-based Divi nodes on 1GB droplets instead of 2GB, which are half the cost.