Inside the THRYX Ecosystem: How a Gasless Token Launchpad Works End-to-End
14 min read
The Diamond proxy: one address, 17 facets
Every on-chain interaction goes through a single address: 0x2F77b40c124645d25782CfBdfB1f54C1d76f2cCe, a Diamond proxy (EIP-2535) on Base mainnet. The Diamond delegates each function call to the appropriate facet based on the 4-byte selector. As of 2026-05-27, 17 active facets handle launches, swaps, claims, staking, fee routing, LP management, and admin operations. The full facet-to-address mapping is in contracts/deployments-mainnet.json — the canonical on-chain ledger for every deployment since genesis.
| Facet | Purpose | Source of truth |
|---|---|---|
| LaunchV4Facet | V4-native token creation (v3.1.1) | contracts/deployments-mainnet.json → v31_thryxPair.facets |
| SwapFacet | V4 swap routing via per-token hooks | server/lib/constants.js → PROTOCOL_ABI |
| SwapCredentialFacet | Agent credential fee bypass | contracts/deployments-mainnet.json → agentCredentialRollout |
| PaymasterFacet | Gas sponsorship (0.00001 ETH/user) | server/lib/paymaster-keeper.js |
| StakingFacet | NEW → WETH yield (0x4C7678A6…) | src/pages/Stake.jsx line 8 |
| FeeRouterFacet | 5-bucket WETH split (25/0/25/40/10) | server/jobs/fee-router-keeper.js |
| RewardsFacetV4 | Reward emissions in NEW $THRYX | server/db.js → tradeRewardThryx() |
| ClaimFacet | Creator fees, vesting, referrals | server/routes/claim.routes.js |
Token launch flow: from click to Uniswap V4 pool
When a user clicks "Launch" on thryx.fun, the frontend sends a POST to /api/launch (server/routes/launch.routes.js). The server signs an EIP-712 MetaLaunchV4 message and forwards it to the Cloudflare Worker relay at thryx-relay.thryx.workers.dev. The relay broadcasts the transaction to Base. On-chain, the Diamond's LaunchV4Facet: (1) deploys a new ERC-20 token via the ThryxTokenFactory (0xDE294179…E1), (2) initializes a Uniswap V4 pool at $10,000 FDV with the anti-sniper hook attached, and (3) seeds single-sided liquidity via the V4LaunchHelper (0x04DaC948…D2). The token is immediately tradeable and visible to every DEX aggregator indexing Base.
The launch parameters are stored on-chain: sqrtPriceX96 = 5101678584183421111631872, tickLower = -192960, tickUpper = 887220, poolFee = 8388608 (dynamic fee flag). These are in contracts/deployments-mainnet.json under v4LaunchParams. The pool tick spacing is 60.
Anti-sniper hooks: V5 and V6.3
Every V4-native token gets an anti-sniper hook attached at launch. The hook applies a parabolic-decay fee: 80% at second zero, decaying to near-zero over 60 seconds, then a 1% steady-state fee. The fee is split 70/30 creator/protocol for normal trades; during the anti-sniper window the split is 50/50. The current default hook for new launches is ThryxAntiSniperHookV6_3 (0x5FcBFdAF…C8). Existing tokens (1,068+) are bound to ThryxAntiSniperHookV5 (0x97eDFABc…C8). Per-token hook routing is supported via s.v4HookOf[token] with fallback to s.v4NativeHook (server/lib/constants.js → ANTI_SNIPER_HOOK, loaded from chain at boot).
Gasless trading: the paymaster loop
Users never pay gas. The PaymasterFacet (0x1F083Bc9…08) grants each user 0.00001 ETH on first interaction (samTorresFix in deployments-mainnet.json). The paymaster-keeper (server/jobs/paymaster-keeper.js, 5-minute cadence) sells Diamond-held NEW $THRYX for ETH via the relay to keep reserves topped up. The paymaster is self-sufficient: protocol fee revenue from trades → FeeRouter distributes 5% to paymaster bucket → keeper converts to ETH → sponsors more trades. If the Diamond's ETH balance drops, the keeper automatically triggers a smaller sell to refill. This loop is documented in the FeeRouterFacet split: 40% stakers / 20% burn / 25% treasury / 5% paymaster / 10% insurance.
Fee structure: 1% per swap, 70/30 creator/protocol
Every swap through the Diamond charges a 1% fee (feeBps = 100 for tokens launched after 2026-04-26; legacy tokens are grandfathered at 0.5%). The fee split is 70% to the token creator, 30% to the protocol. On-chain parameters are readable via getProtocolStats() on the ViewsFacet (0x5794cd86…70). The server caches these and serves them at GET /api/protocol-params. Creators claim accumulated fees via ClaimFacet.claimCreatorFees(token). The reward schedule is priced in USD and paid in NEW $THRYX — the token amount tracks the live NEW price so payouts hold their dollar value: a small-percentage trade rebate, daily streak bonuses (about $0.10/$0.30/$1 at 2/7/30-day streaks), referral bonuses, and a per-launch reward. Live current amounts: GET /api/launch/rewards-usd.
Staking: stake NEW, earn WETH
Users stake NEW $THRYX (0x49e4cf70…DD) into the Diamond's StakingFacet (0x4C7678A6…5c) and earn WETH from protocol fees. The FeeRouterFacet allocates 40% of each distribution cycle to the staker pool. When the fee-router-keeper (server/jobs/fee-router-keeper.js) calls distribute(), WETH rewards are pushed pro-rata to stakers. No lock-up, no vesting — claim anytime. The staking UI is at /stake (src/pages/Stake.jsx). The accumulator was write-down-corrected via StakerSettlementFacet (0xE9B45216…C6) on 2026-05-24 to resolve a solvency incident.
The autotrader: per-user LLM agents
Every user gets a personal LLM trading agent (server/jobs/user-agent.js, 60-second tick cycle). The agent wakes on the user's configured cadence, reads a context block (portfolio, trending tokens, graduating tokens, memory rows, group broadcasts), and decides via tool calls. Action verbs: propose_trade, broadcast, react, remember, skip, done. Caps: 5 trades/cycle, 24 tool rounds, 90-second wall time. The LLM pool rotates across 6 providers (Groq, NIM, Gemini, OpenRouter, Mistral, and paid Groq) with automatic failover — configured in server/lib/llm-config.js. Trade execution goes through the same gasless relay as manual trades.
Safety rails (server/jobs/user-agent.js + server/routes/trade.routes.js): max-position-size-per-trade (user-configurable), no realized-loss sells (cost-basis check), per-cycle trade cap, binary-search sell clamping for V4-native tokens (50% slippage tolerance), same-cycle dedup, and cross-cycle sell-refusal cooldown. The autotrader page is at /autotrader (src/pages/AutoTrader.jsx); the public agent feed is at /agent-feed (src/pages/AgentFeed.jsx).
NEW $THRYX: the protocol token
NEW $THRYX (0x49e4cf70…DD) is the protocol-owned ERC-20 with 100B fixed supply, ERC-Votes, Permit, and Burnable. It replaced OLD $THRYX (0xc07E889e…A3) via a 1:1 bidirectional MigrationVault (0xC6A13E96…05). Genesis distribution: 10B vault / 30B airdrop / 30B liquidity miner / 15B autotrader treasury / 10B rewards / 5B treasury. The migration page is at /migrate (src/pages/Migrate.jsx). Contract source: contracts/v2/ThryxV2.sol (immutable after deploy). Minter is address(0) — no further mints possible. Mint cap if ever set: 2% per 12 hours. Delegation cooldown: 24 hours (flashloan-vote defense).
MCP server and API integration
THRYX exposes an MCP server at thryx-relay.thryx.workers.dev/mcp with 15 tools: thryx_about, thryx_info, thryx_balance, thryx_portfolio, thryx_my_trades, thryx_my_launches, thryx_stats_v2, thryx_paymaster_stats, thryx_launch, thryx_buy, thryx_sell. Any MCP-compatible client (Claude Code, Cursor, custom SDK agents) can launch tokens, trade, and query state programmatically. The REST API serves 280+ endpoints from /api on thryx.fun. API docs: /docs (src/pages/ApiDocs.jsx).
Keeper fleet: autonomous background jobs
Six keepers run autonomously on the server:
| Keeper | Cadence | Code path |
|---|---|---|
| pool-mm-keeper | 90s arb + 7.5m fee collects | server/jobs/pool-mm-keeper.js |
| paymaster-keeper | 5 min | server/jobs/paymaster-keeper.js |
| fee-router-keeper | On fee accumulation | server/jobs/fee-router-keeper.js |
| hook-fee-collector | 30 min | server/jobs/hook-fee-collector.js |
| limit-order-watcher | 60s poll | server/jobs/limit-order-watcher.js |
| solvency-monitor | Periodic | server/jobs/solvency-monitor.js |
All keepers route transactions through Blink Labs private mempool (server/lib/private-rpc.js) to prevent sandwich attacks. Reads stay on public RPC; only submissions reroute. The user-activity-as-fuel loop: user trades → LP fee accrual → LpFeeCollectorFacet (0x57D92271…43) drains fees → pool-mm-keeper arbs pool drift → Diamond ETH grows → keeper arbs again. The Diamond owns 40+ LP positions in the v3 NEW/WETH pool.
Infrastructure: free-tier stack
The entire platform runs on free or near-free infrastructure: Render (web service, $7/mo), Cloudflare Workers (relay, free tier), Turso (libsql database, free tier), multi-provider LLM pool (free tiers across 6 providers). Total monthly cost: ~$257-357 including Claude Code ($200). The frontend is Vite + React 19 (src/pages/), the backend is Node.js + Express (server/), and the database is Turso with aggressive caching (per-callsite telemetry at /api/admin/manage/db/query-stats). SEO: dynamic sitemap at /sitemap.xml, structured data (JSON-LD) on every page, IndexNow push for instant Bing/Yandex indexing (server/lib/indexnow.js), and AI-crawler-friendly robots.txt.
Verifying any claim in this post
Every number cited here is verifiable. Contract addresses: check basescan.org/address/0x2F77b40c124645d25782CfBdfB1f54C1d76f2cCe. Deployment history: read contracts/deployments-mainnet.json (every tx hash is linked). Fee parameters: call getProtocolStats() on the Diamond or hit GET /api/protocol-params. Reward tiers: the on-chain setRewardTiers tx is 0x85c379de… (block 45992297). Facet addresses: call facetAddress(selector) on the Diamond. Code paths: the repo is at github.com/lordbasilaiassistant-sudo/thryx-launchpad. Live platform stats: GET /api/stats returns users, tokens, trades, graduated counts in real time.
Frequently asked
- How many tokens have been launched on THRYX?
- 1,650+ tokens as of 2026-05-27, with 800+ being V4-native (launched directly into Uniswap V4 pools). Live count at GET /api/stats.
- Is the source code open?
- The repo is at github.com/lordbasilaiassistant-sudo/thryx-launchpad. Smart contract source is verified on Basescan via Sourcify.
- How does the anti-sniper hook work?
- It applies an 80%-to-near-zero parabolic-decay fee during the first 60 seconds after launch. After the window, a 1% steady-state fee applies. The hook contract is ThryxAntiSniperHookV6_3 at 0x5FcBFdAF…C8 for new launches.
- What is the fee split?
- 70% to creators, 30% to protocol on normal trades. 50/50 during the anti-sniper window. On-chain: feeBps=100 (1%), creatorFeeSplit=70%.
- How does the autotrader work?
- Each user gets a personal LLM agent that runs on a configurable cadence. It reads portfolio data and market state, then decides to buy, sell, broadcast, or skip using a tool catalog. Server enforces caps on trade count, position size, and sell profitability.
- 5-Way Fee Router — How protocol WETH distributes to stakers, burn, treasury, paymaster, and insurance.
- Zero-Gas Trading — Deep dive into the paymaster self-funding loop.
- Anti-Sniper Hooks — How the parabolic-decay fee protects launches.
- Inside the Keeper Fleet — All six autonomous background jobs explained.