Stacks
Last updated
Was this helpful?
Last updated
Was this helpful?
Velar PerpDex on Stacks enables decentralized perpetual trading without requiring account creation. The platform uses Pyth Network oracles to provide reliable price feeds that reduce the risk of unfair liquidations from temporary price wicks.
To start trading on Velar PerpDex, you'll need a Stacks-compatible wallet.
Head to and after you have a wallet set up, connect it by clicking the "Connect Wallet" button on the trading interface. Ensure your wallet is configured for the Stacks network.
Velar PerpDex allows users to provide liquidity to the sBTC/USDh trading pool and earn rewards.
Navigate to the "" tab on the Velar PerpDex interface
Select the "Add Liquidity" option
Choose your liquidity contribution method:
Single-sided liquidity: Provide either sBTC or USDh only
Two-sided liquidity: Provide both sBTC and USDh in a balanced ratio
Enter the amount you wish to contribute
Review the transaction details and confirm
When you provide liquidity, you'll receive LP tokens representing your share of the pool. These tokens track your portion of the total liquidity and can be staked for additional rewards.
You can monitor your provided liquidity in the "Pool" section, which displays:
Your current liquidity position
The market price of sBTC/USDh
Pool details including reserves and collateral
To withdraw your liquidity:
Navigate to the "Liquidity" tab
Select "Remove Liquidity"
Specify the amount of LP tokens to redeem
Confirm the transaction
Important: The maximum removable liquidity is limited by current open positions. You cannot withdraw more than the available reserves (Total Supply - (sBTC reserves + USDh reserves). The interface displays your "Max removable liquidity" to help you understand these constraints. P.S: sBTC reserves & USDh reserves refers to the amount locked for existing positions.
When you remove liquidity, you'll receive both assets (sBTC and USDh) regardless of whether you initially provided single-sided or dual-sided liquidity.
As a liquidity provider, you can earn multiple revenue streams:
Trading Fees: 75% of platform trading fees are distributed to liquidity providers
Funding Payments: Earn when providing liquidity against overbalanced positions
Providing liquidity involves certain risks:
Impermanent Loss: Price fluctuations between paired assets can lead to opportunity cost
Smart Contract Risk: Always research platform security and audits
Market Exposure: LP positions have exposure to both sides of the market
Locked Liquidity: During high volatility or heavy directional trading, portions of your liquidity may be temporarily locked
Monitor your liquidity positions regularly and adjust your strategy based on market conditions.
Velar PerpDex on Stacks implements a dual-collateral system where liquidity providers (LPs) take the opposite side of trades:
Long positions require USDh as collateral. USDh provides a stable value reference point, minimizes volatility in margin calculations, creates predictable liquidation thresholds, and aligns with the quote currency of most trading pairs.
Short positions require sBTC as collateral. Using sBTC for shorts offers several advantages, including a natural hedge against Bitcoin price movements, reduced protocol exposure to directional risk, more efficient margin utilization, and enhanced protocol solvency protection.
This structure is fundamental to how the DEX operates, allowing liquidity providers to effectively balance market exposure and manage risk.
Velar PerpDex on Stacks currently supports leverage up to 5x. This means traders can amplify their exposure by up to five times their collateral value. Higher leverage increases both potential profits and risks.
To calculate the required initial margin:
5x leverage requires 20% of position size as collateral
4x leverage requires 25% of position size as collateral
3x leverage requires 33.3% of position size as collateral
2x leverage requires 50% of position size as collateral
To open a position on Velar PerpDex:
Select either "Long" or "Short" based on your market outlook
Long positions profit when the asset price increases
Short positions profit when the asset price decreases
Enter the amount of collateral you wish to commit
For long positions, deposit USDh
For short positions, deposit sBTC
Select your desired leverage (up to 5x)
Review the position details, including:
Liquidation price
Position size
Fees
Expected funding rate
Confirm the transaction through your connected wallet
The trading fee to open a position is 0.02% of the position size. A similar fee applies when closing the position.
After opening a position, you can monitor and manage it through the Positions tab in the interface.
You can deposit additional collateral to decrease your leverage and improve your liquidation price. This provides a safer buffer against adverse price movements.
Alternatively, you can withdraw excess collateral if your position has moved in your favor, though this will increase your risk of liquidation.
Velar PerpDex charges a borrowing fee of 1.728% per day on open positions. This fee is calculated as:
3000/10^9 borrow fees per block
With approx. 4 blocks per minute on Stacks
Resulting in fees * 4 * 60 * 24 per day
These fees are automatically deducted from your collateral with every new block. Monitor your position's health to ensure fees don't push you toward liquidation.
You can close a position partially or completely by clicking the "Close" button in the position management interface.
For long positions, profits are paid in USDh. For short positions, profits are paid in sBTC.
There's no fee for closing a position.
Liquidation occurs when a position's margin falls below the maintenance requirement. On Velar PerpDex, a position is liquidated when:
(Collateral - Fees) + PnL β€ Collateral * Leverage * 1%
When liquidation is triggered:
The position is automatically closed
A liquidation fee of 0.5% of the position size is charged
Any remaining collateral after covering losses and fees is returned to your wallet
To avoid liquidation, monitor your position's health factor and consider adding collateral if you approach the liquidation threshold.
Velar PerpDex on Stacks uses Pyth Network as its primary oracle provider. The specific Pyth Oracle Feed ID for BTC/USD is:
This oracle integration ensures reliable price data for all trading operations, including position opening/closing, PnL calculation, funding rates, and liquidation triggers.
Velar prioritizes security with several key measures:
Smart Contract Audit: Conducted by Thesis Defense in July 2024, addressing critical issues and optimizing gas usage
Clarity Contracts: Written specifically for Stacks compatibility, leveraging Bitcoin's security
Robust Oracle System: Multiple price feeds reduce the risk of liquidations from temporary price wicks
Bitcoin Finality: Trades ultimately settle with Bitcoin's security via Stacks' anchoring mechanism
Velar PerpDex uses an Automated Market Maker (AMM) model where:
Traders interact with liquidity pools rather than directly with other traders
Liquidity providers deposit collateral (sBTC or USDh) to earn fees and funding payments
All trades execute against the protocol's liquidity at oracle-derived prices
This design eliminates concerns about slippage and order book depth common to traditional exchanges.