Getting Started

What is PerpFarm?

PerpFarm is a perpetual DEX aggregator built for airdrop farming. It connects to 10+ perpetual futures exchanges across EVM, StarkNet, and Solana β€” letting you trade on all of them from a single wallet and a single interface.

Core Concept: One wallet. One interface. Ten exchanges. Maximum airdrop exposure with zero additional fees.

Why Use PerpFarm?

Quick Start

  1. Connect Wallet: Sign in with MetaMask or WalletConnect via SIWE (Sign In With Ethereum)
  2. Deposit USDC: Send USDC on Arbitrum to your PerpFarm trading wallet
  3. Select Exchanges: Check the boxes next to the DEXs you want to trade on
  4. Trade: Set your position size (in USD), leverage, and execute

POST /api/trade

{

  "exchange": "hyperliquid",

  "symbol": "ETH",

  "side": "long",

  "size": 500,

  "leverage": 5,

  "orderType": "market"

}

β†’ Long 0.15 ETH @ $3333.33 on Hyperliquid

Connecting Your Wallet

Supported Wallets

PerpFarm uses SIWE (Sign In With Ethereum) for authentication:

Two-Wallet Architecture

PerpFarm uses two wallets to separate identity from trading:

Login Wallet (Your Wallet)

Your personal wallet (MetaMask, etc.) is used only for authentication. You sign a message to prove ownership. This wallet never holds trading funds or executes trades.

Trading Wallet (Derived in Browser)

When you sign in, a dedicated trading key is derived deterministically in your browser from your MetaMask signature. This key:

  • Signs all trades across every DEX
  • Never leaves your browser β€” the server never sees it
  • Is recoverable by signing in again with the same MetaMask wallet
  • Has an encrypted backup on the server that only your MetaMask can decrypt

v2 Key Derivation

The trading key is derived client-side using a deterministic process:

// Client-side key derivation (runs in your browser)

message = "PerpFarm Trading Key | v1 | {your_address}"

signature = MetaMask.personal_sign(message)

trading_key = keccak256(signature)

// trading_key stays in browser memory β€” never sent to server

backup = AES256_GCM(trading_key, second_MetaMask_signature)

// server stores encrypted backup it cannot decrypt

πŸ”’ Non-Custodial: Unlike custodial trading bots (Banana Gun, Maestro), PerpFarm never holds your private key. If our server is compromised, your funds are safe. Your key exists only in your browser's memory during a trading session.

Funding Your Account

Deposit Process

  1. Navigate to the Fund page after signing in
  2. Copy your PerpFarm trading wallet address
  3. Send USDC on Arbitrum to that address
  4. Your balance appears within seconds

Auto-Bridging

When you trade on a DEX that lives on another chain, PerpFarm automatically bridges the required amount from your Arbitrum balance:

You deposit once on Arbitrum. PerpFarm handles everything else.

HIP-3 Venues & Unified Balance

PerpFarm auto-enables Unified Account mode on Hyperliquid for all users. This means:

No manual venue transfers needed. All collateral swaps happen on HL's spot market with near-zero slippage.

Gas Automation

DEXs on other chains need native gas tokens. PerpFarm handles this automatically:

Minimum Deposits

DEXMinimumNotes
Avantis$100Minimum collateral per position
Paradex$10Minimum order notional
Orderly$10Minimum deposit
HyperliquidNone$50+ recommended for meaningful positions
Lighter$10Minimum deposit
Drift$10Minimum deposit
Others$10–50Varies by exchange

Trading

Placing Orders

  1. Select Exchanges: Check the boxes next to the DEXs you want to trade on (1 or all 10)
  2. Choose Order Type: Market (instant) or Limit (set your price)
  3. Set Position Size: Enter size in USD β€” PerpFarm converts to token quantity automatically
  4. Set Leverage: Choose leverage (max varies by DEX and asset)
  5. Execute: Click Long or Short β€” trades execute on all selected DEXs simultaneously
Volume Multiplication: A $200 ETH long on 5 DEXs = $1000 total volume across 5 airdrop programs. One click.

