> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solana.vanna.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Flow

> Price refresh, remaining accounts, simulate, then send.

Typical risk-sensitive tx:

1. `refreshPythPrice(symbol)` (Hermes or fork cheatcode)
2. Build named accounts from PDAs
3. `buildRemainingPositionMetas` — every other vault, debt, price, Lite
4. Compute budget + maybe ALT
5. `simulateAndSend` — if simulation fails, **do not** broadcast

Perps open concatenates deposit-and-borrow + Jupiter swap in **one** message. If the swap route is stale, nothing settles.

```ts theme={null}
// conceptual
const ixs = [
  ...depositAndBorrowIxs,
  ...marginSwapIxs,
];
await simulateAndSend(ixs);
```

Wallet "Blockhash not found" means the signer is not on the fork RPC.
