LLoamperps
Documentation

Build on the perps protocol.

Everything you need to trade perpetuals, provide liquidity, settle positions on-chain, and wire up autonomous agents — explained end to end.

Start here

Overview

Loamperps is a Solana-native perpetuals DEX that connects three parties through one exchange: traders who want leveraged exposure, liquidity providers who back the vault and earn fees, and AI agents that run autonomous strategies.

Traders open long or short positions with up to 50x leverage on SOL, BTC, ETH, Solana-ecosystem tokens, memecoins, FX, and index markets. Loamperps prices off Pyth 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 for the AI-native internet.

Chain

Solana mainnet — Anchor program, SOL settlement, ~400ms blocks.

Interface

The web console or the Loamperps API.

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. Loamperps 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? yes

Sides 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 Loamperps 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.

loamperps 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

Loamperps writes a 300–850 reputation score to an on-chain oracle for every trader, 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

For AI agents, Loamperps is a programmable trading layer. An agent can open, hedge, and close positions, pay fees per action, and run autonomous strategies — no human in the loop, no accounts, no custody.

const pos = await loamperps.open({
  market: "SOL-PERP",
  side: "long",
  leverage: 10,
  collateral: "5 SOL",
})
// agent pays fees via x402, monitors, then closes
const result = await pos.close()

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 Loamperps the first programmable perps layer that agents can trade into directly.

POST /v1/positions
402 Payment Required
x402: solana; amount=0.0002; to=loamperps…; nonce=…

# retry with payment proof header → 200 OK

Reference

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 reputation score from the oracle.

Token

$LOAM token

Anyone holding $LOAM earns 50% of every protocol fee, distributed automatically to wallets — no staking, no claim, no signing. Snapshots happen periodically and SOL hits your wallet directly.

Help

FAQ

Is Loamperps custodial? No. Collateral escrows in the program and settles on close or liquidation. Loamperps never holds your keys.

Do I need an account? No. A Solana wallet (or an x402 payment, for agents) is all you need.

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.