Market Orders

Execute immediately at the current best price. Subject to slippage on low-liquidity pairs.

Limit Orders

Sit on the order book until your price is reached. No slippage β€” you get your price or nothing. Remain open until filled or cancelled.

Order Modification

Modify existing orders without cancelling and replacing manually:

You can also drag order lines on the chart to adjust visually.

Position Management

USD-to-Token Conversion

You enter position sizes in dollars. PerpFarm handles the conversion:

Risk Warning: High leverage amplifies gains and losses. A 10x position can be liquidated with a 10% adverse price move. Use leverage carefully.

Supported DEXs

PerpFarm integrates with perpetual DEXs across EVM, StarkNet, Solana, and custom L1/L2 chains.

Live & Tested LIVE

Hyperliquid LIVE

Chain: Hyperliquid L1  |  Signing: EIP-712
Features: Market, limit, atomic modify, cancel, close, trade history
Leverage: Up to 25x (ETH, BTC) β€” varies by asset
Fees: 0.045% taker / 0.015% maker (tier 0, volume-based discounts)
Settlement: USDC
Account Mode: Unified Account β€” single USDC balance shared across HL main + all USDC-collateral HIP-3 venues

HIP-3 Venues LIVE

Hyperliquid's permissionless DEX deployment protocol. PerpFarm supports 7 HIP-3 venues as first-class DEX entries:

  • XYZ (Markets.xyz) β€” Equities & commodities (TSLA, NVDA, AAPL…) Β· USDC collateral
  • FLX (Felix) β€” Equities & commodities (GOLD, BTC…) Β· USDH collateral
  • VNTL (Ventuals) β€” Specialty markets (MAG7, BIOTECH…) Β· USDH collateral
  • HYNA (Hyena) β€” Crypto markets (ETH, BTC, SOL…) Β· USDe collateral
  • KM (Kinetiq) β€” Crypto & commodities (GOLD, SILVER…) Β· USDH collateral
  • CASH β€” Equities (TSLA, NVDA…) Β· USDT0 collateral
  • ABCD β€” Indices (USA500) Β· USDC collateral

Unified Account Mode: In unified mode (auto-enabled for all users), USDC-collateral venues (HL main, XYZ, ABCD) share a single USDC balance. Non-USDC groups have their own pools: USDH (FLX, VNTL, KM), USDe (HYNA), USDT0 (CASH). Deposit once β†’ trade across all venues. No manual transfers needed.
Builder Fees: Each venue's deployer earns a small fee per trade (1–3.5 bps), routed via HL's builder parameter.
Markets: Each venue has unique market listings β€” equities, crypto, commodities, indices. Check the venue selector on the trading page for available symbols.

Orderly Network LIVE

Chain: Arbitrum  |  Signing: Ed25519
Features: Market, limit, cancel, close, trade history, broker referral
Leverage: Up to 10x
Minimum: $10 USDC
Settlement: USDC

Paradex LIVE

Chain: StarkNet  |  Signing: StarkNet signatures
Features: Market, limit, cancel, close, position tracking
Bridge: Hyperlane (Arbitrum β†’ StarkNet)
Minimum: $10 notional
Settlement: USDC

Lighter LIVE

Chain: ZK rollup on Ethereum  |  Signing: ZK signatures
Features: Market, limit, native modify, cancel, open orders, trade history
Fees: Zero maker/taker for Standard accounts
Bridge: Intent-based deposit flow for non-Ethereum chains
Settlement: USDC

Ostium LIVE

Chain: Arbitrum  |  Signing: EVM transactions
Features: On-chain market orders, limit orders, close. RWA + crypto perps.
Position Tracking: Subgraph-based (1–2 minute indexing delay)
Settlement: USDC

Ethereal LIVE

Chain: Converge  |  Signing: EVM transactions
Features: Market, limit, atomic modify (replace_order), cancel, close, trade history
Settlement: USDe (Ethena)

Aster LIVE

