Earlier this year, Square Crypto decided to support Stratum V2 development with a grant. As no developer has taken on the task yet, we thought it was time to explain more about why Stratum V2 is a worthy development and how it will make the Bitcoin mining ecosystem more decentralized and secure.
Square Crypto, launched by Twitter founder Jack Dorsey, has implemented a grant program to support Bitcoin development. The goal of the program is to fund devs who are working to improve Bitcoin’s user experience, scaling, privacy, or security.
With the focus on open-source Bitcoin projects, many developers and teams have applied in hopes of becoming a recipient of the grant. We were fortunate to be one of the earliest recipients.
The Square Crypto grant will be used towards developing one of the most important aspects needed for a full implementation of the Stratum V2 protocol for pooled mining.
For some context, Stratum V1 is an open-source protocol originally developed by Marek “Slush” Platinus in 2012 to improve how miners and mining pools work together to secure the Bitcoin network. As Stratum V1 gained popularity amongst the mining community, some vulnerabilities and deficiencies were discovered over the years. This led us (Braiins) to work on upgrading the protocol to Stratum V2 in collaboration with Matt Corallo.
So, where does the grant come in?
In Bitcoin Core’s current state, a full implementation of Stratum V2 is not possible. Some upgrades are needed to the Bitcoin Core software for the complete benefits of Stratum V2 to be realized — namely, allowing miners to construct their own block templates to improve mining decentralization. Square Crypto will be providing a grant to a proficient Rust developer who can make the necessary upgrades to Bitcoin Core to have this aspect of Stratum V2 implemented.
With the Bitcoin mining space often being criticized for being too centralized, Stratum V2 can be a big step back towards more decentralization by empowering individual miners and reducing the power of pools in the process. We’ll explain more about the decentralization-enhancing components of Stratum V2 works in the next section, but developers can get deeper insights by reviewing the protocol specification.
Stratum V2 introduces three new sub-protocols that allow miners to select their own transaction sets through a negotiation process with pools, improving decentralization.
The Job Negotiation sub-protocol of Stratum V2 enables miners to construct their own block template (which includes the transaction set) while still mining with a pool, making pooled mining more similar to solo mining. Without this feature, only pools and solo miners can determine what transactions do or don’t go into a block. We want to change this to minimize the risk that pools may be bribed or coerced into an attack, as discussed in more detail in the Job Negotiation article linked above.
We already have a partial implementation of Stratum V2 running on our ASIC firmware, Braiins OS+, and on Slush Pool. We also have translation proxies available so that miners can run V2 even if their pools don’t and so that miners who aren’t using a V2-compatible firmware can still connect to a pool’s Stratum V2 endpoint.
We think that finishing the full implementation of Stratum V2 is a huge step forward in Bitcoin’s maturation process, particularly as mining becomes more professionalized and as the stakes grow higher with each year that Bitcoin’s narrative gains momentum.
Nonetheless, here are some of the other benefits of Stratum V2 that can help drive it’s adoption.
Stratum V1 has a major security flaw: it’s vulnerable to man-in-the-middle (MITM) attacks. The worst of these attacks is hashrate hijacking, in which a malicious third party is able to steal a miner’s proof of work before it reaches their target pool, thereby taking credit for the work and earning the payout for themselves instead.
Connections between miners and pools in V2 are encrypted with a scheme known as authenticated encryption with associated data (AEAD), which protects the integrity of the data transfers and prevents miners from losing money to MITM attacks.
Stratum V2 decreases both the size and quantity of data transfers between miners and pools. In other words, it helps miners in remote locations to reduce their latency, thereby decreasing their stale shares (which don’t earn them any money) and their data bills. Meanwhile, it makes running a pool service easier and more affordable too.
As miners move further away from population centers in search of the cheapest electricity, having a lighter protocol with lower bandwidth requirements can help those remote miners remain competitive with their better-connected peers.
Stratum V2’s multiplexing feature makes it possible for miners to mine multiple coins on a single connection as well as doing zero-time backend switching. In other words, miners can more efficiently implement use cases like coin switching to increase profit (e.g. switching between Bitcoin, Bitcoin Cash, and Bitcoin SV) or even send hashrate to multiple pools at once on a single connection.
Stratum V2 is objectively better than the original stratum protocol in terms of efficiency, security, flexibility, and decentralization. With the help of SquareCrypto’s grant, the full implementation of Stratum V2 can now become a reality by making the necessary upgrades to Bitcoin Core.
Stratum V2 brings a host of new improvements and vulnerability fixes that can make it a new standard for pooled mining in the years ahead. It may not be as flashy as privacy and scalability developments, but helping develop a full implementation that improves Bitcoin’s mining centralization concerns would be a huge accomplishment on any developer’s resume.
Send us an email if you're a developer who wants to work on Stratum V2
Bitcoin mining software company: Slush Pool, Braiins OS+ & Stratum V2.
By miners, for miners.
Industry leaders in transparency and innovation, with more than 1.25 million BTC mined since 2010.
Increase hashrate on your Bitcoin ASICs, improve efficiency as much as 25%, and mine on any pool or get 0% pool fees on Slush Pool.
Cutting-edge firmware with an implementation of Stratum V2 and mining software written from scratch in Rust language. Upgrade your ASICs with our firmware and mine on any pool.
Quality improvements including reduced data loads, empty block elimination, hashrate hijacking prevention, and more.