# Substrate Framework & Polkadot Parachain

Mosaic Chain is built on **Substrate**, the framework powering Polkadot. By connecting to Polkadot as a parachain, Mosaic Chain inherits security, scalability, and interoperability from one of the most robust blockchain ecosystems.

Here's how it all works together.

***

### **What is Substrate?**

Substrate is a blockchain development framework that lets us build a custom blockchain runtime from the ground up—consensus, governance, assets, and application logic—all optimized for a specific purpose.

Instead of deploying smart contracts on a general-purpose blockchain, Substrate lets us design the entire blockchain architecture. This is why Mosaic Chain can be so specialized for financial applications.

**Key advantages of Substrate:**

* **Modular architecture** - Builds with pallets (runtime modules) that snap together
* **Forkless upgrades** - Upgrades the blockchain without hard forks via runtime upgrades
* **Interoperability-ready** - Native compatibility with Polkadot and XCM
* **Battle-tested** - Powers Polkadot, Kusama, and dozens of parachains

***

### **How Polkadot Works**

Polkadot is a **sharded blockchain network**. Instead of one blockchain trying to do everything, Polkadot connects multiple specialized blockchains—called **parachains**—that run in parallel.

**The architecture:**

* **Relay Chain** - Polkadot's central coordination layer. Validates and finalizes blocks from all parachains. Secured by \~1,000 validators with billions in staked DOT.
* **Parachains** - Specialized blockchains connected to the relay chain. Each handles its own transactions and logic.
* **Collators** - Parachain validators that sequence transactions into blocks, then send them to the relay chain for finalization, and maintain the parachain’s state.

Each parachain processes its own transactions independently. The relay chain coordinates everything, finalizes blocks, and provides shared security to all connected parachains.

***

### **Mosaic Chain as a Polkadot Parachain**

Mosaic Chain is one of Polkadot's parachains. We won a **parachain auction** and secured a slot on Polkadot's relay chain.

**What this means:**

1. **Mosaic Chain validators** (collators in Polkadot terminology) collect and batch Mosaic Chain transactions.
2. **Blocks are sent to Polkadot's relay chain** for validation and finalization by \~1,000 relay chain validators.
3. **Double-checking ensures security** - This two-layer validation process protects Mosaic Chain while enabling trustless interoperability with other blockchains.

**The result:**

* **Shared security** from Polkadot's massive validator set
* **Our own decentralized validator set** (2,000+ validators, when fully onboarded)
* **True interoperability** with other parachains and external blockchains via XCM
* **Forkless upgrades** through runtime upgrades

***

### **Shared Security: How It Works**

Most blockchains have to bootstrap their own security. They need to attract validators, distribute tokens, and hope enough people stake to keep the network secure. It's slow, expensive, and risky—especially for new chains.

Mosaic Chain skips that entirely.

By connecting to Polkadot as a parachain, Mosaic Chain is secured by **Polkadot's validator set**—around 1,000 validators with billions of dollars in staked DOT.&#x20;

**How it works:**

Mosaic Chain validators produce blocks and handle consensus. Polkadot's relay chain validators check the blocks, validate them, and add them to the relay chain for finalization.

This "double-checking" process means Mosaic Chain gets **economic security** from Polkadot's massive validator set, while still maintaining our own consensus mechanism (DPoS) for block production.

Security without the bootstrapping cost. That's the parachain advantage.

***

### **Scalability Through Parachains**

Polkadot's sharded architecture spreads transaction execution across multiple parachains running in parallel. Each parachain processes its own transactions, which means the network scales horizontally as more parachains connect.

Mosaic Chain benefits from this immediately. Instead of competing with thousands of other applications for block space on a single blockchain, Mosaic Chain has its own dedicated execution layer.

This design ensures:

* **Dedicated throughput** for Mosaic Chain transactions
* **No competition** with other applications for block space
* **Horizontal scalability** as Polkadot adds more parachains
* **Fast finality** without sacrificing decentralization

***

### **Interoperability: XCM (Cross-Consensus Messaging)**

One of the biggest risks in crypto is **bridges**. Traditional bridge technologies rely on centralized entities, multisig accounts, and trust—which is why billions of dollars have been lost to bridge hacks.

Polkadot solves this with [**XCM (Cross-Consensus Messaging)**](/documentation/mosaic-chain/architecture-and-technology/interoperability-xcm.md)—a trustless, native protocol for blockchains to communicate and transfer assets.

**How XCM works:**

* **XCM** is a messaging format—a language blockchains use to talk to each other
* **XCMP (Cross-Chain Message Passing)** is the network protocol that delivers XCM messages between parachains
* Two blockchains that "speak" XCM can seamlessly interact using a standard format

**Key XCM features:**

1. **Programmability** - Expectations for messages, version checking, branching, NFT/asset support
2. **Functional Multichain Decomposition** - Remote locking, cross-chain actions, asset namespacing
3. **Bridging** - Universal location system for multi-hop setups, connecting to Ethereum, Bitcoin, and beyond

**For Mosaic Chain, this means:**

* Trustless asset transfers between Mosaic Chain and other parachains
* Programmable cross-chain interactions—not just token transfers, but complex logic
* Bridging to Ethereum, Bitcoin, and Solana via Polkadot's bridge infrastructure

No centralized bridges. No single points of failure. Just native, secure interoperability.

***

### **Forkless Upgrades: Runtime Upgrades**

Blockchain upgrades are usually painful. On most chains, upgrades require **hard forks**—validators download new software, coordinate off-chain, and hope the network doesn't split.

Polkadot parachains, including Mosaic Chain, use **runtime upgrades** instead.

The blockchain's logic is stored **on-chain**. When an upgrade happens, validators automatically switch to the new runtime. No hard fork. No downtime. No coordination chaos.

Mosaic Chain can roll out new features, optimizations, and fixes seamlessly—without disrupting users or validators.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mosaicgalaxy.io/documentation/mosaic-chain/architecture-and-technology/substrate-framework-and-polkadot-parachain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