Chain: Arbitrum  |  Signing: HMAC SHA256
Features: Binance-style REST API. Market, limit, cancel, close.
Withdraw: Futures→spot transfer + EIP-712 signed withdrawal
Settlement: USDT

Avantis LIVE

Chain: Base  |  Signing: Direct on-chain transactions
Features: Market, limit, modify (cancel+replace), cancel all, close, positions
Minimum: $100 USDC collateral per position
Settlement: USDC

Drift LIVE

Chain: Solana  |  Signing: Solana Ed25519
Features: Market, limit, cancel, positions, balance. Largest Solana perp DEX.
Bridge: deBridge (EVM β†’ Solana)
Settlement: USDC

Pacifica LIVE

Chain: Solana  |  Signing: Ed25519
Features: Market, limit, modify, cancel, close, trade history (11/11 ops)
Bridge: deBridge (EVM β†’ Solana)
Note: Currently in closed beta
Settlement: USDC

Coming Soon READY

Integration complete, pending activation or funding:

Apex Protocol READY

Chain: zkLink  |  Code complete, needs web UI activation and deposit.

Reya Network READY

Chain: Reya L2  |  69 markets available. Needs initial deposit for account registration.

Backpack READY

Chain: Solana  |  REST API integration complete. Needs manual API key registration.

Chart & Trading Interface

Charting

PerpFarm uses Lightweight Charts (TradingView library) with real-time data:

Position Lines

Open positions appear as horizontal lines on the chart:

Draggable Order Lines

Limit orders are draggable β€” click and drag an order line to change the price. Release to confirm. The order is modified on the DEX automatically via the /api/modify endpoint.

Trade Markers

Every executed trade appears on the chart with buy (green "B") and sell (red "S") markers. Hover for timestamp, size, price, and DEX name.

Wallet Security

PerpFarm v2 uses a fully non-custodial model. Your trading key is derived in your browser and never touches the server.

How It Works

  1. Your MetaMask signs a deterministic message (one-time per session)
  2. keccak256(signature) becomes your trading private key β€” derived entirely in your browser
  3. The key signs all trades locally β€” the server only relays pre-signed transactions
  4. An AES-256-GCM encrypted backup is stored server-side but cannot be decrypted without your MetaMask

Why This Matters

Compared to custodial trading bots (Banana Gun, Maestro, most aggregators):

πŸ”’ True Non-Custodial: Your private key exists only in your browser's memory during a trading session. Close the tab β€” key is gone. Return and sign again β€” key is back. No custody ever.

Whitelist System

Withdrawals are restricted to whitelisted addresses only:

Daily Limits

Configurable daily withdrawal limits to contain damage if a session is compromised:

Backup & Recovery

Withdrawing Funds

Two-Step Process

  1. Withdraw from DEX β†’ Trading Wallet: Funds return to your PerpFarm trading wallet on Arbitrum
  2. Withdraw from Trading Wallet β†’ Your Wallet: Standard ERC-20 transfer

Withdrawal Methods by DEX

DEXMethodTime
Hyperliquid (main)L1 β†’ Arbitrum bridge~10 min
HIP-3 Venues (USDC)Unified balance β†’ single HL withdrawal~10 min
HIP-3 Venues (non-USDC)Auto-swap to USDC β†’ single HL withdrawal~10 min
OrderlyEIP-712 signed withdrawal~5–10 min
ParadexHyperlane bridge (StarkNet β†’ Arbitrum)~30–60 min
LighterServer-side withdrawal~5 min
AsterFutures→spot transfer + EIP-712 withdraw~5 min
EtherealServer-side withdrawal~5 min
DriftServer-side withdrawal~5 min
Ostium / AvantisNon-custodial (withdraw on-chain directly)Seconds
ReyaL2 bridge via Reya app~10–30 min

Airdrop Farming Strategy

Why Multi-DEX Matters

Most perp DEX airdrops reward:

By trading on multiple DEXs simultaneously, you qualify for many airdrops at once and multiply your effective volume.

