DOCUMENTATION
v1.0.0

The complete guide toPulperp Protocol

Pulperp is the first perpetual trading protocol that combines Large Language Model risk analysis with GPU-accelerated execution on Solana. Learn how to integrate, build, and scale with our comprehensive documentation.

View on GitHub
0ms
Avg Latency
0+
TPS Capacity
0
Markets
0M
Total Volume
INTRODUCTION

Protocol Overview

Pulperp represents a paradigm shift in decentralized perpetual trading. By integrating cutting-edge Large Language Models for risk assessment and leveraging GPU-accelerated computation for order execution, we have created a trading infrastructure that rivals and often exceeds the performance of centralized exchanges.

Why Pulperp?

LLM-Powered Risk
Real-time market sentiment analysis and position risk scoring using advanced language models trained on financial data.
GPU Execution
Massively parallel order matching on dedicated GPU subnets achieving sub-50ms execution times.
Adaptive Liquidation
Continuous monitoring with AI-predicted liquidation paths to protect both traders and liquidity providers.
Solana Native
Built from the ground up for Solana, leveraging its high throughput and low latency characteristics.

Architecture at a Glance

The Pulperp protocol consists of three primary layers: the Intelligence Layer (LLM risk engine), the Execution Layer (GPU subnets), and the Settlement Layer (Solana smart contracts). These layers work in concert to provide a seamless trading experience.

Layer 1
Intelligence
LLM models analyze market conditions, news, and on-chain data
Layer 2
Execution
GPU clusters process orders in parallel with sub-ms latency
Layer 3
Settlement
Solana programs handle collateral and position management
QUICKSTART

Getting Started

Get up and running with Pulperp in minutes. This guide will walk you through the essential steps to start trading perpetuals or integrating with our protocol.

1

Install the SDK

The Pulperp SDK provides a type-safe interface for interacting with the protocol. Choose your preferred package manager:

npm install @pulperp/sdk
yarn add @pulperp/sdk
pnpm add @pulperp/sdk
2

Initialize the Client

Create a Pulperp client instance with your Solana wallet. The client handles all communication with the protocol.

client.ts
import { Pulperp } from '@pulperp/sdk'
import { Connection, Keypair } from '@solana/web3.js'
 
// Initialize connection to Solana
const connection = new Connection('https://api.mainnet-beta.solana.com')
 
// Create the Pulperp client
const client = new Pulperp({
connection,
wallet: yourWalletAdapter,
network: 'mainnet-beta',
})
 
// Check connection
const health = await client.health()
console.log('Protocol Status:', health.status)
3

Open Your First Position

Execute a perpetual trade with just a few lines of code. The SDK handles all the complexity of interacting with the protocol.

trade.ts
// Open a long position on SOL-PERP
const position = await client.openPosition({
market: 'SOL-PERP',
side: 'long',
size: 10, // 10 SOL
leverage: 5, // 5x leverage
collateral: 'USDC',
})
 
console.log('Position ID:', position.id)
console.log('Entry Price:', position.entryPrice)
console.log('Liquidation Price:', position.liquidationPrice)
console.log('LLM Risk Score:', position.riskScore)
INTELLIGENCE

LLM Risk Engine

At the heart of Pulperp lies our proprietary LLM Risk Engine - a sophisticated AI system that continuously analyzes market conditions, news sentiment, on-chain activity, and historical patterns to provide real-time risk assessments for every trade.

How It Works

1
Data Ingestion
The engine continuously ingests data from multiple sources: price feeds, order books, social media, news APIs, and on-chain transactions across Solana and other networks.
2
Contextual Analysis
Using transformer-based architectures, the LLM processes this multimodal data to understand market context, identifying correlations and patterns that traditional systems miss.
3
Risk Scoring
Every position request is evaluated in real-time. The model generates a risk score (0-100) based on current market volatility, position size relative to liquidity, and predicted price movements.
4
Adaptive Parameters
Based on the risk assessment, the engine dynamically adjusts margin requirements, maximum leverage, and liquidation thresholds to protect both traders and LPs.

Risk Score Interpretation

0-25
Low Risk
Favorable conditions, standard parameters
26-50
Moderate
Normal market conditions
51-75
Elevated
Increased volatility, adjusted margins
76-100
High Risk
Extreme conditions, reduced leverage
Accessing Risk Data
// Get real-time risk assessment
const risk = await client.getRiskAssessment({
market: 'SOL-PERP',
size: 100,
leverage: 10,
})
 
console.log('Risk Score:', risk.score)
console.log('Market Volatility:', risk.volatility)
console.log('Suggested Leverage:', risk.suggestedLeverage)
console.log('Analysis:', risk.llmAnalysis)
PERFORMANCE

GPU Execution Layer

Pulperp leverages dedicated GPU subnets for order matching and execution. This massively parallel architecture enables us to process thousands of orders simultaneously, achieving latencies that rival centralized exchanges while maintaining full decentralization.

Parallel Processing
10,000+ concurrent orders

Our GPU clusters process orders in parallel batches, enabling throughput that scales linearly with demand. Each subnet can handle over 10,000 concurrent order operations.

Sub-50ms Latency
End-to-end execution

From order submission to on-chain confirmation, the entire execution pipeline completes in under 50 milliseconds for standard market conditions.

Performance Metrics

MetricValue
Order Matching12ms
Risk Calculation8ms
On-chain Settlement25ms
Total Latency45-50ms
Throughput45,000 TPS
Uptime99.97%
REFERENCE

API Reference

Pulperp provides a comprehensive REST API for programmatic access to all protocol functions. All endpoints support both JSON and MessagePack encoding for optimal performance.

