π§Stacks
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.
Connecting Your Wallet
To start trading on Velar PerpDex, you'll need a Stacks-compatible wallet.
Head to perpdex.velar.com 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.
Providing Liquidity
Velar PerpDex allows users to provide liquidity to the sBTC/USDh trading pool and earn rewards.
How to Provide Liquidity
Navigate to the "Pool" 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.
Managing Your Liquidity
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
Removing Liquidity
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.
Earning Rewards
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
Liquidity Provider Risks
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.
Collateral Structure
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.
Leverage Limitations
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
Opening a Position
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.1% of the position size. No fee is applied when closing the position.
Managing Positions
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.
Borrowing Fees
Velar PerpDex applies a borrowing fee on open positions, calculated per block and automatically deducted from your collateral. The fee structure is:
Base borrowing fee: 3000/10^9 per block
With approximately 4 blocks per minute on Stacks
Daily fee calculation: (Base fee Γ 4 blocks/min Γ 60 min Γ 24 hours)
These fees accumulate with each new block. Monitor your position's health to ensure borrowing fees don't push you toward liquidation, especially during extended holding periods.
Closing a Position
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 Process
Liquidation occurs when a position's margin falls below the maintenance requirement. On Velar PerpDex, a position is liquidated when:
(Collateral - Fees) β€ Collateral * Leverage * Liquidation Threshold
(Collateral - Fees) + PnL β€ Collateral * Leverage * Liquidation Threshold
Fees = Borrow fee + Funding fee paid
Liquidation Threshold: Currently set at 1%
When liquidation is triggered:
The position is automatically closed
A liquidation fee of 50% of the remaining collateral is charged
All remaining collateral after deducting fees is returned to your wallet
To avoid liquidation, continue to monitor your position's remaining collateral and net value. Important: Funding fees received are not counted in remaining collateral calculations and won't impact liquidation price or margin requirements.
Liquidation Risk Level Indicators
Velar PerpDex provides real-time liquidation risk assessment to help traders manage their positions effectively. The system categorizes risk into three levels based on remaining collateral after accounting for fees and unrealized losses:
Risk Categories
High Risk (Less than 25% collateral remaining)
Position requires immediate attention
Strong potential for liquidation if market moves adversely
Medium Risk (25-75% collateral remaining)
Position should be monitored closely
Moderate liquidation potential with significant price movements
Evaluate risk tolerance and market conditions
Low Risk (Above 75% collateral remaining)
Position has adequate margin buffer
Lower probability of liquidation under normal market conditions
Comfortable trading range for most market scenarios
Liquidation Threshold Calculation
A position becomes liquidatable when either condition is met:
Remaining Collateral falls below the liquidation threshold
Net Position Value falls below the liquidation threshold
As described above, the liquidation threshold is currently set at 1% of order size. A position becomes liquidatable when either the remaining collateral or net position value equals or falls below this calculated threshold.
Example Calculation
For a $1,000 collateral with 2x leverage, hence a $2000 position:
Liquidation Threshold = $2,000 Γ 1% = $20
Position becomes liquidatable when remaining collateral or net value drops below $20
This threshold acts as the final safety net before automatic liquidation occurs, protecting both traders and the protocol from negative equity situations.
Risk Monitoring Best Practices
Monitor your risk level indicator regularly, especially during volatile market conditions
Maintain adequate collateral buffers above the minimum requirements
Security and Technical Details
Oracle Implementation
Velar PerpDex on Stacks uses Pyth Network as its primary oracle provider. The specific Pyth Oracle Feed ID for BTC/USD is:
0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a315b43
The specific Feed ID for STX/USD is: 0xec7a775f46379b5e943c3526b1c8d54cd49749176b0b98e02dde68d1bd335c17
This oracle integration ensures reliable price data for all trading operations, including position opening/closing, PnL calculation, funding rates, and liquidation triggers.
Security Measures
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
Architecture
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.
Last updated
Was this helpful?