Example: A $200 ETH long on Hyperliquid, Orderly, Paradex, Lighter, and Ostium (5 DEXs). Actual capital: $200. Total volume for airdrop criteria: $1000. You've 5x'd your farming efficiency with one click.

Consistency Over Size

Airdrop algorithms typically reward consistent activity:

Even $10–50/day across multiple DEXs qualifies you.

Active Points Programs

DEXProgramStatus
HyperliquidMainnet points, builder fee programActive
OrderlyPoints + broker rewardsActive
ParadexPoints programActive
LighterPoints program (retail + MM)Active
EtherealPoints (USDe deposit)Active
DriftPoints programActive
ReyaExpected airdrop (testnet rewards)Pending

Referral System

How It Works

PerpFarm uses referral codes on supported DEXs. When you trade, the referral code is automatically applied. A portion of fees is rebated to help fund development.

Active Referrals

DEXTypeDetails
HyperliquidBuilder codeFee rebates for volume
OrderlyBroker referralwoofi_pro broker ID
AvantisReferral codeApplied on deposit
AsterAffiliate programApplied on trades
EtherealReferral codeApplied on deposit

Fee Structure

PerpFarm charges no additional fees. You pay only native DEX trading fees:

DEXMakerTaker
Hyperliquid0.015%0.045%
Orderly0.02%0.05%
Paradex0.02%0.05%
Lighter (Standard)0%0%
On-Chain DEXs0.05–0.1% (varies)

API Reference

Base URL

https://perpfarm.fun/api/

Authentication

All trading endpoints require JWT authentication via SIWE:

  1. Get a nonce: POST /api/auth/nonce
  2. Sign the SIWE message with your wallet
  3. Verify and receive JWT: POST /api/auth/verify
  4. Include Authorization: Bearer <token> in all subsequent requests

Auth Endpoints

POST /api/auth/nonce

Get a nonce for SIWE signing. Body: { "address": "0x..." }

POST /api/auth/verify

Verify SIWE signature and receive JWT token. Body: { "message": "...", "signature": "0x..." }

POST /api/v2/register

Register a v2 (non-custodial) account.

POST /api/v2/login

Login to v2 account. Returns encrypted backup for client-side key recovery.

Market Data

GET /api/exchanges

List all supported exchanges and their status.

GET /api/prices

Get current prices from all exchanges.

GET /api/exchange/{name}/ticker

Get ticker data for a specific exchange.

GET /api/binance/klines

Get candlestick data. Query: ?symbol=ETHUSDT&interval=1h&limit=500

Account & Balances

GET /api/exchange/{name}/balance

Get account balance on a specific exchange.

GET /api/exchange/{name}/positions

Get all open positions on a specific exchange.

GET /api/exchange/{name}/orders

Get all open orders on a specific exchange.

GET /api/exchange/{name}/trades

Get trade history for a specific exchange.

GET /api/fund/balances

Get funding balances across all DEXs.

Trading

POST /api/trade

Execute a trade. All sizes are in USD.

Body: { "exchange": "hyperliquid", "symbol": "ETH", "side": "long", "size": 500, "leverage": 5, "orderType": "market" }

For limit orders, add "price": 3200.00

POST /api/close/{exchange}/{symbol}

Close an open position on a specific exchange.

POST /api/cancel/{exchange}/{order_id}

Cancel a specific open order.

POST /api/cancel-all/{exchange}

Cancel all open orders on a specific exchange.

POST /api/modify/{exchange}/{order_id}

Modify an existing order (atomic where supported, cancel+replace fallback).

Body: { "price": 3250.00, "size": 600 }

Funding & Deposits

POST /api/deposit

Deposit funds to an exchange from trading wallet.

POST /api/withdraw/{exchange}

Withdraw funds from an exchange back to trading wallet.

Body: { "amount": 100 }

POST /api/fund/plan

Plan funding distribution across DEXs.

POST /api/fund/distribute

Auto-distribute funds to selected DEXs (handles bridging).

v2 Endpoints

GET /api/v2/dex-status

Get v2 signing status for each DEX (which DEXs are registered for client-side signing).

