> For the complete documentation index, see [llms.txt](https://luck45-v1-0.gitbook.io/luck45-v1.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luck45-v1-0.gitbook.io/luck45-v1.0/overview/interactive-blocks.md).

# 3. Product Architecture

🎮 Modular structure × Diverse game types × User value accumulation × Composable protocol design

### 🧱 3.1 Core Objective: Build a Scalable, Growth-Oriented On-Chain Entertainment Protocol

Lucky 45 is not just a standalone lottery DApp — it's a protocol system designed around verifiable, on-chain lucky games. It is built with three core goals:

| Objective                 | Description                                                                                                                   |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| 📈 Growth Engine          | Every user action accumulates into points, collectibles, assets or governance power — forming a “play-to-asset” feedback loop |
| 🧩 Gameplay Extensibility | Modular structure allows seamless expansion from lottery to card draws, minigames, and social prediction modules              |
| 🌐 Protocol Composability | Future SDK/API support will allow wallets, games, and external platforms to integrate Luck gameplay components                |

***

### 🔧 3.2 Layered System Architecture

Lucky 45 consists of four interconnected layers. Each layer is independently upgradable and fully verifiable on-chain:

```
▸ User Layer: Frontend experience & social interaction  
▸ Game Layer: Core game logic — lottery, scratch cards, fast draws, card collection, mini-games  
▸ Incentive Layer: Luck point system, team-based binding, leaderboard mechanics  
▸ Protocol Layer: Smart contract logic for randomness, fund flows, action logs, and identity tracking  
```

📌 All data and actions are auditable on-chain via explorers and dashboards.

***

### 🎮 3.3 Phase 1 Gameplay Modules

At launch, Lucky 45 integrates five core lucky game mechanics:

| Module            | Type                      | Description                                                                                       |
| ----------------- | ------------------------- | ------------------------------------------------------------------------------------------------- |
| 🎯 Challenge Draw | Low-frequency, high-prize | Daily draw; users pick 6 red + 1 blue numbers; 5-tier rewards; jackpots up to millions in USDT    |
| ⏱ Fast Draw       | High-frequency, quick-bet | Every 60 seconds; bet on even/odd, big/small, combinations; up to 9x payout; fast entry model     |
| 🎫 Scratch Cards  | Instant-reveal            | Buy and scratch instantly; multiple price tiers and win combinations; bulk purchase supported     |
| 🧧 Card Collect   | Point-driven              | Use PP to draw from a Zodiac card pool; collect all 12 to share in the daily bonus pool           |
| 🧠 Team System    | Social/viral structure    | Users bind to an invite code and form teams; points and rank benefits flow through team hierarchy |

> ✅ Every module is tightly coupled with the point system, team mechanics, and leaderboard structure — creating a complete participation flywheel:\
> **user action → point generation → asset conversion → reward distribution**

***

### 🧩 3.4 Technical Architecture – On-Chain Verifiability

All core functions in Luck 45 are executed via smart contracts, with transparent logic and auditability:

**1. Verifiable Randomness – Fair Draw Engine**

Luck 45 uses a multi-source random number structure for draw outcomes:

```
Final Result = keccak256(Block Hash + Chainlink VRF + Platform Hash Salt)
```

| Source        | Description                                                |
| ------------- | ---------------------------------------------------------- |
| Block Hash    | Ethereum block hash — unpredictable and tamper-proof       |
| Chainlink VRF | Decentralized verifiable randomness from oracle            |
| Platform Hash | Additional entropy salt to prevent prediction              |
| Final Output  | All components are hashed using keccak256 for draw outcome |
| Verification  | Users can independently re-run the process on-chain        |

🎯 This ensures that **no party — user, platform, or oracle — can control or manipulate the outcome.**

***

**2. Wallet & Account Binding System**

* Supports AA Wallet, email-based login, or one-click web wallets
* Each login creates a custodial wallet address for asset storage & reward collection
* Future upgrade: full Account Abstraction (ERC-4337) for gasless user actions

***

**3. Luck Points System**

* Earn points through betting, referrals, team activity
* Use points to draw cards, climb leaderboards, or unlock NFT perks
* Future mapping to governance participation and $LUCK45 airdrop eligibility

***

**4. On-Chain Behavior Tracking**

* Every bet, win, referral, and leaderboard change is recorded on-chain
* Users can verify historical actions via explorer or dashboard
* Ensures auditability, attribution, and real-time trust transparency

***

### 🌐 3.5 Future Extensibility – Composable Protocol Layer

Luck 45 is designed as a **composable gaming protocol**, not a closed product. Future integrations include:

| Component                 | Use Case                                                     |
| ------------------------- | ------------------------------------------------------------ |
| Draw Contract SDK         | Embed draw mechanics in wallet mini-apps or gaming frontends |
| NFT Verification Module   | Use NFTs to gate features or bind game identities            |
| Custom Prize Pool Adapter | Allow devs to launch themed or external prize pools          |
| Leaderboard Plugin        | Integrate ranking & reward logic into partner platforms      |

📌 Our long-term vision is for Luck 45 to become **“Web3’s entertainment toolbox”** — powering lucky games across apps, wallets, and dApps globally.
