Perpetual Futures Glitchan AI trading desk for its holders
𝕏Get PFG

PFG Documentation

Everything the desk does, exactly as implemented β€” the AI engine, the risk rails, the payout mechanics, and the addresses to verify it all on-chain. If a claim on this page can't be verified in the live dashboard, the journal, or on Solana explorers, we consider that a bug.

Overview

Perpetual Futures Glitch (PFG) is a Solana token whose treasury is traded by an AI-managed perpetual futures desk. The loop is simple:

  1. The treasury is held as USDC margin on Imperial (a Solana perp router) and runs a focused book of concurrent positions across crypto, commodities, and stocks β€” long or short, up to 8Γ— leverage (2–4Γ— typical). Idle margin earns lending yield between trades.
  2. An AI strategy engine β€” Claude (Opus-class frontier model) β€” reviews the whole book every 20 minutes (open, trail, bank, close), inside hard risk limits enforced by code. It trades patiently: most cycles it changes little, because fees are the desk's biggest cost.
  3. Whenever the desk banks net-new realized trading profit, it is split 50/50: half airdropped to PFG holders pro-rata in SOL (no staking, no claiming), half used to market-buy PFG and burn it β€” permanent supply reduction.
  4. Separately, LP fees from the PFG/SOL Meteora pool are claimed hourly: 10% is airdropped to holders as a SOL dividend and 90% compounds into the desk, growing the treasury over time.
Rollout status: the desk trades the full crypto universe today. Commodity and equity markets are wired in and switch on as Imperial's order-routing for those venues stabilizes β€” until then those opens are simply skipped, never forced.

Holding PFG in any normal Solana wallet is the entire requirement. Every decision the AI makes β€” including its reasoning β€” is published in real time on the live dashboard.

The desk is fully observable: the live position, the decision journal, round-by-round history, and every airdrop transaction are public. We publish losing decisions with the same prominence as winning ones.

The desk lifecycle

The keeper runs three loops, fastest to slowest:

LoopCadenceWhat it does
Guard tickevery 30sRefreshes the dashboard state and enforces local protections that need no AI: the stop-loss set at open, liquidation detection, and the daily drawdown kill-switch. Runs even if the AI or its API is unreachable.
Decision cycleevery 20 minBuilds multi-asset market context + the current book, asks the AI for a portfolio plan (a list of per-asset orders), clamps each through the risk rails, executes on Imperial, and publishes the plan + reasoning to the journal. Standing pat is a normal, common outcome.
Profit sweepevery 5 minChecks Imperial's lifetime realized PnL; whenever it sets a new high-water mark, ships only that net-new realized profit off Imperial, converts to SOL, runs the 50/50 airdrop + buyback-burn, and claims Meteora LP fees (hourly). Positions are not force-closed β€” the AI decides when to exit. Principal stays parked on Imperial earning yield.

This separation matters: trading is decoupled from distribution. The AI can hold a winner across many hours while the sweep only ever pays out profit that has actually been realized by closing (or partially closing) positions.

The AI strategy engine

Model

