DeepBook Margin
DeepBook Margin extends the trading capabilities of DeepBookV3 by enabling leveraged trading positions. With margin trading, users can borrow funds to increase their buying power.
Key features​
DeepBook Margin provides the following capabilities:
- Leveraged positions: Trade with borrowed funds to increase position sizes beyond available capital
- Risk management: Built-in liquidation mechanisms to protect lenders and maintain system solvency
- Collateral flexibility: Support for multiple assets as collateral for isolated margin positions
- Interest accrual: Transparent interest rate calculations for borrowed funds
Risk considerations​
Margin trading carries additional risks, including the potential for liquidation if positions move against the trader. Users should understand these risks before engaging in margin trading on DeepBookV3.
Liquidation mechanisms​
When a margin position falls below the maintenance margin requirement, the position is liquidated to protect lenders and maintain system solvency. The liquidation engine operates onchain through smart contracts, ensuring transparent and fair execution.
Interest rates​
Interest rates for borrowed funds are calculated transparently based on utilization rates and market conditions.
Design
Learn about DeepBook Margin design, including MarginPool, MarginManager, and MarginRegistry shared objects.
Margin Risks
Understand the risks of margin trading on DeepBook, including liquidation, interest rate fluctuations, and how to protect your positions.
Contract Information
DeepBook Margin SDK
Indexer
DeepBook Margin Indexer provides access to margin trading events including loans, liquidations, and margin pool operations.