コンテンツへスキップ

基本概念

アーキテクチャ

SatoriExがどのように構築されているかの高レベルマップ。システムの形状を共有することで、得られる保証について推論できます。特定のベンダーと製品の選択は意図的に省略しています。

このページの読み方

Three layers. The Edge handles security and routing. The Core runs the application and matching logic. Data & Chain stores balances and history, with a public-blockchain bridge for deposits, withdrawals, and (planned) self-custody. Most trades complete entirely inside the Core; only deposits and withdrawals touch the chain.
EDGECOREDATA & CHAINユーザーEdgeTLS · レート制限 · ジオ · WAFGatewayルーティング · ヘルスWebユーザー向けアプリAPI注文 · 残高 · 認証Matcher価格・時間優先Workers決済 · 通知 · スケジュールジョブDB台帳 · マーケット · ユーザーCache & Queueホットデータ · レート · 注文パイプラインChainUSDCブリッジ · アウトカムトークンカストディアル取引フローオンチェーンブリッジフロー
高レベルコンポーネント図。実線はカストディアル取引フロー。破線はオンチェーンブリッジフロー。

Swipe left or right to see the full diagram.

3つのレイヤー

各レイヤーは単一の仕事を持ちます。境界が明示的なので、他に触れることなく任意の部分を置き換えられます。

Edge

境界を守る

TLSを終端し、レート制限とジオルールを適用し、正常なリクエストをGatewayに転送します。Edgeは唯一の公開サーフェスです。その背後は全てプライベートです。

Core

アプリケーションを実行する

WebアプリはUIを提供し、APIはリクエストを認証してビジネスロジックをオーケストレーションし、Matcherは価格・時間優先で買い手と売り手をマッチングし、Workersは決済、通知、スケジュールジョブを処理します。各々が別プロセスなので障害が封じ込められます。

Data & Chain

状態を保持しチェーンにブリッジする

残高と履歴は複式帳簿台帳としてデータベースに存在します — 全変更は借方と貸方であり、片側への書き込みはありません。キャッシュとキューがホット読み取りと注文パイプラインの前に位置します。ブロックチェーンは資金がシステムに入出するか、ユーザーがセルフカストディを望む場合にのみ関与します。

API内部のレイヤー構造

APIサーバー内部ではクリーンアーキテクチャレイアウトに従います。ドメインエンティティは外部への依存がゼロです。ビジネスロジックはドメインのみに依存します。トランスポート(HTTP、イベント)とインフラ(データストア、チェーンクライアント)はビジネスロジックに依存し、逆方向は決してありません。

Domain   ──▶   App           ──▶   Adapter             ──▶   Infra
entities       business logic       transport boundary         data stores
no imports     orchestration        request / response         DB · Cache · Queue · Chain

依存関係は内側を向いています。ドメインはHTTPサーバーもデータベースも存在することを知りません。

カストディアル対セルフカストディ

Custodial trading is fast and free of per-trade gas: matching and the ledger live inside the Core. Linking an external wallet today gives you an on-chain deposit/withdrawal path — your USDC moves between the wallet and the SatoriEx ledger across the chain, and a gas fee applies on each move. Trading itself still runs inside the Core in either case. A full self-custody trading mode — where outcome shares are represented on-chain as ERC-1155 CTF tokens during the position — is on the roadmap (see Contracts and Changelog); it is not active today.