# Mythos - Web3 Gaming Parachain Documentation

## Why Build on Mythos?

Mythos is Mythical Games’ dedicated Polkadot parachain for Web3 gaming, bringing over 3.6 million existing player accounts and titles like NFL Rivals, Nitro Nation World Tour, and Blankos Block Party into a shared economy that now settles on Polkadot relay chain security.

### **Play-and-Own at Scale**

- 400,000+ monthly active players already engage with Mythical titles, ensuring organic demand for on-chain assets.
- Mythos finalized its migration to Polkadot in September 2024, inheriting relay chain security while unlocking greater throughput for in-game economies.
- Mythical Marketplace processed millions of transactions pre-launch; Polkadot integration adds XCM channels for future loot drops and championships.

### **Cross-Game NFT Interoperability**

- GAM3S’ Mythical Forest became the flagship cross-game quest hub, distributing interoperable cosmetics across the Mythos ecosystem.
- Mythical outlined mandatory migration paths for Blankos Block Party collectibles, guaranteeing existing player items persist on Mythos Mainnet.

### **DAO-Governed Ecosystem**

- The Mythos DAO stewards decision-making on game onboarding, marketplace fees, and ecosystem grants, backed by the MYTH governance token supply.
- Polkadot’s OpenGov approved Mythos’ parachain slot, aligning DAO proposals with parachain treasury workflows.

## Quick Start with Mythos

Connect to Mythos Mainnet over Dwellir’s low-latency infrastructure:

> **Tip:** Sign in to the Dwellir dashboard and **Get your API key** before adding endpoints to production clients.

Use HTTPS for servers and `wss://api-mythos-archive.n.dwellir.com/YOUR_API_KEY` for latency-sensitive WebSocket subscriptions.

### Installation & Setup

@polkadot/api
Subxt (Rust)
Unity (Beamable SDK)

```javascript
import { ApiPromise, WsProvider } from '@polkadot/api';

async function connect() {
  const provider = new WsProvider('wss://api-mythos-archive.n.dwellir.com/YOUR_API_KEY');
  const api = await ApiPromise.create({ provider });

  // Fetch the latest finalized block number
  const finalized = await api.rpc.chain.getFinalizedHead();
  const header = await api.rpc.chain.getHeader(finalized);
  console.log('Finalized block:', header.number.toString());

  return api;
}

connect().catch(console.error);
```

```rust
use subxt::{ OnlineClient, PolkadotConfig };

#[tokio::main]
async fn main() -> subxt::Result<()> {
    let api = OnlineClient::<PolkadotConfig>::from_url(
        "https://api-mythos-archive.n.dwellir.com/YOUR_API_KEY"
    ).await?;

    // Query total issuance for MYTH (Balances pallet)
    let total: u128 = api
        .storage()
        .at(None)
        .await?
        .fetch(&subxt::dynamic::storage("Balances", "TotalIssuance"))
        .await?
        .unwrapping();

    println!("Total MYTH issuance: {total}");
    Ok(())
}
```

```csharp
using Beamable.Server.Clients;
using System.Threading.Tasks;

public class MythosLogin : MonoBehaviour
{
    async Task Start()
    {
        var beamContext = await BeamContext.Default;
        await beamContext.Player.LoginSilent();

        // Fetch Mythos inventory via Beamable's Mythical integration
        var items = await beamContext.Inventory.GetItems();
        Debug.Log($"Items synced from Mythos: {items.Count}");
    }
}
```

> Beamable’s SDK now supports Mythos chain connectivity across Unity projects, streamlining wallet onboarding and in-game asset sync.

## Network Information

| Parameter          | Value          | Details                            |
| ------------------ | -------------- | ---------------------------------- |
| Parachain ID       | 3369           | Assigned via Mythos genesis preset |
| Average Block Time | 6 seconds      | Aura slots tuned for gameplay      |
| Consensus          | Aura + GRANDPA | Relay chain finalized              |
| Native Token       | MYTH           | Governance & marketplace utility   |

Mythos inherits Substrate defaults while enabling 6-second blocks, 10 MB PoV limits, and economics optimized around the MYTH token with weight-based transaction fees.

## API Reference

Mythos inherits the standard Substrate namespaces while layering on gaming-focused runtime calls for NFTs, marketplace activity, and player inventory sync.

## Gaming Features

### NFT & Asset Lifecycle

- `pallet_nfts` enables zero-deposit collection creation, serial minting, and attribute locking to ship seasonal collectibles.
- Developers can gate minting via whitelists or pre-signed approvals, ideal for tournament drops or rarity tiers.

### Cross-Game Compatibility

- Beamable’s Mythos integration syncs player inventory across Unity and Unreal projects, minimizing engine-specific logic.
- Mythical Marketplace analytics show sustained trading volume across titles, ensuring liquidity for interoperable skins.

### Marketplace & Escrow

- `pallet_marketplace` plus `pallet_escrow` facilitate trustless swaps, timed listings, and fee sharing via Mythos DAO policy.
- Example sale: extrinsic `0x6f26cdb2c3398f2cabaa0bf51d3c8ec3f3cbe75ffb8b9b8853718055517b2497` executed `nfts.mint` for a Nitro Nation crate on block 2,611,955.

## SDK Integration Patterns

### Unity & Unreal

- Beamable Mercury SDK adds first-party Unreal support for Mythos inventory endpoints, mirroring Unity parity.
- Use Beamable’s Content flow to push Mythos NFT templates directly into LiveOps campaigns, removing bespoke backend needs.

### Web & Backend Services

- REST backends can leverage `subxt` or Polkadot.js server-side to stream marketplace events and update web portals.
- DotLake analytics confirm 3.3 million Mythos transactions since launch, so plan pagination and caching strategies accordingly.

## DAO Governance

- MYTH staking and proposal voting determine future drops, marketplace fee tweaks, and title onboarding through the Mythos DAO.
- Post-launch, the DAO coordinated token swaps to Polkadot-native assets, aligning treasury with relay-chain liquidity.

## Cross-Game Assets

- Seasonal events like Mythical Forest supply interoperable cosmetics that unlock across NFL Rivals, Nitro Nation, and Blankos, with quests rewarding MYTH-backed NFTs.
- Cross-parachain plans include bridging Mythos assets to Moonbeam and Hydration for DeFi utility once XCM channels graduate from testing.

## Development Guides

- **Game Integration:** Start with the `Subxt` example above, then wire in Beamable or custom wallets to mint NFTs post-level completion.
- **NFT Creation:** Configure collection metadata and mint settings via `pallet_nfts.create` followed by `mint_pre_signed` for controlled drops.
- **Marketplace Setup:** Use `pallet_marketplace` order flows and `pallet_dmarket` signatures to enable player-to-player sales with escrow.

## Troubleshooting

- **Slow Finality:** Verify collator health and check parachain finality vs. relay chain using `chain_getFinalizedHead`.
- **Asset Transfer Failures:** Review NFT attribute locks and collection settings. Locked metadata or expired approvals cause `MethodDisabled` or `ApprovalExpired` errors.
- **High Fees:** `WeightToFee` scales with max(weight.ref\_time, weight.proof\_size). Batch extrinsics or use `pallet_multibatching` to amortize costs.

## Resources & Tools

- Mythos migration FAQ and DAO updates on the Mythical Games blog.
- DotLake analytics dashboards for live broadcast of transactions, accounts, and top collections.
- Beamable SDK documentation for Unity and Unreal integration of Mythos wallets.
