Skip to content

Commit 05f0d69

Browse files
committed
chore: add system architect
1 parent 19e846c commit 05f0d69

2 files changed

Lines changed: 1313 additions & 3 deletions

File tree

WHITEPAPER.md

Lines changed: 132 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,136 @@ Our fully on-chain chess implementation leverages MagicBlock's Ephemeral Rollup
4545

4646
## 3. Technical Architecture
4747

48-
### 3.1 Core Program Structure
48+
### 3.1 System Architecture Overview
49+
50+
```
51+
graph TB
52+
subgraph "User Layer"
53+
U1[Chess Player 1]
54+
U2[Chess Player 2]
55+
DEV[Third-party Developers]
56+
end
57+
58+
subgraph "Integration Layer"
59+
SDK[CheckMate TypeScript SDK]
60+
WALLET[Solana Wallets]
61+
UI[Chess UI/Frontend]
62+
end
63+
64+
subgraph "Platform Layer"
65+
INT1[Integrator Platform 1]
66+
INT2[Integrator Platform 2]
67+
INTN[Integrator Platform N]
68+
end
69+
70+
subgraph "Ephemeral Rollup Layer"
71+
ER1[Ephemeral Rollup 1]
72+
ER2[Ephemeral Rollup 2]
73+
ERN[Ephemeral Rollup N]
74+
PROV[MagicBlock Provisioner]
75+
end
76+
77+
subgraph "Solana L1 Blockchain"
78+
subgraph "Chess Program (Anchor)"
79+
GAME[Game Accounts]
80+
PLAT[Platform Config]
81+
INTEG[Integrator Configs]
82+
ESC[Escrow Accounts]
83+
end
84+
85+
subgraph "Token Program"
86+
VAULT[Token Vaults]
87+
MINT[Token Mints]
88+
end
89+
90+
subgraph "System Programs"
91+
SYS[System Program]
92+
RENT[Rent Program]
93+
end
94+
end
95+
96+
subgraph "External Services"
97+
RPC[Solana RPC]
98+
ERRPC[Ephemeral Rollup RPC]
99+
end
100+
101+
%% User interactions
102+
U1 --> UI
103+
U2 --> UI
104+
DEV --> SDK
105+
106+
%% Integration layer connections
107+
UI --> SDK
108+
SDK --> WALLET
109+
SDK --> RPC
110+
SDK --> ERRPC
111+
112+
%% Platform integrations
113+
SDK --> INT1
114+
SDK --> INT2
115+
SDK --> INTN
116+
117+
%% Ephemeral Rollup delegation
118+
PROV --> ER1
119+
PROV --> ER2
120+
PROV --> ERN
121+
122+
%% State delegation flow
123+
GAME -.->|"Delegate State"| ER1
124+
GAME -.->|"Delegate State"| ER2
125+
GAME -.->|"Delegate State"| ERN
126+
127+
%% Commitment flow
128+
ER1 -.->|"Commit State"| GAME
129+
ER2 -.->|"Commit State"| GAME
130+
ERN -.->|"Commit State"| GAME
131+
132+
%% RPC connections
133+
RPC --> GAME
134+
RPC --> PLAT
135+
RPC --> INTEG
136+
RPC --> ESC
137+
RPC --> VAULT
138+
139+
ERRPC --> ER1
140+
ERRPC --> ER2
141+
ERRPC --> ERN
142+
143+
%% Financial flows
144+
ESC --> VAULT
145+
VAULT --> MINT
146+
147+
%% Program interactions
148+
GAME --> ESC
149+
GAME --> SYS
150+
GAME --> RENT
151+
PLAT --> INTEG
152+
153+
%% Styling
154+
classDef userLayer fill:#e1f5fe
155+
classDef integrationLayer fill:#f3e5f5
156+
classDef platformLayer fill:#e8f5e8
157+
classDef rollupLayer fill:#fff3e0
158+
classDef solanaLayer fill:#fce4ec
159+
classDef externalLayer fill:#f5f5f5
160+
161+
class U1,U2,DEV userLayer
162+
class SDK,WALLET,UI integrationLayer
163+
class INT1,INT2,INTN platformLayer
164+
class ER1,ER2,ERN,PROV rollupLayer
165+
class GAME,PLAT,INTEG,ESC,VAULT,MINT,SYS,RENT solanaLayer
166+
class RPC,ERRPC externalLayer
167+
```
168+
169+
The architecture consists of five primary layers:
170+
171+
- **User Layer**: Chess players and third-party developers
172+
- **Integration Layer**: SDK, wallets, and frontend interfaces
173+
- **Platform Layer**: Multiple integrator platforms with custom configurations
174+
- **Ephemeral Rollup Layer**: High-speed execution environments for active games
175+
- **Solana L1 Layer**: Permanent state storage and settlement layer
176+
177+
### 3.2 Core Program Structure
49178

50179
Our chess program implements a comprehensive on-chain gaming system built on Solana using the Anchor framework, with strategic integration points for MagicBlock's Ephemeral Rollup technology.
51180

@@ -119,7 +248,7 @@ The program exposes a comprehensive set of instructions covering the complete ch
119248
- `claim_winnings`: Distribute prize pools to winners
120249
- Automated fee calculation and distribution
121250

122-
### 3.2 Multi-Tenant Platform Design
251+
### 3.3 Multi-Tenant Platform Design
123252

124253
The architecture supports multiple gaming platforms through a sophisticated integrator system:
125254

@@ -153,7 +282,7 @@ This design enables:
153282
- **Analytics and Tracking**: Comprehensive statistics for business intelligence
154283
- **Revenue Sharing**: Automated distribution between platform and integrators
155284

156-
### 3.3 Financial Architecture
285+
### 3.4 Financial Architecture
157286

158287
#### Escrow Mechanism
159288
The system implements a secure escrow mechanism that holds player funds during games:

0 commit comments

Comments
 (0)