Skip to main content

Protocol Testing

The safest order is:
  1. diagnose env and RPC
  2. build bundles
  3. send one direct protocol transaction
  4. only then involve the vault

Step 1. Diagnose runtime

Look for:
  • RPC URLs present
  • owner addresses matching local signers
  • wallet balances greater than 0 SOL
  • program executable on the configured cluster

Step 2. Validate Drift bundle construction

Expected:
  • executionSource: "drift-sdk"
  • instructionEnvelopes present
Use deposit before withdraw.

Step 3. Validate Kamino bundle construction

Expected:
  • executionSource: "kamino-sdk"
  • instructionEnvelopes present

Step 4. Send a real Drift transaction without the vault

This is the cleanest first live transaction because it removes the vault from the equation.

Step 5. Bring in the vault

After protocol paths are working:
  • bootstrap the vault
  • inspect state
  • run a vault user deposit
  • run a rebalance

Common errors

Drift withdraw requires an existing user account

You attempted withdraw before doing a real deposit.

Program not executable

VAULT_PROGRAM_ID is still a placeholder or belongs to the wrong cluster.

Attempt to debit an account but found no prior credit

The signer exists, but it does not have SOL yet.