Why we built a custom Rust adaptor
Voltr has adaptors. They work. You can deposit, withdraw, swap through Jupiter — the basics are covered. So why did we spend days writing 346KB of Rust from scratch?
Because the basics aren't enough for what we're doing.
Our vault runs a delta-neutral hJLP strategy. That means JLP sits as collateral on Drift, earning ~35% APY from trading fees, while short perps (SOL/BTC/ETH) hedge away the crypto exposure. The problem: rebalancing this position requires atomically adjusting perp positions alongside collateral changes. You can't do that with a generic swap adaptor. You need a program that understands Drift's cross-margin engine.
The existing approach was an off-chain keeper — a TypeScript bot that reads state, computes targets, sends transactions. It works, but it's a trust assumption. The keeper has a wallet. The wallet has authority. If the keeper misbehaves or gets compromised, the vault is exposed.
The on-chain adaptor eliminates this. Six instructions:
initialize, deposit, withdraw, rebalance, crank_hedge, emergency_exit. The rebalance instruction is the key — it takes a target allocation, computes the delta from current positions, and atomically adjusts JLP collateral and perp hedges in a single transaction through Drift's CPI. No off-chain trust required.
The 2.1 SOL deployment cost is actually a feature, not a bug. It means the program is real and permanent — deployed on-chain, verified, immutable unless you explicitly upgrade. That's the whole point. The code is the authority, not a hot wallet.
Ships April 2026. The adaptor compiles clean today. Deployment is just a matter of having 2.5 SOL in the right wallet.