STAS 3.0: The first true layer 1 DEX on Bitcoin

The numbers tell a sobering story. Over $2 billion was stolen from cross-chain bridges in 2022 alone. “Decentralized” exchanges (DEXs) that route orders through proprietary processes. “Wrapped” tokens that require you to trust custodians with the underlying assets. For all the talk of DeFi, the reality is that most DEX trading still involves significant counterparty risk.

Stas Trock, the developer behind the STAS token protocol, thinks there’s a better way. He recently released STAS 3.0, an upgrade that enables something genuinely different: a DEX that operates entirely on BSV’s base layer, enforced by Bitcoin Script itself. There’s no need for bridges, wrapped tokens, or trusted intermediaries whatsoever.

“If you build token systems on Bitcoin’s base layer, STAS 3.0 protocol changes what’s possible,” Trock wrote in a Medium post explaining the technical details.

Every DeFi digital asset exchange claims to be “decentralized,” but that’s only partially true. Most rely on bridges, sequencers, or off-chain matching to work. The STAS protocol upgrade for BSV changes the story entirely.

What are STAS tokens?

Before looking at what’s new in STAS 3.0, here’s a quick background. Like 1Sat Ordinals, STAS tokens use Bitcoin Script to attach data directly to individual BSV “satoshis.” But with STAS (Substantiated Tokens from Actualized Satoshis), that metadata gets embedded directly into the UTXO itself. This means that all token information, ownership records, and smart contract rules are permanently written to the blockchain.

This matters for two reasons. First, tokens retain their validity even if sent to a wallet that doesn’t natively support STAS contracts. The data lives on-chain, not in a separate database or indexer. Second (and crucially for long-term value), tokens remain valid even if the original issuer disappears. There are no company servers to maintain, and no proprietary platforms to keep running. The protocol is open, the contracts are transparent, and the tokens persist as long as the blockchain does.

How the divisible swap works

The primary feature in STAS 3.0 is what Trock calls “divisible UTXO-based swaps.” But what does that mean in practice?

Imagine you want to sell 1,000 tokens at a fixed exchange rate. With STAS 3.0, you create a UTXO containing those tokens, with the swap parameters baked directly into the Script. This UTXO sits on-chain as an open offer (essentially a limit order) that anyone can fill partially or fully.

The first buyer takes 300 tokens, the second takes another 500. A third takes the remaining 200. Each transaction executes atomically: the buyer’s payment is sent to your designated address, your tokens are sent to theirs, and the exchange rate is enforced entirely by Bitcoin Script. There’s no need for an escrow service or a matching engine. No one holds anyone else’s funds.

“Multiple people can take their parts of it,” Trock explained. “This divisible swap feature is what enables creation of real L1 P2P order books, being the very essence of true DEX.”

Crucially, makers can cancel their offers at any time simply by spending the UTXO back to themselves. The control remains entirely in their hands until the moment a trade executes.

Back to the top ↑

The technical breakthrough: P2MPKH

Behind this functionality lies a significant cryptographic innovation. STAS 3.0 introduces Pay-to-Multiple-Public-Key-Hash (P2MPKH), a new script template that provides multisig security for token operations while preserving privacy.

Traditional multisig (or “P2MS”) transactions expose all public keys and the required signature threshold upfront. P2MPKH works more like the familiar P2PKH addresses most Bitcoin users know: only a hash appears on-chain until the moment of spending. The full multisig configuration, e.g., one which might require 3-of-5 signatures for a corporate treasury, is revealed only when the tokens are actually moved.

This matters for large enterprises and institutions. Token treasuries can now require board-level approval for large transfers, without broadcasting their security structure to the world. The current implementation supports up to five public keys, with expansion possible in future versions.

“Hash the policy, reveal it only when you exercise it,” Trock wrote. It’s the same principle that made P2PKH the standard for Bitcoin addresses, only extended to sophisticated multisig configurations.

Back to the top ↑

Compliance without compromise

For all its decentralization, STAS 3.0 also addresses another important reality: regulated stablecoins and security tokens need compliance features. The upgrade introduces optional freeze and confiscation capabilities, but with a crucial twist to preserve the protocol’s permissionless nature.

Here’s how it works: At issuance, tokens can be configured as “freezable” and/or “confiscatable.” These settings are immutable for the token’s lifetime—they can’t be altered later. If this is enabled, specific authorities are hardcoded into the token’s governance rules (as P2MPKH addresses).

When a regulatory order comes into effect (e.g., freezing assets linked to illicit activity), the designated authority can execute it directly on-chain—no need to call the issuer or involve transaction processors (miners). No foundation vote is required. The authority’s transaction is validated by the same Script rules that govern all other operations.

“The regulatory order is executed DIRECTLY by the corresponding authority which is hardcoded inside token data upon its issuance,” Trock said. “Without involvement of issuers, miners and/or an association/foundation in charge.”

The compliance infrastructure is built into the protocol itself, not bolted on as an afterthought. For regulated stablecoin issuers, it offers a path to legal compliance without sacrificing the core benefits of blockchain-based assets.

Back to the top ↑

Why BSV? Why now?

STAS 3.0 is a technical achievement in itself, but it also demonstrates what BSV’s scaling capabilities enable. The protocol’s “massive scaling and low fees” model, as Trock noted, makes these complex Script operations economically viable for real-world use cases.

On chains with constrained block sizes and high fees, executing sophisticated multi-party contracts at scale becomes prohibitively expensive. BSV’s architecture removes that barrier, allowing token protocols to operate with the same efficiency that Bitcoin originally promised for simple payments.

The timing is significant. As regulatory frameworks for digital assets mature globally, the market is increasingly demanding solutions that combine decentralization with compliance capability. STAS 3.0 offers both, not by treating them as opposing forces, but as complementary features of a well-designed protocol.

Back to the top ↑

Looking ahead

For developers, the STAS SDK is available on GitHub, and the full technical specification is detailed in Trock’s five-part Medium series (the latest installment covers the 3.0 upgrade in depth). Migration guides are provided for projects currently using STAS 2.0.

For traders and institutions, the implications are clear; the infrastructure for genuinely decentralized token trading (not the “decentralized-in-name-only” variety that dominates today’s market) now exists on the only truly scalable Bitcoin implementation.

Whether it gains traction will depend on adoption, as always. But the capability is there. And in an industry that’s all too often characterized by compromise, STAS 3.0 offers something increasingly rare: a solution that actually delivers on its promises.

Back to the top ↑

Watch: Make DAPPs with no coding

frameborder=”0″ allow=”accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share” referrerpolicy=”strict-origin-when-cross-origin” allowfullscreen>

Source: https://coingeek.com/stas-3-0-the-first-true-layer-1-dex-on-bitcoin/