VAEA Flash SDK (Rust)
Universal Flash Loan SDK for Solana — Borrow any SPL token atomically in one call.
Features
- 83+ tokens — SOL, USDC, JitoSOL, mSOL, JUP, and 78 more
- 3 protocols — Marginfi, Kamino, Jupiter Lend
- Smart Router (VTE) — Automatically finds cheapest route
- Local Builder — Build instructions in <0.1ms, zero HTTP
- Jito Bundle — Native MEV protection support
- Profitability Check — Verify profit before execution
- Multi-token — Atomic multi-asset flash loans
Quick Start
[]
= "0.1"
use ;
use Keypair;
async
Zero-HTTP Local Builder
For latency-critical bots, build instructions in <0.1ms with zero network calls:
use ;
// Sync token registry once at startup
sync_registry.await;
// Build locally — 0.1ms, no HTTP
let result = local_build?;
// result.begin_flash + [your IXs] + result.end_flash
API Methods
| Method | Description |
|---|---|
get_capacity() |
Real-time liquidity across 83+ tokens |
get_quote(token, amount) |
Fee breakdown with VTE routing |
build(request) |
Get prefix/suffix instructions from API |
borrow(params) |
Build complete flash loan instructions |
borrow_local(params) |
Same as borrow, zero HTTP (<0.1ms) |
execute(params) |
Build + sign + send in one call |
execute_local(params) |
Same as execute, zero HTTP |
execute_smart(params) |
Smart routing with local fallback |
simulate(params) |
Dry-run simulation |
borrow_multi(params) |
Multi-token atomic flash loans |
is_profitable(params) |
Pre-execution profitability check |
read_flash_state(payer, mint) |
Read on-chain FlashState PDA |
get_route(token, amount, max_bps) |
VTE smart route resolution |
get_health() |
System health check |
get_matrix() |
Full liquidity matrix |
get_discovery() |
Token discovery summary |
License
MIT — see LICENSE