Outputs, Overlays, and Scripts in the Mandala Network

Ty Everett (ty@projectbabbage.com)

Abstract

The Mandala Network's architecture, with its three primary layers — Transaction Processors, Overlay Services, and Transacting Parties — forms a robust framework for managing blockchain transactions. Building upon this foundation, we delve deeper into the concepts of outputs, overlays, and scripts, exploring how they interact within the network to enable a more flexible and scalable blockchain ecosystem.

Outputs: The Declarative Foundation

In the Mandala Network, outputs are the fundamental building blocks of transactions. Each output is a declaration — a set of conditions under which its associated value can be claimed. These conditions are encapsulated within scripts, which are evaluated by the network's edge validators. Unlike traditional transactional models where the flow of value is directly controlled by the sender, in a declarative system, the sender defines the terms, but the actual fulfillment is determined by the recipient's ability to meet those terms.

The declarative nature of outputs shifts the focus from mere value transfer to a more nuanced and flexible interaction. Outputs can represent complex conditions, such as puzzle solutions, service provision, or product delivery. The person or entity creating an output does so with specific terms in mind, anticipating that the value will be claimed by someone capable of fulfilling those conditions. This opens the door for more dynamic and programmable interactions within the network.

Overlay Services: The Curators of Context

Overlay Services act as the curators and managers of the context surrounding outputs and scripts. These services operate on top of the core Transaction Processing Network, providing specialized views and functions that extend beyond the basic capabilities of the blockchain. Each Overlay Service is free to define its own rules, selectively tracking outputs and interacting with Transacting Parties based on its specific goals and requirements.

The flexibility of Overlay Services allows them to scale from small, specialized applications to large, global systems. They can choose to focus on a narrow domain, such as managing a company's inventory, or operate at a broader level, facilitating complex multi-party transactions across various industries. Overlay Services can also form alliances, sharing or trading information about outputs and scripts, or remain isolated, acting autonomously within the network.

Moreover, Overlay Services can integrate out-of-band data to influence their decision-making processes. For example, they might use external data sources to determine the validity or relevance of certain outputs, enhancing their ability to track and manage transactions in a more informed manner. This capability enables them to create rich, context-aware layers that add value to the core blockchain, making the network more adaptable to diverse use cases.

Scripts: The Logic of Interaction

Scripts in the Mandala Network are the logical components that enforce the conditions under which outputs can be claimed. These scripts are embedded within transactions and are evaluated by edge validators as they flow through the network. The flexibility of scripts allows for a wide range of conditions to be expressed, from simple signatures to complex multi-step processes.

In the context of the Mandala architecture, scripts are not just static pieces of code but dynamic tools that interact with both the network and Overlay Services. As transactions move inward through the network, scripts are evaluated, and their results are propagated outward, informing the rest of the network about the state of each transaction. This flow of information ensures that all parties involved in a transaction have access to the latest updates, even as the transaction progresses through various stages of validation and block assembly.

Scripts also play a crucial role in defining the interaction between different Overlay Services. For instance, a script could specify that certain conditions must be met not just within the blockchain but also in an external data source managed by an Overlay Service. This interplay between scripts and overlays enables the creation of complex, multi-layered applications that leverage both on-chain and off-chain data.

The Evolution of the Mandala Network

As the Mandala Network evolves, the interplay between outputs, overlays, and scripts will become increasingly sophisticated. The network's core remains focused on ensuring the integrity and security of transactions, but the outer layers — powered by Overlay Services and governed by the logic of scripts — will drive innovation and adaptability. This architecture allows the Mandala Network to support a wide range of applications, from simple payment systems to complex distributed ecosystems.

In this architecture, outputs serve as the points of interaction, scripts as the logic that governs them, and Overlay Services as the curators of the context in which they operate. Together, these components create a resilient, scalable, and flexible network that can adapt to the needs of its users, whether they are transacting on a small scale or participating in a global, decentralized economy.

Last updated