AlphaSwap Docs
  • Introduction
    • Get Started in Aleo
    • Wrap token to swap
    • Roadmap
  • Trading
    • Token Swaps
    • Swap Tips
    • Liquidity Pools
    • Pool Risk Disclosures for Liquidity Providers
  • Perpetual
    • What is AlphaSwap Perpetual Trading?
    • How to Perpetual Trade
    • ALP Pool
    • How Perpetual Works
  • Security
    • General Notes
    • Audits
    • Bug Bounty
  • Legal
    • AlphaSwap Terms of Service
    • AlphaSwap Privacy Policy
  • Resources
    • Community Groups
    • Partnerts
    • Media Kit
  • Research
  • Welcome to Aleo
Powered by GitBook
On this page
  • Leverage
  • Hourly Borrow Rate
  • Auto Closing Positions that Exceed Maximum Leverage
  • Oracle
  1. Perpetual

How Perpetual Works

PreviousALP PoolNextSecurity

Last updated 10 months ago

Leverage

To allow for leverage, traders borrow assets from the pool to create a larger position. To create a 2x long position WALEO-USD, the other 1x WALEO will be borrowed from the pool.

This borrow leads to a hourly borrow rate to be paid to the pool. Positions always pay borrow fees and are never paid funding.

Hourly Borrow Rate

Traders pay an hourly borrow fee to the pool based on the hourly borrow rate, position size, and token utilization percentage. This is computed for each token that a trader borrows.

hourly borrow fee = tokens borrowed/tokens in the pool * hourly borrow rate * position size

For example, suppose WALEO is at 50% utilization and assuming an hourly funding rate of 0.01%. Then a trader with a long position WALEO-USD of size 1000 USD will accumulate funding fees at a rate of 0.05 USD per hour.

Auto Closing Positions that Exceed Maximum Leverage

The maximum allowed leverage is 100x. Positions where the trader's collateral less fees and less unrealized losses is less than 1% of the position size will be liquidated. Extra fund from position closure will be returned to the trader automatically.

Oracle

AlphaSwap Perps use on the trading prices and chart data. For position changes, such as opening, closing or liquidating positions, we utilize Aleo Oracle's prices. In times of congestion, we will use the backup Aleo oracles. This improves reliability for traders to adjust their positions.

Aleo Oracle TEE