POST /api/v2/backup-key

Store encrypted key backup (server cannot decrypt).

GET /api/v2/backup-status

Check if encrypted backup exists for this account.

Rate Limits

FAQ

Is PerpFarm custodial?

No. PerpFarm v2 is fully non-custodial. Your trading key is derived in your browser from a MetaMask signature using keccak256. The server stores only an AES-256-GCM encrypted backup it cannot decrypt. Even if PerpFarm's server is compromised, your funds are safe.

What chains are supported?

Deposit chain: Arbitrum (USDC). Auto-bridged to: Base, StarkNet, Solana, Hyperliquid L1, Converge, Reya L2, zkLink. PerpFarm handles all cross-chain bridging automatically via Stargate V2, Hyperlane, and deBridge.

How many DEXs are supported?

17 DEXs are live: Hyperliquid (main) + 7 HIP-3 venues (XYZ, FLX, VNTL, HYNA, KM, CASH, ABCD), Orderly, Paradex, Lighter, Ostium, Ethereal, Aster, Avantis, Drift, and Pacifica. Additional DEXs (Apex, Reya, Backpack) are code-ready and pending activation.

What is Unified Account mode?

PerpFarm auto-enables Hyperliquid's Unified Account mode for all users. This creates a single shared USDC balance across HL main and all USDC-collateral HIP-3 venues (XYZ, ABCD). Non-USDC venues (FLX, VNTL, KM use USDH; HYNA uses USDe; CASH uses USDT0) each have their own collateral pool. You deposit once and trade across all venues β€” no manual transfers needed.

Does PerpFarm charge fees?

No additional fees. You pay only native DEX trading fees. PerpFarm uses referral codes on some DEXs to earn rebates that help fund development.

What are the minimum trade sizes?

Varies by DEX: Avantis requires $100 minimum collateral, Paradex/Orderly $10, Hyperliquid has no minimum. Most DEXs are in the $10–50 range.

Can I use PerpFarm for regular trading?

Yes. PerpFarm is a full-featured perp DEX aggregator. Use it for regular trading, consolidating your perp positions, or just managing multiple exchanges from one interface.

What happens if PerpFarm shuts down?

Your trading key is derived from your MetaMask signature β€” you can always re-derive it. For DEXs where funds are held on-chain (Ostium, Avantis), you can interact with the contracts directly. For others, you can use the DEX's native interface with your trading wallet.

Is my data safe?

Private keys are never stored on the server. The encrypted backup can only be decrypted by your MetaMask. Withdrawals require whitelisted addresses with 24-hour activation delays. All encrypted data is backed up to a private GitHub repository.

Troubleshooting

"Not connected" error

Cause: Wallet disconnected or session expired.
Fix: Click "Connect Wallet" and sign the SIWE message again.

Position not showing after trade

Cause: Some DEXs (Ostium) use subgraph-based position tracking with 1–2 minute indexing delays.
Fix: Wait 2–3 minutes and refresh. Check the block explorer for tx confirmation.

Deposit not credited

Cause: Bridge transactions have variable processing times (Stargate, Hyperlane, deBridge).
Fix: Check the tx on the source chain's explorer. Most bridges take 5–30 minutes. If >1 hour, check the bridge's status page.

Order rejected by DEX

Cause: Insufficient balance, leverage too high, minimum size not met, or market closed.
Fix: Check the error message. Common fixes: increase deposit, reduce leverage, increase position size.

Rate limiting errors

Cause: Trading on many DEXs simultaneously can trigger rate limits on individual exchanges.
Fix: PerpFarm automatically retries failed requests. Slight delays (5–10 seconds) are normal when executing on 10 DEXs at once.

Withdrawal stuck

Cause: DEX withdrawal processing times vary. L1 bridges and L2 bridges can take 10–60 minutes.
Fix: Check the DEX's bridge status page. If >2 hours, it's typically a DEX-side issue.

PerpFarm v2 | perpfarm.fun | Documentation last updated: March 2026

Built for farmers, by farmers. 🌾