Core Concepts
- Programs - Executable code deployed on-chain. They define instructions, process transactions, and interact with accounts.
- Accounts - Store data on-chain. Mutable by their owning program.
- Instructions - Defined by programs, similar to API endpoints.
- Transactions - Bundles of one or more instructions sent to the network.
See the official Solana docs for Web3.js and Rust client libraries.
Interacting with Jupiter
| Method | Description |
|---|---|
| Swap API | Get an order, sign, and submit. |
| Cross Program Invocation (CPI) | Call Jupiter Swap from your on-chain program. Recommended since the Loosen CPI restriction feature. |
| Flash Fill | Alternative to CPI using Versioned Transactions and Address Lookup Tables to reduce account size. |
Transaction Fundamentals
Priority Fees
An optional fee to improve transaction landing speed. Higher priority fee = higher position in the execution queue. Priority Fee = Compute Budget x Compute Unit Price (excluding the 5,000 lamport base fee).| Term | Description |
|---|---|
| Global Priority Fee | Fee estimation across the entire network |
| Local Fee Market | Fee estimation for a specific writable account (hot account) |
| Compute Budget | How much compute the transaction is expected to consume |
| Compute Unit Price | Micro-lamports per compute unit |
Overpaying priority fees drives up costs across the network over time. Estimate appropriately rather than always bidding high.
Compute Units
Compute Units (CU) measure the resources a transaction needs. The Solana runtime caps transactions at 1.4M CU, with a default of 200K CU per instruction. You can set a custom limit withSetComputeUnitLimit.
Slippage
A threshold (percentage or bps) that causes the transaction to fail if the actual output falls below the quoted amount by that margin. Tighter slippage protects against price movement but makes landing harder.Transaction Broadcasting
Transactions reach the network via:- Standard RPCs
- RPCs with Stake-Weighted Quality of Service (SWQoS)
- Jito RPC
