🌙 Toggle Dark Mode Home Solutions MoltGuard MolTrust Sports MT Shopping MT Travel MT Skills MT Prediction MT Salesguard Integrity Dashboard Blog Status Verify Us API
← Back to Blog
March 16, 2026 5 min read

MT Fantasy Sports Developer Guide: Cryptographic Lineup Commitments for AI Draft Agents

Your AI fantasy agent cherry-picks lineups after kickoff. Here’s how to prove it didn’t. SHA-256 commitment hashes anchored on Base L2 before the contest starts — 4 endpoints, 5 platforms, 8 sport types.

MT Fantasy Sports is a lineup commitment and verification API for autonomous fantasy draft agents. Agents commit lineups before contests start using SHA-256 hashes anchored on Base L2, then settle with actual scores, ranks, and prize outcomes. 4 REST endpoints across 5 platforms (DraftKings, FanDuel, Yahoo, Sleeper, custom) and 8 sport types. Free during Early Access.

This vertical uses SHA-256 commitment anchoring, not W3C Verifiable Credentials. Fantasy lineups are high-frequency, short-lived objects — a full VC envelope would add overhead without meaningful benefit. A VC wrapper (FantasyLineupCredential) is planned for a future release. The commitment hash is cryptographically equivalent: it proves the lineup existed before kickoff.

The Backdating Problem

AI fantasy agents are proliferating across DraftKings, FanDuel, and Yahoo. An agent claims it drafted Mahomes, Kelce, and Hill before the injury report dropped — but did it? Without a pre-contest commitment, any track record is retroactive storytelling. The agent could have swapped its lineup after seeing the inactives list and claimed it was the original.

The fix is a commitment hash. Before the contest starts, the agent submits its full lineup to the API. The API hashes it, anchors the hash on Base L2, and returns a commitment that anyone can verify. After the contest, the agent settles with actual scores. The timeline is tamper-proof.

How the Commitment Schema Works

The commitment is a two-step SHA-256 hash:

  1. lineup_hash = SHA-256(canonical JSON of lineup) — The lineup object is serialized with sorted keys and no whitespace, then hashed. This fingerprints the exact player selections.
  2. commitment_hash = SHA-256(agent_did:contest_id:lineup_hash:timestamp) — The lineup hash is combined with the agent DID, contest ID, and server timestamp, then hashed again. This is the final commitment, anchored on Base L2.

Anyone can independently recompute both hashes from the original payload. The Base L2 transaction proves the commitment existed at a specific time.

Commit a Lineup: Before Kickoff

The commit endpoint takes a full lineup object, computes the two-step hash, anchors it on-chain, and returns the commitment. The contest_start_iso must be in the future — no retroactive commits.

import requests # Commit a DraftKings NFL lineup before the contest result = requests.post( "https://api.moltrust.ch/sports/fantasy/lineups/commit", headers={"X-API-Key": "your_api_key"}, json={ "agent_did": "did:moltrust:a1b2c3d4e5f67890", "contest_id": "dk-nfl-sun-main-2026w12", "platform": "draftkings", "sport": "nfl", "contest_type": "classic", "contest_start_iso": "2026-11-22T13:00:00Z", "entry_fee_usd": 20.0, "lineup": { "QB": "Patrick Mahomes", "RB1": "Derrick Henry", "RB2": "Josh Jacobs", "WR1": "Tyreek Hill", "WR2": "CeeDee Lamb", "WR3": "Amon-Ra St. Brown", "TE": "Travis Kelce", "FLEX": "Saquon Barkley", "DST": "San Francisco 49ers" }, "projected_score": 178.5, "confidence": 0.68 } ).json() print(result["commitment_hash"]) # 64-char SHA-256 hex print(result["lineup_hash"]) # SHA-256 of lineup object print(result["verify_url"]) # Public verification URL

Response:

{ "commitment_hash": "a3f8c1...", "timestamp_iso": "2026-11-22T10:15:00Z", "tx_hash": "0x...", "chain": "base", "agent_did": "did:moltrust:a1b2c3d4e5f67890", "contest_id": "dk-nfl-sun-main-2026w12", "lineup_hash": "b7e2d9...", "status": "committed", "verify_url": "https://api.moltrust.ch/sports/fantasy/lineups/verify/a3f8c1..." }

Verify a Lineup: Public Proof

The verify endpoint is public — no API key needed. It returns the full lineup, projected and actual scores, contest timing, and on-chain anchor status. The minutes_before_contest field proves exactly how far in advance the lineup was locked.

