Build on the agent perps protocol.
Everything you need to trade perpetuals, provide liquidity, settle positions on-chain, and wire up autonomous AI agents over x402 — explained end to end, for both humans and machines.
Start here
Overview
Zetaperps is the Solana AI agent perps protocol — a perpetuals exchange that connects four parties through one program: traders who want leveraged exposure, liquidity providers who back the vault and earn fees, $ZETA holders who earn protocol fees, and autonomous AI agents that trade directly over x402.
Traders and agents open long or short positions with up to 50x leverage on crypto, FX, and index markets. Zetaperps prices off oracles, manages funding, enforces margin, and settles PnL on-chain. Liquidity providers deposit into a shared vault to become the counterparty to every trade and earn trading fees and funding. The goal: turn deep on-chain liquidity into fast, low-fee leverage that any agent can trade into directly.
Chain
Solana mainnet — Anchor program, SOL settlement.
Interface
The web console, the Zetaperps API, or any x402 agent.
Custody
Non-custodial. Collateral escrows in-program, not with us.
Fees
2 bps taker fee per fill, plus market funding.
Architecture
How it works
Every position flows through the same on-chain stages, whether it comes from a human in the console or an autonomous agent over x402.
1 · Intent
The exchange reads your order — market, side, leverage.
2 · Oracle price
Entry is marked to the market’s Pyth oracle feed.
3 · Margin check
The program verifies maintenance margin for your leverage.
4 · Escrow
Collateral is held by the program while the position is open.
5 · Settle
On close or liquidation, PnL, funding, and fees settle in SOL.
For traders
Trading perps
Open a position from the console or through the API. Zetaperps quotes the entry off the oracle and shows your liquidation price before any collateral leaves your wallet.
/long SOL-PERP
leverage: 10x
collateral: 5 SOL
→ entry: $182.40 · liq: $166.10 · funding +0.011%/h
→ confirm? yesSides are long, short, and hedge. Markets cover crypto, FX, and indices. Position updates and PnL stream back to your chat or the console in real time, and you can close or add margin at any block.
For LPs
Liquidity vaults
Deposit into the Zetaperps vault and you become the counterparty to every trade the protocol clears. There is no lockup and no whitelist — your share earns trading fees and funding, with risk netted across all markets.
zetaperps lp deposit \
--vault genesis \
--amount 100 \
--wallet ~/.config/solana/id.json
→ share minted · est. APR 22.4% (fees + funding)Fees and funding accrue to your vault share in SOL. Utilization rises when traders are net leveraged, increasing the yield the vault earns for taking the other side.
Trust layer
Reputation oracle
Zetaperps writes a 300–850 reputation score to an on-chain oracle for every trader and agent, derived from five signals. The score is portable — it follows the wallet — and readable by any other protocol.
Win rate
Share of closed positions in profit over time.
Discipline
Healthy margin usage and stop adherence.
Survival
Closed vs. liquidated positions.
Volume
Total notional traded and settled on-chain.
Realized PnL
Net realized performance across markets.
Higher scores unlock more leverage, fee rebates, and early market access. Tiers: Bronze 300–499, Silver 500–649, Gold 650–749, Platinum 750–850.
Payments
On-chain settlement
When you open a position, your collateral is escrowed by the Anchor program. On close or liquidation the program marks to the oracle, settles PnL and funding, deducts the protocol fee, and updates your reputation — all in a single transaction.
pub fn close_position(ctx: Context<ClosePosition>) -> Result<()> {
let position = &mut ctx.accounts.position;
let price = ctx.accounts.market.oracle_price()?;
let pnl = position.realized_pnl(price);
// settle PnL + funding, take fee, update score …
Ok(())
}For agents
AI agents
Zetaperps is built agent-first. For an AI agent, the protocol is a programmable trading layer: it can open, hedge, and close positions, pay fees per action, and run autonomous strategies — no human in the loop, no accounts, no custody, no API keys. The payment proof is the authorization.
const pos = await zetaperps.open({
market: "SOL-PERP",
side: "long",
leverage: 10,
collateral: "5 SOL",
})
// agent pays fees via x402, monitors, then closes
const result = await pos.close()Agents read live markets, the oracle price, funding, and their own reputation score, then act on a schedule or in response to signals. Because every action settles on-chain and is metered by x402, a fleet of agents can trade Zetaperps continuously without a single shared secret.
Standard
x402 payments
Agents pay trading fees per action using the x402 payment standard. There are no API keys and no accounts — the payment proof is the authorization. This makes Zetaperps a programmable perps layer that agents can trade into directly.
POST /v1/positions
402 Payment Required
x402: solana; amount=0.0002; to=zetaperps…; nonce=…
# retry with payment proof header → 200 OKReference
API reference
POST /v1/positions
Open a position. Returns a quote or 402 for agent payment.
GET /v1/positions/:id
Poll position status, PnL, and liquidation price.
GET /v1/markets
List live markets with oracle price and funding.
GET /v1/score/:wallet
Read a trader or agent reputation score from the oracle.
Token
$ZETA token
Anyone holding $ZETA earns 50% of every protocol fee — including fees paid by autonomous agents over x402 — distributed automatically to wallets with no staking, no claim, and no signing. Snapshots happen periodically and SOL hits your wallet directly.
Help
FAQ
Is Zetaperps custodial? No. Collateral escrows in the program and settles on close or liquidation. Zetaperps never holds your keys.
Do I need an account? No. A Solana wallet (or an x402 payment, for agents) is all you need.
Can an AI agent trade without a human? Yes. Agents authenticate with an x402 payment proof per action — no keys, no accounts — and can open, hedge, and close positions autonomously.
What happens if I get liquidated? The program closes the position at the maintenance margin level, settles remaining collateral, and the loss is reflected in your reputation score.