Decisions are made by Claude Opus 4.8 (Anthropic's frontier model) called via API with schema-constrained structured output β€” the model must return a valid, typed decision object; free-text answers are impossible by construction.

Inputs (every cycle)

  • Multi-asset market structure for the whole tradable universe, across three timeframes (15m / 1h / 4h): last price, EMA-20 vs EMA-50 trend state, RSI-14, ATR volatility (% of price), recent highs/lows, and percent change. Crypto candles come from Binance/Coinbase; stocks, commodities and FX from Twelve Data.
  • The current book: every open position (asset, class, side, leverage, entry, mark, stop, unrealized PnL, R-multiple, age), free margin, deployed capital, positions used, opens today, and whether the kill-switch is active.
  • Its own recent history: the last several rebalances and what the rails actually executed β€” so churn and over-concentration are visible to it.

Output (the portfolio plan)

The model returns a portfolioView, public reasoning, and a list of actions β€” one per asset it wants to change this cycle (assets it leaves alone are simply omitted). Each action carries:

FieldMeaning
assetWhich market the order targets (e.g. BTC, ETH, XAU, AAPL).
actionOPEN_LONG Β· OPEN_SHORT Β· CLOSE Β· PARTIAL_CLOSE Β· UPDATE_STOP. Partial closes bank profit into the payout pool while the rest rides; stop updates may only tighten.
leverage2–8Γ—. The engine prefers 2–4Γ— and reserves higher leverage for high conviction β€” funding fees accrue on notional every hour held.
sizeFractionFraction of free margin to commit as collateral (capped at 25% so the book stays diversified).
stopLossPct / closeFractionStop distance from entry (enforced by the guard tick); slice to realize on a partial close (10–75%).
confidence0–1. Opens below 0.5 are rejected by the rails.

Discipline baked into the prompt

  • Fees are real: a round-trip costs ~0.12–0.2% of notional plus slippage (more for shorts, which swap collateral). The engine is told overtrading bleeds the treasury and that HOLD is usually correct.
  • Volatility-aware sizing: high ATR β†’ lower leverage, smaller size, wider (but liquidation-safe) stops.
  • No prediction claims: the model is explicitly instructed that it manages exposure and risk, not foresight β€” and that holders read its reasoning, so hype is banned.
  • Diversified, always-deployed posture: the desk is instructed to run several uncorrelated positions across assets and classes, size each modestly, and express uncertainty through leverage and size rather than sitting flat. It rotates assets only on a genuinely better setup, not for marginal reasons.
The AI proposes; the code disposes. Every decision passes through the risk rails below before a single lamport moves β€” the model cannot exceed them no matter what it outputs.

Risk rails (enforced in code)

RailValueBehavior
Leverage cap8Γ— per positionAnything above is clamped down. Funding fees accrue on notional (collateral Γ— leverage) every hour held, so leverage is kept modest β€” 2–4Γ— is typical, 8Γ— reserved for high conviction.
Max concurrent positions10Hard ceiling on open positions, so the book stays focused and diversified rather than over-concentrated.
Per-position size cap25% of free marginNo single open can dominate the book; encourages spreading risk across assets and classes.
Mandatory stop-lossevery openA stop is set at open and enforced by the 30-second guard tick on every position, capped inside liquidation distance (≀80% of the way to liq). Works even if the AI API is down.
Auto-breakeven trailat +1ROnce a position has moved one full stop-distance in profit, its stop automatically moves to entry β€” that trade can no longer turn into a loss. The AI may trail it tighter, never looser.
Confidence floor0.55Low-conviction opens are rejected β€” the desk only takes setups it would genuinely defend.
Daily open cap30 / dayCeiling on opens across the whole book; the primary brake on fee-bleed from churning.
Portfolio kill-switchβˆ’30% trading PnL in a dayMeasures realized + open trading PnL across the whole book against treasury size β€” deposits/withdrawals can't trigger it. Flattens every position immediately and pauses trading for 3 hours.
Gas reserve1 SOLHeld in the wallet for transaction fees and the distribution rail; never traded.
Liquidation detectioncontinuousIf a position is liquidated, the loss is booked against the payout accumulator and journaled as LIQUIDATED.

Profit distribution

What gets paid

Only realized PnL β€” the actual SOL difference between what a position cost to open and what closing it returned, fees included. Unrealized gains are never distributed; they aren't money yet.

The high-water rule

Realized results accumulate in a signed ledger. A losing trade drives it negative, and no airdrop goes out until the desk has earned the loss back. This makes it impossible for the desk to pay holders out of principal.

The 50/50 hybrid split

Each time the desk sets a new realized-profit high-water mark, the net-new profit is split in half:

  • 50% airdrop: distributed pro-rata by PFG balance as plain SOL straight to each holder's wallet β€” batched 10 transfers per transaction, 5 transactions per batch, in parallel. No claim step, no gas paid by holders, no expiry.
  • 50% buyback & burn: market-buys PFG on the PFG/SOL pool and immediately burns the purchased tokens via the Token-2022 burn instruction β€” buy pressure plus permanent supply reduction, every profitable hour. Only the freshly-bought tokens are burned; treasury-held PFG (e.g. LP-fee accruals) is never touched.

Both legs are fully on-chain: airdrops as SOL transfers from the treasury, burns as a swap + burn transaction pair you can verify against the token's declining supply.

Eligibility

  • Any on-curve wallet (a normal keypair wallet) holding PFG at sweep time.
  • Excluded: off-curve addresses (liquidity pools, program vaults, PDAs) and the treasury itself β€” so rewards only reach real holders.
  • Dust allocations below ~0.000005 SOL are skipped (they'd cost more in fees than they deliver).

LP fee compounding

The treasury owns a locked liquidity position in the PFG/SOL Meteora DAMM v2 pool. Trading in the pool accrues fees to that position in both tokens, and the desk claims them every hour:

  • SOL-side fees are claimed into the treasury. 10% is airdropped straight to PFG holders as a SOL dividend; the remaining 90% compounds into the desk with the next position β€” so the treasury grows while holders earn from LP revenue every hour, independent of trading results.
  • PFG-side fees are held by the treasury and never market-sold, so fee compounding creates no sell pressure on the token.

This gives holders a second income stream β€” a continuous SOL dividend that flows even in hours when the desk is flat or its trading PnL is below the high-water mark, so holders are never waiting on a single source to get paid.

Treasury accounting

  • Unit of account is USD. NAV = free USDC margin on Imperial + every open position's equity (collateral + unrealized PnL, reported directly by Imperial) + the SOL gas reserve valued at the live price.
  • Realized PnL from position economics: when a position is closed (fully or partially), realized PnL is read straight from Imperial's reported position PnL for the slice closed β€” not inferred from wallet balance deltas, which makes it robust to deposits/withdrawals happening at the same time.
  • Principal stays parked, profit ships out: on a close, the position's principal is recredited to margin (so it keeps earning yield and stays deployable) while the realized profit is set aside and shipped to the wallet on the next profit sweep, converted to SOL, and distributed.
  • The high-water rule: realized results accumulate in a signed ledger; a loss must be earned back before any payout. Capital that enters the treasury any other way (LP fees, top-ups) can never be misclassified as trading profit.

Launchpad β€” perp-backed tokens

The same machine that trades the PFG treasury can be pointed at any token. On the launchpad anyone can mint a token whose treasury runs a live basket of perpetual positions on Imperial β€” and whose trading fees are recycled into that basket, into the token's holders, and into PFG.

Launching

You build a basket β€” any mix of longs and shorts across Imperial's crypto, commodity, equity and FX markets, with a percentage allocation and leverage (up to 15Γ—) per leg. You set the name, symbol and image; the metadata is pinned to IPFS. You sign and pay the on-chain creation cost, the token is minted on a Meteora Dynamic Bonding Curve under PFG's platform config, and a dedicated treasury wallet is provisioned for your basket.

Strict, no AI. Unlike the PFG desk, a launch basket is not managed by the model β€” it runs exactly the legs, allocations and leverage the launcher set. The automation only claims fees, funds the basket, realizes profit on schedule, and pays holders.

The fee split

Every fee the token generates (the bonding-curve fee pre-migration, the post-migration tax) is claimed by PFG and split four ways:

SliceWhere it goes
70%The token's own treasury β€” swapped to USDC and deployed into its basket on Imperial.
10%A direct SOL dividend to the token's holders, pro-rata β€” paid straight from the fee stream as plain SOL transfers (no Imperial round-trip, no fees, no claiming).
10%PFG buyback & burn β€” every launch adds buy pressure and permanent supply reduction to PFG.
10%PFG treasury.

How holders get rewarded

A launch pays its holders through two streams β€” and neither relies on the token's price going up:

  • The SOL dividend (continuous). 10% of every fee claim is airdropped to holders pro-rata, in SOL. The more the token trades, the more its holders earn β€” fee-free, the moment fees are claimed.
  • Realized basket profit (every 3 days). The treasury holds its basket and, on a fixed 3-day cadence, realizes the profit on each winning leg. Half of each realized gain market-buys the token on its own curve (buy pressure for holders), and half is airdropped to holders as SOL. The cadence is deliberate: realizing on a schedule rather than on every tick keeps Imperial's open/close fees a tiny fraction of the gain.
Leverage is the launcher's choice, capped at 15Γ—. Even at the cap, an adverse move can liquidate a leg β€” the basket trades real, leveraged positions and its treasury can shrink. The dividend stream keeps paying holders regardless, but the basket itself carries the same risks as the main desk, amplified by whatever leverage the launcher picked.

Every token gets a page

Each launch has its own page at pfglitch.com/{token address} β€” a live price chart, the bonding-curve progress, the basket with per-leg collateral / position value / live PnL, and the running payout stats (fees claimed & split, SOL dividend, basket profit realized, native buyback). Browse them all on the tokens directory.

The PFG token

PFG is a Token-2022 SPL token on Solana mainnet. Holding it is the only requirement to receive distributions β€” there is no staking contract, no lockup, and no registration. Your share of each airdrop equals your share of the eligible supply at that distribution's snapshot.

Contract addressAlways verify against our X before trading.

Liquidity: the primary market is the PFG/SOL Meteora DAMM v2 pool (whose fees compound the desk β€” see above). Follow @PFGlitch for announcements.

Contracts & addresses

WhatAddress
PFG token (Token-2022)BCoSEzdw7pFLguWjBBXxLcgsV7J5wQeYSHG6YFQEPFG
Treasury / desk wallet6rCzKkKyYUTEX4cw3yBS9ShLYrvPUoo9Hb67wfkhB1Wc
PFG distributor programpysdB3EVTEvGB33AMu68TLAqvb1MneNfbjRDBmVperp
Meteora DAMM v2 LP positionE8s9BDcnKJbnU5mrca4R4TWVKfLLn4q54RVoXxLdPQKs
Trading venueImperial perp router β€” pASsDHVUtgG5uomQ29SVMv1sQxon4Gi6g5bJV7KKqZ8 (routes to Jupiter / Flash / Phoenix / GMTrade)

Every airdrop appears as plain SOL transfers from the treasury wallet; every trade appears as an Imperial order routed to the underlying perp venue from the same wallet. Audit at will on Solscan or any Solana explorer.

Distributor program status: the on-chain program at pysd…perp is a deployed Merkle-claim distributor (admin: the treasury). Current profit distribution uses direct airdrops instead, and the program is reserved for a planned burn-to-redeem upgrade β€” burning PFG for a pro-rata share of treasury NAV. That upgrade is not live yet; we'll document it here when it ships.

Public API

Everything the dashboard shows is available as JSON at https://api.pfglitch.com β€” no key required:

EndpointReturns
GET /api/statsLive desk state: NAV (USD), free margin, the full book (every position β€” asset, class, side, leverage, entry/mark/stop, uPnL, R-multiple, age), total airdropped, PFG burned, next rebalance & sweep timestamps, kill-switch status.
GET /api/journalThe decision feed: every AI rebalance (portfolio view, reasoning, the per-asset actions applied) plus risk events (stops, kill-switch, liquidations, closes, burns), newest first.
GET /api/roundsHourly round history: per-round realized PnL, amount airdropped, recipients, PFG burned, LP fees compounded β€” plus all-time totals.

Build bots, trackers, or dashboards on it. Data refreshes continuously from the live keeper.

Risks & disclaimers

  • Leverage risk. The desk trades up to 8Γ—. Stops and the kill-switch bound but do not eliminate loss; a violent gap can liquidate a position before the stop fills. Treasury principal can shrink β€” in adverse conditions, severely.
  • Model risk. The AI manages exposure; it does not predict markets, and no one can. Expect losing decisions, losing hours, and losing streaks β€” they will be visible in the journal, on purpose.
  • Venue & protocol risk. The desk depends on Imperial and the perp venues it routes to (Jupiter, Flash, Phoenix, GMTrade), Meteora, and Solana itself. Venue downtime can block or delay opens and closes; smart-contract bugs, oracle failures, or network outages are real risks.
  • Infrastructure risk. The keeper is an off-chain process. It is supervised, auto-restarting, and its protections (stops, kill-switch) run locally β€” but downtime can still delay decisions or sweeps.
  • No guarantees. Past payouts do not promise future ones. PFG is not an investment contract offering; nothing here is financial advice. Only commit what you can afford to lose entirely.