HomeGuidesChangelog
GuidesDiscussions & SupportGitHubLog In

What is Z-DAG?

A Z-DAG Technology Primer

Z-DAG is essentially a decentralized transaction throughput solution based on Satoshi’s “snack machine” concept, invented by Syscoin Lead Core Developer Jag Sidhu. It utilizes mempool awareness and fast relay topology across a network of independently operated full nodes (2k+ at present) where all said nodes perform "validate first, then trust". A high degree of probabilistic security is enabled by fast propagation across time-sorting mempools, and this global mempool is made interactive and useful to the recipient through tooling that provides mempool status awareness. The probability represents a guarantee that a transaction is not double-spent, and will be accepted into a block and settle on-chain. This probability increases rapidly across time (to 99.9999% assurance within 10 seconds). This enables a much more efficient fee market than bidding for a block (A typical Z-DAG transaction costs 0.0000582 SYS. see: https://syscoin.org/fees for a live fee comparison), and can provide secure high throughput service even if blocks are full. This is technically a layer 1 solution because the mempool resides within the blockchain security domain and all valid transactions that pass through Z-DAG settle on-chain deterministically.

Usefulness

Syscoin’s implementation of this infrastructure is particularly useful for microtransactions with tokens, such as buying groceries with Tether, Binance USD, Lode's AGX, or simple value transfer of any token including ERC-20s that use Syscoin Bridge. Z-DAG Protocol is utilized exclusively by the Syscoin token layer; all projects that tokenize on Syscoin benefit from this. Z-DAG allows merchants or application developers to define their ideal speed/security trade-off particular to their use case, for example depending on the value involved. A merchant receiving payment for coffee might choose to wait only a few seconds before considering the payment safe against double-spends and redeemable. A cart full of groceries? Maybe 5 to 10 seconds. On the other hand, a nation-state settling a cross-border trade debt might wait for what they consider a sufficient number of confirmations (60 sec block target) on Syscoin's Bitcoin-core-compliant and merge-mined blockchain. From engineering and industry perspectives Z-DAG is tailored for payments better than other scaling approaches that try to change the court-of-record (blockchain) consensus to improperly force it to serve as a payments service which amounts to tampering with proven security and creating severe trade-offs that are global. Our solution leaves the base layer intact and Syscoin Core is “religiously” maintained to remain bitcoin-core-compliant and up-to-date in a timely fashion (sometimes involving multiple commits in a single day), w/ 90%+ code coverage. This factor is important to enterprises.

Throughput Performance

Whiteblock Inc, a third-party auditor, provided performance benchmarking of Z-DAG within realistic network conditions, using hosts w/ standard Syscoin masternode hardware specs. Whiteblock is well-known for its benchmarking service and Genesis platform, particularly among the Ethereum Community. The results for Z-DAG can be summarized as follows.

  • Parameters: network latency, quantity of nodes, quantity of assets.
  • Average throughput: 8k - 15k TPS depending on a range of latency
  • Burst throughput: 61k TPS (this rate can be sustained for extended periods as long as mempool is not full and latency conditions are conducive)
  • Zero-latency control group: 145K TPS (how most projects measure their TPS)

Full report by Whiteblock:
https://www.whiteblock.io/wp-content/uploads/2019/07/ZDAG-Analysis.pdf

Summary report by Whiteblock: https://whiteblock.io/wp-content/uploads/2019/12/ZDAG-Case-Study.pdf

This represents some of the most positive throughput statistics in the industry for a decentralized ledger network, even while using conditions closer to realistic than the vast majority of DLT throughput test examples out there. We plan to perform even more thorough testing eventually once sufficient optimizations have been introduced. Substantial resources would be required to even approach pushing Z-DAG to its limit on the live mainnet.

Scaling to Global Population Demand

The Syscoin Team understands Z-DAG does not in itself solve scalability for global population demand (the semi-absurd notion of 7 billion people transacting), rather we see it as an absolutely critical component for achieving this. The other component needed is multi-asset payment channels that use Z-DAG as a resilience fallback. One of the biggest problems with payment channel tech today is that when they aren't available for any reason (e.g. lack of channel liquidity) the transactions roll directly to blockchain settlement. This destroys convenience and cost-savings, making payment channels non-viable as a decentralized payments solution that can compete w/ existing rails. Z-DAG fills this significant gap, providing a viable fallback with a reasonable and predictable fee-market. Syscoin and some academic partners like TU Delft are currently involved in R&D towards secure multi-asset payment channels - a technology which the industry has not yet achieved. We will combine this w/ Z-DAG.

📘

Is your favorite blockchain truly viable as a court of record for global payments?

The Lightning Networks white paper provides math to calculate whether a blockchain is viable for global payments w/ payment channels. Two transactions per year, per person on earth (one to exist on-chain, one to settle when the channel closes), without subjecting either tx to competing for a block. Interestingly, Bitcoin itself, and many other blockchains mathematically cannot fulfill this, even calculated w/ lower population. Syscoin’s blockchain can because its parameters like block size & target time were set in consideration of theoretical global payment channel demands, along w/ an efficient tx footprint.

"Have other projects pursued technology similar to Z-DAG?"

There are projects pursuing variations on the idea of facilitating and using a global ordered mempool. One example is Facebook's Libra. However, ours has actually been working for a good while (we were first), is all about fast relay across a decentralized network, and has undergone optimizations. We are exploring things like UDP gateways to optimize even further.

"Is Z-DAG just like DASH InstantSend?"

No. Z-DAG and DASH InstantSend are quite different. The only similarity is on the surface; DASH provides a fast means of payment with DASH coins. There are significant differences between the mechanisms involved and the security they offer. With DASH InstantSend, a quorum (randomly selected group of masternodes) are the only nodes responsible for validating transactions that use the InstantSend service, and the inputs involved become locked during that time. The use of a subset of nodes for validation is a big part of what makes InstantSend fast. With Syscoin Z-DAG all full nodes on our network perform validation (not a subset) in-line with the Bitcoin security model, and this is accomplished quickly across a high throughput relay network with nodes also validating in a multi-threaded fashion. Syscoin does not utilize masternodes for special-case validation. Rather, our masternodes simply serve as bonded validators providing a baseline of resources to the network, and perform the same functions as all other full nodes. This is just one part of how Syscoin remains Bitcoin-core-compliant. Furthermore, DASH does not offer a token platform, while Syscoin Z-DAG is focused on offering this fast service to SPTs.

An Engineer's Delight

Z-DAG adds very little complexity. It solves problems endemic across the industry, not by altering mission-critical fundamentals or reinventing the wheel, but through proper tooling and facilitation across the network to maximize the utility of existing resources that are battle-tested (Bitcoin code).

"Why didn't I think of that?"

:shrug:

More Z-DAG Resources

Z-DAG White Paper (note this paper does not reflect all the optimizations that came after)

A recent technical discussion between Jag Sidhu (Z-DAG inventor) and Goncalo Pestana (Lead Brave Software Research Engineer):