Perpetual Trading
BlockVault provides a full-featured interface for trading perpetual contracts on cryptocurrency markets. It is important to understand that BlockVault is exclusively a user interface — it does not operate its own smart contracts, does not custody funds, and does not perform order matching.
What Are Perpetuals?
Perpetual contracts (perps) are derivative instruments that allow you to speculate on the price of an asset — such as BTC or ETH — without owning it directly. Unlike traditional futures, perpetuals have no expiration date, so positions can be held indefinitely. Traders pay or receive periodic funding payments to keep the contract price aligned with the spot market.
The Protocol Behind the Scenes
BlockVault connects to the dYdX v4 protocol, a fully decentralized perpetual exchange running on its own blockchain (built with Cosmos SDK). All order matching, margin management, liquidations, funding rate calculations, and fee collection happen entirely on the dYdX chain.
What BlockVault Does
- Provides a visual interface to create, modify, and cancel orders.
- Displays real-time market data: prices, order books, charts, and funding rates.
- Constructs order parameters and signs them locally on your device.
- Broadcasts signed transactions to dYdX validators.
- Shows open positions, trade history, PnL, and account balances.
What BlockVault Does NOT Do
- Does not custody funds: your assets remain on the dYdX blockchain under your control at all times.
- Does not operate smart contracts for trading: all matching and liquidation logic belongs to dYdX.
- Does not set prices: prices come from on-chain oracles and the decentralized dYdX order book.
- Does not manage risk: margin requirements, liquidations, and leverage limits are enforced by the dYdX protocol.
Getting Started
Connecting Your Wallet
To start trading, connect your Ethereum wallet (such as MetaMask) through the app. BlockVault will ask you to sign a standard message to derive your dYdX trading address — this is a deterministic process, meaning the same Ethereum wallet always produces the same dYdX address. Your funds and identity are cryptographically linked, but your private keys never leave your device.
Accounts and Subaccounts
Once connected, your account on dYdX consists of two layers:
- Main account (
dydx1...): this is your Cosmos-based address on the dYdX chain. When you bridge funds from Ethereum or another network, they arrive here first. - Trading subaccount (subaccount 0): this is where actual trading happens. Collateral, open positions, and margin calculations all occur in this isolated subaccount.
Separating the main account from the trading subaccount provides an additional layer of safety — funds sitting in your main account are not at risk from trading activity until you explicitly transfer them into the trading subaccount.
Agent Wallet (Trading Key)
Normally, every order would require a wallet popup for you to sign. To provide a seamless experience, BlockVault sets up a trading key — a limited-permission key that can only:
- Place orders
- Cancel orders
- Batch-cancel orders
The trading key cannot withdraw funds, transfer assets, or access other subaccounts. It is generated once during your first session and registered on-chain with your explicit approval (your main wallet signs this registration). After that, all orders are signed instantly and locally — no popups, no delays.
You can revoke the trading key at any time from the Account tab. If revoked, the key becomes permanently invalid and a new one must be created to resume trading.
Depositing Funds
Trading on dYdX requires USDC as collateral. Getting funds into your trading account is a two-step process:
Step 1: Bridge USDC to dYdX
Use the built-in bridge (powered by Skip Go) in the Deposit panel to send USDC from Ethereum, Arbitrum, or other supported networks to your dYdX main account. The bridge uses IBC (Inter-Blockchain Communication) to transfer assets cross-chain.
Step 2: Transfer to Your Trading Subaccount
Once USDC arrives in your main account, transfer it to your trading subaccount using the "Transfer to Trading" option. This is an on-chain transaction that moves funds from your main account into the subaccount where trades are executed. The app automatically reserves a small amount (~$0.005) for gas fees when depositing close to your full balance.
Withdrawing
To withdraw, the process is reversed: transfer funds from your trading subaccount back to your main account, then bridge them out to your preferred network.
The Trade Panel
The trading interface is organized into four main sections accessible via tabs at the top of the screen.
Account Tab
This is your account management hub:
- Wallet information: your connected Ethereum address and derived dYdX address.
- Account summary: total account value, available balance, margin in use, and total position size.
- Main account balance: USDC that has arrived via bridge but hasn't been transferred to the trading subaccount yet.
- Deposit and Withdraw: panels for moving funds in and out.
- PnL chart: your cumulative profit and loss over time.
- Ledger: a detailed record of transfers (deposits, withdrawals) and funding payments received or paid on open positions.
Chart Tab
A full-featured charting experience for the selected market:
- Candlestick chart with multiple timeframe options.
- Technical indicators support (moving averages, RSI, Bollinger Bands, and more).
- Order book visualization: see live bid and ask levels with cumulative sizes, updating in real time as orders flow in.
- Recent trades feed: a live stream of completed trades showing price, size, and time.
Trade Tab
This is where you create orders. The form includes:
- Side selector: choose Long (buy) or Short (sell).
- Order type: Market, Limit, Stop Market, Stop Limit, Take Profit Limit, or Take Profit Market.
- Size input: enter the amount in USD or in the asset's native unit. A slider allows quick percentage-based sizing relative to your available balance.
- Price input: for limit and stop orders, set your desired price or trigger level.
- Leverage control: adjust leverage from 1x up to the maximum allowed for the market (up to 50x depending on the asset).
- Reduce Only mode: ensures the order only reduces an existing position — it will not open a new one.
- Take Profit / Stop Loss: set automated exit points. You can specify these as a price level or as a percentage gain/loss from your entry.
Before submitting, an order summary shows the notional value, required margin, estimated fees, and your TP/SL levels if configured.
Positions Tab
Manage your open positions and pending orders:
- Positions: every open position shows the direction (Long/Short), size, entry price, current mark price, unrealized PnL, return on equity percentage, estimated liquidation price, and leverage. You can close any position with one tap or adjust its leverage.
- Open orders: pending orders that haven't been filled yet, showing order type, price, remaining size, percentage filled, and distance from the current mark price. Each order can be modified or cancelled individually, and a "Cancel All" button is available for bulk cancellation.
- Trade history: a record of completed fills with market, side, size, execution price, and timestamp.
Pair Selection
The market selector displays all available perpetual pairs with key information at a glance:
- Asset name and icon.
- A 24-hour sparkline chart showing the price trend.
- 24-hour price change percentage (color-coded green or red).
- Current price.
- 24-hour trading volume.
You can search for specific pairs and sort by any column. The currently selected pair is highlighted.
Fee Structure
Protocol Fees (dYdX)
dYdX charges trading fees based on your rolling 30-day trading volume. Higher volume unlocks lower fee tiers. Makers (limit orders that add liquidity to the book) pay lower fees and may even receive rebates. Takers (market orders that remove liquidity) pay higher fees.
Your current fee tier is displayed in the app along with a breakdown of maker and taker rates.
Builder Fee (BlockVault)
BlockVault applies a fixed interface fee of 0.02% on every trade. This fee is included in the order, collected by the dYdX protocol, and forwarded to BlockVault's address. It is fully transparent — you can see it in the order summary before confirming any trade.
No Hidden Costs
There are no additional fees for deposits, withdrawals, or account management. Gas fees on the dYdX chain are minimal (approximately $0.005 per transaction) and are handled automatically by the app.
Order Signing and Security
All orders are signed locally on your device. BlockVault never has access to your private keys. The process works as follows:
- You connect your Ethereum wallet.
- A trading key is generated and registered on-chain with limited permissions (can only place and cancel orders — cannot move funds).
- Every order is signed with this key locally, with no wallet popup required.
- The signed transaction is sent directly to the dYdX validator network for inclusion in the next block.
This design provides a smooth trading experience comparable to centralized exchanges, while maintaining the security guarantees of self-custody. The trading key cannot be used to withdraw or transfer your funds under any circumstances.
Geographic Restrictions
Access to perpetual trading is restricted in certain jurisdictions in compliance with applicable regulations. The app performs IP-based geolocation checks, and the dYdX protocol itself independently verifies the compliance status of each registered address.