Base URL
https://api.pulperp.io/v1

Endpoints

GET/markets

List all available perpetual markets with current prices and funding rates

Response
{
  "markets": [
    {
      "symbol": "SOL-PERP",
      "price": "142.85",
      "fundingRate": "0.0001",
      "volume24h": "12500000",
      "openInterest": "8500000"
    }
  ]
}
GET/positions/:wallet

Get all open positions for a wallet address

Response
{
  "positions": [
    {
      "id": "pos_abc123",
      "market": "SOL-PERP",
      "side": "long",
      "size": "10.5",
      "entryPrice": "140.25",
      "unrealizedPnl": "27.30"
    }
  ]
}
POST/orders

Submit a new order (market or limit)

Response
{
  "order": {
    "id": "ord_xyz789",
    "status": "filled",
    "filledSize": "10",
    "avgPrice": "142.50",
    "executionTime": "47ms"
  }
}
GET/risk/:market

Get current risk metrics and LLM analysis for a market

Response
{
  "riskScore": 35,
  "volatility": "medium",
  "maxLeverage": 20,
  "analysis": "Market conditions stable..."
}
DELETE/orders/:id

Cancel an open order

Response
{
  "cancelled": true,
  "orderId": "ord_xyz789"
}
INTEGRATION

SDK Integration

The official Pulperp SDK provides a fully typed, developer-friendly interface for building trading applications, bots, and integrations on top of the protocol.

Available Methods

openPosition()Trading

Open a new perpetual position with custom parameters

closePosition()Trading

Close an existing position partially or fully

addMargin()Margin

Add collateral to an open position

removeMargin()Margin

Withdraw excess margin from a position

getPosition()Query

Fetch details of a specific position

getPositions()Query

List all positions for a wallet

getMarkets()Query

Get all available markets and prices

getFundingRate()Query

Get current funding rate for a market

getRiskAssessment()Risk

Get LLM-powered risk analysis

streamPrices()WebSocket

Real-time price feed subscription

streamPositions()WebSocket

Real-time position updates

streamOrders()WebSocket

Order status change notifications

ON-CHAIN

Smart Contracts

Pulperp is built on a suite of Solana programs that handle collateral management, position tracking, liquidations, and protocol governance. All contracts are open source and audited.

Program Addresses

Pulperp CoreMainnet

Main trading engine and position management

BaNa1111111111111111111111111111111111111
Vault ProgramMainnet

Collateral custody and margin management

BaNa2222222222222222222222222222222222222
Oracle AdapterMainnet

Pyth price feed integration layer

BaNa3333333333333333333333333333333333333
Liquidation EngineMainnet

Automated position liquidation system

BaNa4444444444444444444444444444444444444
GovernanceMainnet

Protocol parameter governance

BaNa5555555555555555555555555555555555555
Security Note

All Pulperp contracts have been audited by OtterSec and Neodyme. Audit reports are available in our GitHub repository. Program addresses shown are placeholder values - official addresses will be published at mainnet launch.

TRUST

Security

Security is foundational to Pulperp. We employ multiple layers of protection to ensure the safety of user funds and the integrity of the trading system.

Audited Contracts

All smart contracts undergo rigorous third-party security audits before deployment. We work with leading blockchain security firms including OtterSec and Neodyme.

Insurance Fund

A protocol-owned insurance fund covers socialized losses from liquidations. The fund is continuously capitalized through a portion of trading fees.

Non-Custodial

Pulperp is fully non-custodial. Users maintain control of their funds at all times through their Solana wallets. We never hold user private keys.

Real-time Monitoring

Our security team employs 24/7 monitoring systems that detect anomalies in trading patterns, contract interactions, and system performance.

SUPPORT

Frequently Asked Questions

What makes Pulperp different from other perpetual DEXs?
Pulperp is the first perpetual trading protocol to integrate LLM-powered risk assessment with GPU-accelerated execution. This combination enables superior risk management, faster execution, and more adaptive trading parameters than traditional rule-based systems.
What is the maximum leverage available?
Maximum leverage varies by market and is dynamically adjusted based on the LLM risk engine's assessment. Under normal conditions, leverage up to 50x is available for major pairs. During high volatility periods, maximum leverage may be reduced to protect traders.
How does the LLM risk engine protect traders?
The LLM continuously analyzes market conditions and provides real-time risk scores. When elevated risk is detected, the system automatically adjusts margin requirements and maximum leverage. This proactive approach helps prevent cascading liquidations and protects both traders and liquidity providers.
What tokens are supported as collateral?
Currently, USDC is the primary collateral token. We plan to expand collateral options to include SOL, USDT, and other major tokens in future updates.
How are funding rates calculated?
Funding rates are calculated every hour based on the difference between the perpetual price and the oracle price. Long positions pay short positions when the perpetual price is above the oracle price, and vice versa. This mechanism keeps perpetual prices aligned with spot prices.
Is Pulperp audited?
Yes, all Pulperp smart contracts have been audited by OtterSec and Neodyme. We also maintain an active bug bounty program. Audit reports are publicly available in our GitHub repository.
What happens during a liquidation?
When a position's margin ratio falls below the maintenance margin, it becomes eligible for liquidation. Our adaptive liquidation engine attempts partial liquidations first to minimize market impact. Any shortfall is covered by the insurance fund.
Can I build trading bots on Pulperp?
Absolutely! Pulperp provides comprehensive APIs and SDKs specifically designed for algorithmic trading. Our WebSocket endpoints offer real-time data streams with sub-50ms latency, and the SDK includes all the methods needed for automated strategies.

Ready to start trading?

Launch the Pulperp dApp and experience the future of perpetual trading on Solana.