Terminology
AMM Swap
AMM (Automated Market Maker) swap allows users to exchange one token for another using a decentralized exchange protocol that uses a mathematical formula to determine the asset prices, rather than a traditional order book. AMMs operate using liquidity pools. Users deposit cryptocurrencies into these pools to provide liquidity. The pools then use algorithms to set token prices based on the ratio of assets in the pool. When a user wants to trade, they swap one token for another directly through the AMM. The prices for this trade are determined by the pool's algorithm. This system allows AMMs to aim to provide continuous liquidity for a wide range of assets, which may make it easier to trade less popular cryptocurrencies.
Perpetual Contracts
A perpetual contract represents a unique form of futures contract distinguished by its absence of an expiry date, allowing traders to hold positions indefinitely. Unlike traditional futures, perpetual contracts are based on an underlying Index Price, reflecting the average price of an asset across major spot markets and their corresponding trading volumes.
As such, perpetual contracts generally trade at prices very close to those of spot markets, although during extreme market conditions, the mark price may deviate from the spot market price. The key distinction between traditional futures and perpetual contracts lies in the absence of a 'settlement date' in the latter.
Initial Margin
The initial margin serves as the minimum amount required to initiate a leveraged position. For instance, purchasing 1,000 SOE with an initial margin of 100 SOE (at 10x leverage) implies an initial margin of 10% of the total order value. This initial margin acts as collateral, supporting the leveraged position.
Maintenance Margin
The maintenance margin represents the minimum collateral balance necessary to keep trading positions open. If the margin balance falls below this threshold, traders may receive a margin call prompting them to add more funds to their account or face liquidation, depending on the exchange's policies.
In essence, the initial margin is the upfront commitment required to open a position, while the maintenance margin denotes the ongoing minimum balance necessary to sustain open positions, adjusting dynamically based on market prices and account balances.
Liquidation
In cases where the value of collateral drops below the maintenance margin, a futures account may face liquidation. The specifics of liquidation procedures vary across exchanges, typically involving a liquidation price that adjusts based on risk levels and leverage ratios.
To prevent liquidation, traders can either close positions preemptively or add funds to maintain a comfortable margin above the liquidation price.
Funding Rate
Funding in perpetual futures contracts involves periodic payments between buyers and sellers determined by the prevailing funding rate. A positive funding rate implies long positions pay shorts, while a negative rate reverses this flow. The funding rate comprises an interest component and a premium influenced by price differentials between futures and spot markets.
When the funding rate is positive due to futures trading at a premium to spot markets, long positions incur costs, potentially prompting downward pressure on prices as longs close positions and new shorts emerge.
Mark price
The mark price represents an estimate of a contract's fair value relative to its actual trading price, serving to prevent unjust liquidations during volatile market conditions. Unlike the Index Price tied to spot markets, the mark price factors in the funding rate, contributing to accurate unrealized profit and loss (PnL) calculations.
Profit and Loss (PnL)
PnL stands for profit and loss and can be either realized or unrealized. When you have open positions in a perpetual futures market, your PnL is unrealized, meaning it is still changing in response to market moves. When you close your positions, the unrealized PnL becomes realized PnL, either partially or entirely.
Realized PnL refers to the profit or loss that originates from closed positions. It has no direct relation to the mark price but is solely based on the executed price of the orders. On the other hand, unrealized PnL is constantly changing and is the primary driver for liquidations. Therefore, the mark price is used to ensure the accuracy and fairness of unrealized PnL calculations.
Oracle Pricing
SoneFi's assets pricing and keepers are powered by Pyth.
All asset pricing within SoneFi Perpetual Swaps is primarily managed using the Pyth system, which serves as the price keeper. In cases where the price remains unchanged for more than 5 minutes, our own price feeds, aggregating prices from 2-3 Centralized Exchanges (CEX), are utilized instead.
Pyth is also employed to validate keeper prices. If the keeper price deviates from the Pyth price by more than 2.5%, a spread is enforced between the Pyth price and the bounded price (Pyth +- 2.5%).
For instance, if the price of a token on Pyth is $100 and the keeper price is $103, the oracle price would be adjusted to $100 for shorts (resulting in decreasing longs) and $102.50 for longs (resulting in decreasing shorts). This adjustment does not include the market-specific bid-ask spread, which is added on top of the calculated prices to ensure market integrity and accuracy.
Last updated