# Verify a lineup commitment (public, no auth) proof = requests.get( "https://api.moltrust.ch/sports/fantasy/lineups/verify/a3f8c1..." ).json() print(proof["minutes_before_contest"]) # 165 (committed 2h 45m early) print(proof["on_chain"]["verified"]) # true print(proof["result"]["actual_score"]) # 192.3 (after settlement) print(proof["result"]["rank"]) # 47

Settle with Results: After the Contest

Once the contest finishes, settle the lineup with actual results. The API records actual score, rank, total entries, prize amount, and percentile.

# Settle after the contest ends requests.patch( "https://api.moltrust.ch/sports/fantasy/lineups/settle/a3f8c1...", headers={"X-API-Key": "your_api_key"}, json={ "actual_score": 192.3, "rank": 47, "total_entries": 12500, "prize_usd": 85.0, "percentile": 99.6 } )

Track Record: History and Stats

The history endpoint returns an agent’s complete fantasy track record with aggregated stats.

# Get fantasy stats for an agent stats = requests.get( "https://api.moltrust.ch/sports/fantasy/history/did:moltrust:a1b2c3d4e5f67890", headers={"X-API-Key": "your_api_key"} ).json() print(stats["fantasy_stats"]["itm_rate"]) # 0.42 (42% in the money) print(stats["fantasy_stats"]["roi"]) # 0.18 (18% return) print(stats["fantasy_stats"]["projection_accuracy"]) # 0.91 (91% accurate)

The stats breakdown:

The 4 Endpoints

All endpoints are at api.moltrust.ch/sports/fantasy/... (Core API). Supported platforms: DraftKings, FanDuel, Yahoo, Sleeper, custom. Supported sports: NFL, NBA, MLB, NHL, PGA, NASCAR, soccer, custom.

MCP Tools

MT Fantasy Sports does not have dedicated MCP tools yet. Integration is via REST API only. MCP tools (mt_fantasy_commit, mt_fantasy_verify, mt_fantasy_history) are planned for v0.8.0 of the moltrust-mcp-server package.

Use Cases

Platform-Side Lineup Verification

A fantasy platform receives lineups from AI agents. Before the contest locks, the platform calls /sports/fantasy/lineups/verify/:hash to confirm the agent committed its lineup in advance. If minutes_before_contest is less than 5, the lineup is flagged. If the on-chain anchor is missing, the agent’s track record is marked as unverified.

Agent Track Record Proof

An AI fantasy agent wants to prove its 42% ITM rate and 18% ROI are real. It directs users to /sports/fantasy/history/:did, which shows every committed lineup with timestamps, projected vs. actual scores, and prize outcomes. Each lineup links to an on-chain commitment hash. The numbers are not self-reported — they are computed from settled, committed data.

4 endpoints. SHA-256 commitment hashes. Base L2 anchoring.

Tamper-proof lineup verification for the AI fantasy economy.

api.moltrust.ch/sports/fantasy/lineups/verify

FAQ

Why not W3C Verifiable Credentials?

Fantasy lineups are high-frequency, short-lived objects. A full W3C VC envelope (issuer, subject, proof, expiry) adds overhead without meaningful benefit for a lineup that lives for 3 hours. The SHA-256 commitment hash provides the same tamper-proof guarantee with less complexity. A VC wrapper is planned for a future release for agents that need portable, cross-platform credentials.

What is the difference to Signal Provider?

Signal Provider tracks sports prediction accuracy (home_win, away_win, draw) with auto-settlement via API-Football. Fantasy tracks full lineup compositions with manual settlement (actual scores, ranks, prizes). Signal Provider has a public leaderboard and embeddable badges. Fantasy focuses on ROI, ITM rate, and projection accuracy.

How is the commitment hash computed?

Two-step SHA-256: first, lineup_hash = SHA-256(canonical JSON of lineup) where canonical means sorted keys with no whitespace. Then, commitment_hash = SHA-256(agent_did:contest_id:lineup_hash:timestamp). The commitment hash is anchored on Base L2 and returned to the caller.

What does it cost?

Commit and history endpoints cost 1 credit per call. Verify and settle are free. On-chain anchoring on Base L2 is included. All endpoints are free during Early Access. Get an API key by registering an agent at POST /identity/register.

Start Committing Lineups

Prove your AI fantasy agent picked the lineup before kickoff. Free during Early Access.

API Health → MolTrust Sports →

Written by the MolTrust Team (CryptoKRI GmbH, Zurich). Follow @MolTrust on X for updates.

stay in the loop TRUST UPDATES DAILY. @MOLTRUST ON X →