DeFi Integration in 6 Lines of Code
Enable any developer to integrate DeFi operations through intents, not transactions. Abstract chains, gas, protocols, and wallets completely.
The Core Problem
Current DeFi integration requires deep blockchain knowledge and hundreds of lines of code
BEFORE Pan - Simple Aave Deposit = 100+ Lines
import { createWalletClient, getContract } from 'viem'
import { arbitrum } from 'viem/chains'
const account = privateKeyToAccount(process.env.PRIVATE_KEY)
const publicClient = createPublicClient({
chain: arbitrum,
transport: http(process.env.ARBITRUM_RPC)
})
// ... 90+ more lines for:
// - Managing RPC endpoints
// - Handling approvals
// - Paying gas
// - Choosing Aave + Arbitrum explicitly
// - No optimization (maybe Compound on Base is better?)With Pan
Specify WHAT you want, not HOW to achieve it. Pan handles everything.
WITH Pan - Same Operation = 6 Lines
import { pan } from '@pan/sdk'
const client = new pan({ apiKey: process.env.PAN_KEY })
await client.intent({
action: 'lend',
asset: 'USDC',
amount: 1000,
optimize: 'yield'
})Pan automatically handles:
Traditional API
Developer specifies HOW: which protocol, which chain, manual optimization
await api.deposit({
protocol: 'aave',
chain: 'arbitrum',
asset: 'USDC',
amount: 1000
})Intent-Based API (Pan)
Developer specifies WHAT: desired outcome with constraints
await pan.intent({
action: 'maximize-yield',
asset: 'USDC',
amount: 1000,
constraints: {
minAPY: 3.5,
riskLevel: 'low'
}
})Three-Layer Stack
Built for developers, powered by intents
Developer Interface
TypeScript SDK, REST API, and dashboard for API keys, analytics, and billing
- Simple SDK integration
- Real-time WebSocket updates
- Complete analytics dashboard
Wallet Abstraction
Embedded wallets with gasless transactions. Users never see blockchain complexity
- Gasless transactions
- Embedded wallet creation
- Account abstraction
Intent Layer
Solver network competes for best execution. Automatic optimization across protocols and chains
- Competitive execution
- Cross-chain routing
- MEV protection
Protocol Coverage
Phase 1 integration with leading DeFi protocols
Lending & Borrowing
- Aave V3
- Compound V3
- Morpho
- Spark
Yield Aggregators
- Yearn
- Beefy
DEXs
- Uniswap V3/V4
- Balancer
- Curve
Bridges
- Across Protocol
- Squid Router
Phase 1 Chains: Ethereum, Arbitrum, Optimism, Base, Polygon
Test the API
Click any button to see how our dual authentication works. You'll receive a 402 Payment Required response with X402 payment instructions.
/api/v1/yields
Get real-time APY rates (Auth required)
/api/v1/balances/123e4567-e89b-12d3-a456-426614174000
Check wallet balances (Auth required)
What these endpoints demonstrate:
- Dual authentication: API Keys and X402 micropayments
- 402 Payment Required response with payment instructions
- Automatic protection on all production API endpoints
- No authentication needed to see the demo response
Ready to Build with Pan?
Join developers building the future of DeFi with intent-based APIs. Get started in minutes.