The universal flash loan layer for Solana.
Documentation · Quick Start · Examples · Discord · Twitter
VAEA Flash lets you borrow any SPL token — SOL, stablecoins, LSTs, mid-caps — in a single atomic transaction, with no collateral required.
One SDK call. Any token. From 0.03% fee.
const sig = await flash.execute({
token: 'mSOL',
amount: 5000,
onFunds: async (ixs) => {
ixs.push(myArbitrageInstruction);
return ixs;
},
});| Problem | VAEA Solution |
|---|---|
| Existing flash loans only cover SOL, USDC, USDT | 21+ tokens including LSTs and mid-caps |
| Each protocol has its own incompatible SDK | One SDK, one line of code, any token |
| No flash loans for mSOL, JitoSOL, BONK... | Synthetic routing via Sanctum & Jupiter |
| If a source is full, there's no fallback | Automatic multi-protocol fallback |
| Token | Source | Fallback |
|---|---|---|
| SOL | Jupiter Lend | Marginfi → Kamino → Save |
| USDC | Jupiter Lend | Marginfi → Kamino → Save |
| USDT | Jupiter Lend | Marginfi → Save |
| cbBTC | Jupiter Lend | Kamino |
| JupSOL | Jupiter Lend | — |
| JitoSOL | Jupiter Lend | Marginfi |
| JUP | Jupiter Lend | — |
| JLP | Jupiter Lend | — |
mSOL · bSOL · INF · laineSOL · BONK · WIF · PYTH · RAY · HNT · RNDR · JITO · KMNO · wETH
npm install @vaea/flash @solana/web3.jsimport { VaeaFlash } from '@vaea/flash';
import { Connection, Keypair } from '@solana/web3.js';
const flash = new VaeaFlash({
apiUrl: 'https://api.vaea.fi',
connection: new Connection('https://api.mainnet-beta.solana.com'),
wallet: myKeypair,
});
const sig = await flash.execute({
token: 'SOL',
amount: 1000,
onFunds: async (ixs) => {
ixs.push(myInstruction);
return ixs;
},
maxFeeBps: 10,
});cargo add vaea-flash-sdkuse vaea_flash_sdk::{VaeaFlash, BorrowParams};
let flash = VaeaFlash::with_rpc(
"https://api.vaea.fi",
"https://api.mainnet-beta.solana.com",
&payer,
)?;
let sig = flash.execute(BorrowParams {
token: "SOL".into(),
amount: 1000.0,
instructions: vec![my_arb_ix],
max_fee_bps: Some(10),
..Default::default()
}).await?;pip install vaea-flashfrom vaea_flash import VaeaFlash, VaeaConfig
async with VaeaFlash(VaeaConfig(
api_url="https://api.vaea.fi"
)) as flash:
result = await flash.borrow(
token="SOL",
amount=1000,
user_pubkey=str(wallet.pubkey()),
user_instructions=[my_arb_ix],
)See the examples/ directory for complete, runnable scripts.
┌──────────────────────────────────────┐
│ Your App / Bot │
│ SDK: TypeScript · Rust · Python │
└──────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────┐
│ VAEA Flash Backend API │
│ Route Calculator · Liquidity Scanner│
└──────────────┬───────────────────────┘
│
▼
┌──────────────────────────────────────┐
│ VAEA Flash On-Chain Program │
│ begin_flash → your logic → end_flash│
└──────────┬───────────┬───────────────┘
│ │
▼ ▼
┌──────────┐ ┌──────────────┐
│ Direct │ │ Synthetic │
│ Sources │ │ (via Swap) │
└──────────┘ └──────────────┘
VAEA Flash owns no liquidity. It routes borrows to existing lending protocols (Jupiter Lend, Marginfi, Kamino, Save) and applies a transparent fee layer.
vaea-flash/
├── sdk/
│ ├── typescript/ # @vaea/flash — npm package
│ ├── rust/ # vaea-flash-sdk — crates.io
│ └── python/ # vaea-flash — PyPI
├── frontend/
│ └── web/ # Next.js dashboard — vaea.fi/flash
├── examples/
│ ├── typescript/ # TS example scripts
│ ├── rust/ # Rust example scripts
│ └── python/ # Python example scripts
└── LICENSE # BSL-1.1
Note: The on-chain program and backend service are maintained in a separate private repository for security.
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/capacity |
Real-time borrowing capacity for all tokens |
GET |
/v1/quote?token=SOL&amount=1000 |
Fee quote with breakdown |
POST |
/v1/build |
Build flash loan transaction |
GET |
/v1/health |
System health and protocol status |
Base URL: https://api.vaea.fi
Full documentation: vaea.fi/flash/docs
| Route | Fee | Breakdown |
|---|---|---|
| Direct | 0.03% | Source (0%) + VAEA (0.03%) |
| Synthetic | ~0.09% | Source (0%) + Swap (~0.06%) + VAEA (0.03%) |
Use maxFeeBps in SDK calls to auto-reject transactions exceeding your threshold.
| Metric | Value |
|---|---|
| TX overhead | 36 bytes (4 accounts via ALT compression) |
| Compute Units | ~23,000 CU (1.6% of TX budget) |
| Program size | 235 KB (LTO fat, opt-level z) |
| API latency | <5ms (Redis-cached, no RPC calls) |
VAEA Flash ships a pre-loaded Address Lookup Table that compresses our 4 fixed accounts from 128 bytes down to 4 bytes. Your transactions stay lean even with complex arbitrage logic.
import { VAEA_LOOKUP_TABLE } from '@vaea/flash';
// DjncKSi9KqtnFx6hFYa7ARmwJ7B4Y7UH3XpR2XEuXNJr
// Auto-used in execute() — zero config needed- Instruction introspection verifies
begin_flash↔end_flashpairing within the same TX - All transactions are atomic — if repayment fails, the entire transaction reverts
- Zero database, zero data retention — VAEA reads on-chain state only
- Deployer-restricted initialization — only the protocol deployer can init the Config PDA
- Fee floor protection — minimum 1 lamport fee prevents micro-loan evasion
- Strict authority checks —
require!enforced on all admin operations
We welcome contributions to the SDKs, frontend, and examples. Please read our Contributing Guide before submitting a PR.
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Commit your changes (
git commit -m 'feat: add my feature') - Push to the branch (
git push origin feat/my-feature) - Open a Pull Request
- 🌐 Website: vaea.fi
- 📖 Docs: vaea.fi/flash/docs
- 🐦 Twitter: @vaboratory
- 💬 Discord: discord.gg/vaea
VAEA Flash is licensed under the Business Source License 1.1.
The Licensed Work is the VAEA Flash Protocol. The Change Date is March 27, 2030. On the Change Date, the Licensed Work will convert to the Apache License, Version 2.0.
Usage Grants: You may use, copy, and modify the Licensed Work for any purpose except for operating a production service that competes with VAEA Flash. Integration and SDK usage are always permitted.
