Skip to main content
Tg Image 1606467229 Pn
For detailed guidance on the implementation flow, please review our Integration Guide.

Create Trade

Generate a new Solana keypair using any standard library or SDK (e.g., @solana/web3.js, solana-sdk for Rust).

This keypair serves as a compostable wallet exclusively for the transaction. This one-time wallet is responsible for the final transaction signature and gas fees.
// Example with @solana/web3.js
const oneTimeWallet = Keypair.generate();
Submit your unsigned transaction body along with the one-time wallet address. The one-time wallet address you create and broadcast with must be a regular Solana wallet, not an ATA. Vanish Core automatically injects loan and repay instructions at the transaction’s beginning and end, borrowing the requested amount from our hot wallets.
Fetch the route from Solana DEX aggregators, such as Jupiter, and assemble all swap instructions into a single Solana transaction body. Exclude loan/repay logic entirely - Vanish Core handles this injection. Ensure your one-time wallet address is set as the signer for all swap instructions.
Submit an unsigned Solana transaction body containing:
  • All DEX/swap instructions for your trading route
  • One-time wallet address as the transaction signer
The one-time wallet address you create and broadcast with must be a regular Solana wallet, not an ATA.
Make sure to exclude loan/repay logic entirely - Vanish Core will inject and return the transaction body to you with these instructions added.
You receive a partially-signed transaction payload with:
  • Your original swap instructions (unmodified)
  • Injected loan instructions (at the beginning)
  • Injected repay instructions (at the end)
  • Vanish Core’s signature applied
Sign the returned transaction body with your one-time wallet’s private key, then broadcast this through your pre-existing RPC/Node infrastructure. The transaction requires two signatures: Vanish Core’s (already applied) and your one-time wallet’s (your responsibility).
All operations revert atomically if any instruction fails. You bear no financial liability since the loan only executes if the repay instruction can complete successfully. Failed transactions only cost you the base network transaction fee.

The /commit endpoint must be called for all transactions, regardless of their final status (success, failure, or expiration). This is to ensure balances are unfrozen and reverted if a transaction has failed.

Performance & Latency

You can expect Vanish Core’s private trading capabilities to add a 50ms benchmark to your trade’s finality, on top of your existing RPC/Node transaction submission time.

Authentication & Integrity

All API endpoints are authenticated using x-api-key in the request header.API keys are provisioned during onboarding and should be kept secure.
The API returns complete transaction bytes. You can inspect the transaction body to verify:
  • Your original instructions remain unchanged
  • Only loan/repay instructions were added
  • No unauthorized modifications occurred

Fees & Network Congestion

Vanish Core automatically deducts its fee within the repay instruction. You will deduct your fee within the instruction as well and the result will be automatically repaid to Vanish Core.
You can specify priority fees and slippage in your transaction body as you would when submitting a regular transaction. Vanish Core preserves your trade parameters when modifying the transaction.