2xSOL is a leveraged vault protocol on Solana that provides 2x exposure to SOL through a deposit/mint/redeem model. Users deposit SOL, receive 2xSOL shares representing their leveraged position, and can redeem at any time based on the current NAV.
The protocol integrates Percolator (a formally verified accounting and risk engine created by Anatoly Yakovenko) for solvency constraints and Pyth Network for real-time oracle pricing. Swaps are routed through Jupiter.
Higher leverage tiers (3x, 5x, 10x) are planned for future release.
- Non-custodial — Users maintain control; vault authority is a PDA
- Oracle-validated pricing — Pyth SOL/USD feed with staleness and confidence checks
- Solvency-first risk engine — Percolator CPI enforces withdrawal safety gates and margin constraints
- On-chain execution — All state transitions happen on Solana, fully verifiable
- Transparent NAV — Share price derived from vault assets and oracle inputs
| Component | Address |
|---|---|
| Program | 4QVqGD1rKE1tfGNPU9X23oEjxcL2C9WZPYf7TzpWmDnG |
| Vault State (PDA) | GW9Gqgmaq36eSHSv2vdpwBeBSHbXzni3qHvecW22vUUz |
| Vault Authority (PDA) | 9dF8hzBRJFoZRQRhpDEnp2pGnv8rub1zkzAHWXVgh3j3 |
| Shares Mint (2xSOL) | E4iu5gixbf27tpAVpDaLYpynUoP3DiNVPjhSSK4xYC67 |
| Vault Underlying | ygoQfU4sZgqkyiyM5mYr14SeyPY11tuNNDsHhingziC |
| Percolator Program | 2SSnp35m7FQ7cRLNKGdW5UzjYFF6RBUNq7d3m5mqNByp |
| Pyth Oracle (SOL/USD) | J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix |
| Parameter | Value |
|---|---|
| Target Leverage | 2x (20,000 bps) |
| Management Fee | 2% APR (200 bps) |
| Oracle Max Staleness | 300 slots |
| Oracle Max Confidence | 5% (500 bps) |
flowchart LR
U[User Wallet] -->|Deposit SOL| FE[Frontend]
FE -->|Swap via| JUP[Jupiter]
FE -->|Deposit/Withdraw| V[2xSOL Vault Program]
V -->|Price checks| PYTH[Pyth Oracle]
V -->|Solvency CPI| PERC[Percolator]
V -->|Mint/Burn| SPL[2xSOL Shares]
- Deposit — User deposits SOL into the vault
- Mint — Vault mints 2xSOL shares proportional to deposit value at current NAV
- Leverage — Vault maintains 2x SOL exposure through Percolator-managed positions
- Rebalance — Periodic rebalancing keeps leverage near the 2x target
- Redeem — User burns 2xSOL shares to withdraw SOL at current NAV
Percolator is a formally verified accounting and risk engine for perpetual futures and leveraged strategies on Solana, created by Anatoly Yakovenko (co-founder of Solana). Its core invariant: no account can withdraw more value than exists on the balance sheet.
2xSOL uses Percolator for:
- Solvency-first withdrawal safety gates
- Margin checks and socialization/ADL constraints
- Collateral tracking and PnL accounting
- On-chain verifiable risk parameters
Pricing uses Pyth Network v2 API with:
- Real-time SOL/USD price feed
- Staleness checks (max 300 slots)
- Confidence interval validation (max 5% band)
- Automatic price rejection if oracle data is stale or unreliable
2xsol/
├── contracts/ # Solana smart contracts (Rust + Anchor)
│ ├── programs/
│ │ └── two_xsol_vault/
│ │ └── src/
│ │ ├── lib.rs # Program entrypoints (initialize, deposit, withdraw, rebalance)
│ │ ├── state.rs # VaultState, OracleConfig, FeeConfig, RiskConfig
│ │ └── percolator.rs # Percolator CPI integration
│ ├── deployments/ # Deployment records (addresses, tx hashes)
│ └── Anchor.toml
├── frontend/ # Next.js 14 application
│ ├── src/
│ │ ├── app/ # Pages (trade, dashboard, risk, percolator)
│ │ ├── components/ # UI components (trade widget, charts, layout)
│ │ └── lib/
│ │ └── services/ # Pyth, Solana, Jupiter integrations
│ └── .env.local.example
└── docs/ # Documentation
| Layer | Technology |
|---|---|
| Smart Contracts | Rust, Anchor Framework |
| Risk Engine | Percolator (CPI) |
| Oracle | Pyth Network (v2 API) |
| Swaps | Jupiter Aggregator |
| Frontend | Next.js 14, TypeScript, Tailwind CSS |
| UI Library | shadcn/ui |
| Wallet | Solana Wallet Adapter |
| Deployment | Vercel (frontend), Solana Devnet (contracts) |
- Node.js 20+
- Rust + Cargo
- Solana CLI
- Anchor CLI
cd frontend
npm ci
cp .env.local.example .env.local # Configure RPC and program addresses
npm run devcd contracts
anchor build
anchor testcd contracts
solana program deploy target/deploy/two_xsol_vault.so \
--program-id target/deploy/two_xsol_vault-keypair.json
node init_vault_devnet.js| Instruction | Description |
|---|---|
initialize |
Create vault state, underlying token account, and shares mint |
deposit |
Deposit SOL, receive 2xSOL shares at current NAV |
withdraw |
Burn 2xSOL shares, receive SOL at current NAV |
rebalance |
Adjust leverage back toward 2x target |
pause / unpause |
Emergency circuit breaker (admin/guardian only) |
set_guardian |
Assign guardian role for operational controls |
set_percolator_config |
Update Percolator integration parameters |
init_percolator_user |
Initialize user account in Percolator |
update_oracle |
Update oracle configuration |
Leveraged products amplify both gains and losses.
- At 2x leverage, a 50% drop in SOL could wipe out your entire position
- Losses compound over time even if SOL recovers
- Smart contract bugs could result in partial or total loss
- Oracle failures could trigger incorrect rebalances
- Network congestion may prevent timely rebalancing
- No FDIC insurance or regulatory protections
Read the full risk disclosures before participating.
- See SECURITY.md for vulnerability reporting
- Threat model:
contracts/security/THREAT_MODEL.md - The protocol is currently deployed on devnet only
- Audit status: in progress
Never commit secrets. Secret scanning runs in CI.
- Website: https://2xsol.trade
- Program Explorer: View on Solana Explorer
- Risk Disclosures: https://2xsol.trade/risk
- Percolator Info: https://2xsol.trade/percolator
MIT — see LICENSE.
2xSOL is experimental software deployed on Solana devnet. Use at your own risk.
Not financial advice. Not an offer to sell or solicit. Read the risk disclosures.