Underground 2 Revived
Chrome과 Firefox에서 Need for Speed Underground 2를 WebGPU로 두고 팬 프로젝트입니다
비수탁 USDC 상금 풀, 전술 팀 관리, 실시간 경기주간 점수를 제공하는 경쟁형 판타지 프리미어리그 플랫폼
Competitive fantasy Premier League platform with non-custodial USDC prize pools, tactical squad pitch management, and live gameweek scoring.
게임TypeScript · RustGitHub @Stanley471온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗FantasyXI is an open-source, non-custodial fantasy football platform built on Stellar Testnet and Soroban smart contracts, integrated with live Fantasy Premier League (FPL) data.
Managers assemble squads, compete in custom multi-gameweek leagues, and deposit entry fees directly into a trustless Soroban escrow smart contract. When competition concludes, prize pools (95% distributed 60/30/10 with a 5% platform fee) are settled and disbursed directly on-chain with zero counterparty risk and zero lost cents.
flowchart TB
subgraph Client Layer
Browser[User Browser / Next.js 16 UI]
Freighter[Freighter Wallet Extension]
end
subgraph Backend Application Layer [Express 5 + TypeScript]
AuthSvc[Auth Service: Email/Pass + Google OAuth]
SquadSvc[Squad Validator & Formations]
LeagueSvc[League & Competition Engine]
FplSvc[FPL Upstream Sync & Normalizer]
FinSvc[Financial State Machine & Accounting]
StellarSvc[Stellar & Soroban Verifier Service]
end
subgraph Data Layer
PostgreSQL[(PostgreSQL + Prisma 7)]
FPL_API[FPL Official Upstream API]
end
subgraph Blockchain Layer [Stellar Testnet]
Horizon[Stellar Horizon API]
SorobanRPC[Soroban RPC Node]
EscrowContract[FantasyXI Escrow Smart Contract\nCB4KIK42P32SZHKG...]
UsdcSAC[USDC Stellar Asset Contract\nCBKWOGJ7CQSVZXIO...]
end
Browser -->|JWT Authenticated API Calls| AuthSvc
Browser -->|Squad Selection & Joins| SquadSvc
Browser -->|Freighter Signs invokeHostFunction| Freighter
Freighter -->|Direct Soroban Invocation: deposit()| EscrowContract
FinSvc --> StellarSvc
StellarSvc -->|Verify Envelope XDR & Status| Horizon
StellarSvc -->|Verify On-Chain Ledger State| SorobanRPC
LeagueSvc --> PostgreSQL
SquadSvc --> PostgreSQL
FinSvc --> PostgreSQL
FplSvc -->|Sync Players & Fixtures| FPL_API
FplSvc --> PostgreSQL
EscrowContract -->|Transfer USDC| UsdcSAC
FantasyXI enforces a strict boundary between Web2 application gameplay and Web3 financial settlements:
league_id.AlreadyDeposited, PayoutExceedsDeposits, AlreadySettled, and NotAuthorized.settle) or full refund (refund).deposit).| Component | Identifier / Address |
|---|---|
| Escrow Smart Contract | CB4KIK42P32SZHKG4JBDCJUV4A4KGCDN6RHOOTIFSBGZHS2IF653VOEA |
| USDC Stellar Asset Contract (SAC) | CBKWOGJ7CQSVZXIOIIPCDAUT6APQYBCEE7QTSGDZZ2RO6D3JYRMKWZNG |
| USDC Classic Asset Issuer | GC43IGCUMQYECKMRKGSJE2RPQPJ2QNHFB6VAHNNBO4NONKK3PVHEXN25 |
| Network Passphrase | Test SDF Network ; September 2015 |
| Soroban RPC Server | https://soroban-testnet.stellar.org |
| Horizon API Server | https://horizon-testnet.stellar.org |
The backend runs a PostgreSQL-backed escrow reconciliation every five minutes. It compares confirmed league transactions and active member deposits with the Soroban USDC escrow balance, and cross-checks indexed deposit, settlement, refund, and claim events. Reports and their findings are stored in ledger_audit_runs / ledger_audit_findings; each report includes Horizon, Soroban, and event-indexer ledger sequences and a SHA-256 hash linked to the previous report. High-severity findings are logged as operational alerts. The auditor is read-only and never applies balance corrections.
Staff can review recent reports at GET /api/v1/admin/ledger-audits (ADMIN or MODERATOR). Configure LEDGER_AUDIT_THRESHOLD_STROOPS to set the global balance alert threshold; the default is 100000 stroops (0.01 USDC). Apply the added Prisma models before deploying the auditor with cd backend && npx prisma db push.
4-4-2, 3-5-2, 3-4-3, 5-3-2, 4-3-3, 5-4-1) with a minimum of 1 GKP, 3 DEF, 2 MID, 1 FWD starting.UPCOMING $\to$ ACTIVE $\to$ COMPLETED or CANCELLED.contracts/src/lib.rs)Written in Rust using the Soroban SDK (soroban-sdk = "22.0.8"), exposing 7 contract functions:
initialize(admin, usdc_token): One-time contract initialization.create_league(creator, league_id, entry_fee): Partitions an isolated league escrow.deposit(participant, league_id): Transfers entry_fee from participant via USDC SAC client into contract storage. Requires participant.require_auth().settle(admin, league_id, winners, platform_treasury, platform_fee): Distributes prize pool to top 3 winners and platform treasury. Enforces PayoutExceedsDeposits and transitions status to Settled atomically.refund(admin, league_id, participants): Refunds entry fees to participants in cancelled competitions.get_league(league_id): View function returning on-chain state (creator, entry_fee, total_deposited, participant_count, status).get_deposit(league_id, participant): View function returning participant deposit amount.Managed by PrizeService:
FantasyXI/
├── backend/ # Node.js + Express + TypeScript Backend
│ ├── prisma/
│ │ ├── schema.prisma # PostgreSQL schema & enum definitions
│ ├── src/
│ │ ├── config/ # Database, Stellar, JWT, and CORS configuration
│ │ ├── controllers/ # HTTP Request handlers (Auth, League, Squad, Financial)
│ │ ├── middleware/ # JWT Authentication & authorization guards
│ │ ├── routes/ # Express v5 API routes (/api/v1/...)
│ │ ├── services/
│ │ │ ├── financial/ # FinancialService, StellarService, SorobanContractClient
│ │ │ ├── fpl/ # Upstream FPL synchronization & normalization
│ │ │ └── league/ # LeagueService, SquadValidator, ScoringService, PrizeService
│ │ ├── scripts/ # Phase 7.6 Live Stellar Testnet verification scripts
│ │ └── tests/ # Comprehensive unit & integration test suites
│ ├── package.json # Scripts & backend dependencies
│ └── tsconfig.json # NodeNext strict TypeScript configuration
├── frontend/ # Next.js 16 + React 19 + TailwindCSS App
│ ├── src/
│ │ ├── app/ # App Router pages (leagues, fixtures, team, profile, etc.)
│ │ ├── components/ # UI components, Pitch visualizer, PlayerCard, PaymentModal
│ │ ├── context/ # AuthContext (JWT session management)
│ │ └── lib/
│ │ ├── api.ts # Axios/Fetch API client wrapper
│ │ └── stellar/ # sorobanDeposit.ts (Freighter + Soroban RPC client)
│ ├── package.json # Frontend dependencies (@stellar/freighter-api, @stellar/stellar-sdk)
│ └── next.config.ts # Next.js configuration (Turbopack)
├── contracts/ # Soroban Escrow Smart Contract (Rust)
│ ├── src/
│ │ └── lib.rs # Escrow contract implementation & Rust unit tests
│ └── Cargo.toml # Rust package configuration (soroban-sdk = "22.0.8")
├── tools/ # Local developer tooling (Stellar CLI binaries)
└── REGULATORY_CONSIDERATIONS.md # Legal, AML, and non-custodial compliance documentation
1.75.0+ with target wasm32-unknown-unknownv14+ running locally or via Dockerv22+ installed for contract simulation / executionEnsure PostgreSQL is running and create a local database:
CREATE DATABASE fantasyxi;
Navigate to backend/ and create your .env file:
cd backend
cp .env.example .env
Configure backend/.env:
PORT=5000
NODE_ENV=development
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/fantasyxi?schema=public"
JWT_SECRET="your-secure-jwt-secret-key-at-least-32-chars"
JWT_EXPIRES_IN="7d"
# Stellar Testnet Configuration
STELLAR_NETWORK=TESTNET
STELLAR_HORIZON_URL="https://horizon-testnet.stellar.org"
STELLAR_SOROBAN_RPC_URL="https://soroban-testnet.stellar.org"
STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
STELLAR_USDC_ASSET_CODE="USDC"
STELLAR_USDC_ISSUER="GC43IGCUMQYECKMRKGSJE2RPQPJ2QNHFB6VAHNNBO4NONKK3PVHEXN25"
STELLAR_USDC_TOKEN_CONTRACT_ID="CBKWOGJ7CQSVZXIOIIPCDAUT6APQYBCEE7QTSGDZZ2RO6D3JYRMKWZNG"
STELLAR_ESCROW_CONTRACT_ID="CB4KIK42P32SZHKG4JBDCJUV4A4KGCDN6RHOOTIFSBGZHS2IF653VOEA"
STELLAR_TREASURY_ADDRESS="GC43IGCUMQYECKMRKGSJE2RPQPJ2QNHFB6VAHNNBO4NONKK3PVHEXN25"
Install dependencies, run database migrations, and generate Prisma client:
npm install
npm run db:migrate
npm run build
Start the backend development server:
npm run dev
Backend API will be running at http://localhost:5000.
The frontend is a Next.js app and should be started from the frontend/ directory using a supported Node.js version.
Requirements:
v20.x or v24.xnpmFrom the repository root:
cd frontend
node -v
npm install
cp .env.example .env.local
Configure frontend/.env.local:
NEXT_PUBLIC_API_URL="http://localhost:5000"
NEXT_PUBLIC_STELLAR_NETWORK="TESTNET"
NEXT_PUBLIC_STELLAR_ESCROW_CONTRACT_ID="CB4KIK42P32SZHKG4JBDCJUV4A4KGCDN6RHOOTIFSBGZHS2IF653VOEA"
NEXT_PUBLIC_STELLAR_SOROBAN_RPC_URL="https://soroban-testnet.stellar.org"
NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
Install dependencies and start the local Next.js development server:
npm install
npm run dev
For the current Next.js setup, npm run dev starts the local development server (using the standard Next.js app setup; in v16 this can use Turbopack under the hood). The frontend will be available at http://localhost:3000.
See backend resilience checks for financial chaos testing, read-replica consistency, Redis Streams fanout, and local k6 load testing.
FantasyXI maintains automated test suites across all architectural layers.
Executes domain rules, scoring, formation constraints, tie-breakers, auth, and payment envelope parsing without live network dependencies:
cd backend
npm test
Output: 118 passed, 0 failed across 33 suites
Executes contract unit tests and invariant checks inside the Soroban simulation environment:
cd contracts
cargo test
Output: 6 passed, 0 failed
test_initialize_and_create_league: Validates partition initialization.test_deposit_and_single_settlement: Proves 95/5 payout mechanics.test_duplicate_deposit_rejected: Reverts with AlreadyDeposited (#6).test_settlement_payout_exceeding_deposits_rejected: Reverts with PayoutExceedsDeposits (#9).test_unauthorized_settlement_rejected: Reverts with NotAuthorized (#10).test_refund_cancelled_league: Proves complete token return upon cancellation.Executes a live on-chain competition (create_league, multi-manager deposit, envelope verification, guard assertions, and settle) against Stellar Testnet:
cd backend
npx tsx src/scripts/provePhase76Lifecycle.ts
Results are saved to backend/phase7.6_testnet_evidence.json.
Verifies strict TypeScript compliance and static page optimization:
cd frontend
npm run build
Output: 13/13 static & dynamic routes compiled with zero errors.
The frontend installs as a PWA (manifest + service worker in frontend/public/). The service worker is only registered in production builds:
cd frontend
npm run build && npm start
/team: the squad is shown read-only with an offline banner. Uncached pages fall back to /offline.html.backendNodenpm install && npm run buildnpm start (Runs compiled code via node dist/server.js without dev tooling)DATABASE_URL: Hosted PostgreSQL connection string.JWT_SECRET: Random 64-character secret.NODE_ENV: productionSTELLAR_* configuration parameters.frontend/.Next.jsnpm run build.nextNEXT_PUBLIC_API_URL: URL of your deployed backend.NEXT_PUBLIC_STELLAR_ESCROW_CONTRACT_ID: CB4KIK42P32SZHKG4JBDCJUV4A4KGCDN6RHOOTIFSBGZHS2IF653VOEAinvokeHostFunction transaction envelopes, matching contract ID, function call, sender public key, and league ID.RATE_LIMIT_REDIS_URL (or REDIS_URL) for shared limits across instances; while Redis is unavailable, a bounded conservative in-process limiter is used. Route thresholds and windows are defined in backend/src/config/rateLimit.ts. The higher webhook tier is enabled only on webhook paths when WEBHOOK_RATE_LIMIT_SECRET matches the X-Webhook-Secret header. Authentication endpoints retain a separate strict IP limiter.requirePermission; the role-to-permission matrix lives in backend/src/config/permissions.ts. Roles are USER (managers), MODERATOR, ADMIN and SERVICE (automated callers). Elevated permissions are re-checked against the database on each request, so demoting an account takes effect immediately. A route audit test fails the build if a non-public endpoint is added without a permission guard.This project is licensed under the ISC License. See the LICENSE file for details.
This section helps contributors configure the Stellar Testnet environment locally to interact with Soroban contracts and the USDC Stellar Asset used by FantasyXI.
Network & endpoints:
https://horizon-testnet.stellar.orghttps://soroban-testnet.stellar.orgTest SDF Network ; September 2015Required environment variables (add these to backend/.env and frontend/.env.local as appropriate):
STELLAR_NETWORK (e.g. TESTNET)STELLAR_HORIZON_URL (e.g. https://horizon-testnet.stellar.org)STELLAR_SOROBAN_RPC_URL (e.g. https://soroban-testnet.stellar.org)STELLAR_NETWORK_PASSPHRASE (e.g. Test SDF Network ; September 2015)STELLAR_USDC_ASSET_CODE (e.g. USDC)STELLAR_USDC_ISSUER (classic issuer public key, e.g. GC43IGCUMQYECKMRKGSJE2RPQPJ2QNHFB6VAHNNBO4NONKK3PVHEXN25)STELLAR_USDC_TOKEN_CONTRACT_ID (SAC contract id, e.g. CBKWOGJ7CQSVZXIOIIPCDAUT6APQYBCEE7QTSGDZZ2RO6D3JYRMKWZNG)STELLAR_ESCROW_CONTRACT_ID (Escrow contract id, e.g. CB4KIK42P32SZHKG4JBDCJUV4A4KGCDN6RHOOTIFSBGZHS2IF653VOEA)Creating & funding testnet accounts:
https://friendbot.stellar.org/?addr=YOUR_PUBLIC_KEYcurl "https://friendbot.stellar.org/?addr=G...YOUR_PUBLIC...KEY"Obtaining testnet USDC:
// install: npm install stellar-sdk
const StellarSdk = require('stellar-sdk');
const server = new StellarSdk.Server('https://horizon-testnet.stellar.org');
const pair = StellarSdk.Keypair.random();
console.log('Public:', pair.publicKey());
console.log('Secret:', pair.secret());
// Fund using Friendbot (curl in shell) then create trustline and optionally request test USDC from issuer-owned faucet.
If you follow the steps above you will be able to fund a testnet account and configure your local environment to interact with the Soroban RPC and the FantasyXI escrow contract on Stellar Testnet.
X-Service-KeySERVICE_API_KEYSname:keySERVICEREGULATORY_CONSIDERATIONS.md for legal classifications, skill-game exemptions, and AML operational considerations.Trustline note: Before receiving USDC or interacting with the USDC SAC, ensure your test account establishes a trustline to the USDC asset (unless using contract-controlled flows that don't require a classic trustline). In the Stellar Laboratory, add an Asset with code USDC and issuer GC43IGCUMQYECKMRKGSJE2RPQPJ2QNHFB6VAHNNBO4NONKK3PVHEXN25 and submit a change-trust operation.
Quick example: fund + trustline via stellar-sdk (Node.js)