šøMargin Specs
Last updated
Last updated
In the context of NFTFN, Money Deposited refers to the funds that traders deposit to the protocol vault.
For instance, if Trader A deposits 100 WETH into the NFTFN protocol, that 100 WETH represents the Money Deposited.
Escrowed pertains to the funds deposited (Money Deposited) and represents a trader's realized Profit and Loss (PnL). This can encompass both profit and loss outcomes.
Suppose Trader B initially deposited 200 WETH and, through trading, realized a profit of 40 WETH and a loss of 20 WETH. The Escrowed amount for Trader B would be 220 WETH, as it reflects the summation of their net realized PnL and money deposited.
Free Collateral, also called withdrawalable balance, represents the amount of funds a trader can withdraw from their trading account while still maintaining their active positions and open orders.
Let's consider Trader A from the previous example who initially deposited 100 WETH. Now, if Trader A decides to place a market order for 20 WETH and has additional open orders (Limit Orders) worth 20 WETH, their Free Collateral can be calculated as follows:
100 WETH - [(20 WETH + 20 WETH) / 10] Trader A's Free Collateral = 60 WETH
Locked balance is the sum of all Open orders and the minimum margin that the user has to maintain in the margin account to maintain the current open position. It reflects the portion of a trader's total buying power that is available to place limit orders, excluding any orders that have failed or been canceled.
Continuing with the previous example involving Trader A, who maintains active Limit Orders worth 20 WETH and a Current Position of 20 WETH, this implies that Trader A's Locked Balance stands at 32.5 WETH, i.e. (20 * 0.1 + 20 * 0.0625) * 10.
Leverage is a measure of your borrowing capacity to open and maintain a position in your trading or investment account. The leverage is calculated as follows:
Let's say the current position value is 2 times your account value:
Leverage = (2 * 10) / 10 = 2
So, in this scenario, your leverage is 2, meaning you can control a position that is 2 times the value of your account balance.
New Leverage refers to the adjustment in leverage associated with both limit and market orders.
For example, if you are presently utilizing a 5x leverage and opt to enter a trade with an additional 2x leverage, your updated leverage will be 7x.
Essentially, 'New Leverage' represents the altered leverage level resulting from the execution of a trade, whether it's executed as a limit order or directly as a market order. It quantifies the change in leverage triggered by the execution of the trade.
Expected Price is the calculated average price at which a series of orders, each with a specific quantity and execution price, would be expected to be executed. It represents the anticipated average price of SNV that you get while making a trade.
'n' represents the total number of orders taken into account in the calculation.
Unrealized Profit and Loss (PNL) represents the PNL (Profit and Loss) associated with your current position that has not yet been realized.
To put it simply, it's the profit or loss you would make if you were to close your position at the current market value.
if you initiated a position at an initial rate of 10 WETH and the current market value has risen to 15 WETH, your unrealized PNL for each quantity of SNV you traded would be 5 WETH.
This is called 'unrealized' because this profit or loss has not been added or deducted from your account balance yet, as you have not closed your position.
In essence, when a trader's position experiences a change in value without being closed, this change is quantified as the Unrealized PnL
Realized Profit and Loss (PNL) represents the actual profit or loss resulting from closing a position at its current market value.
To put it simply, it's the profit or loss you have realized by squaring off or closing your position.
For example, if you initially opened a position at a rate of 10 WETH and later closed it at the current market value of 15 WETH, your realized PNL would be 5 WETH.
This is called 'realized' because this profit or loss has been added or deducted from your account balance as you have successfully closed your position.
In essence, when a trader closes their position, the resulting profit or loss is quantified as the Realized PnL.
However, in the context of NFTFN, there's also something called Funding Delta that goes into calculating Realized PnL, which will be explained next.
At a trading platform like ours, it is crucial to maintain a close alignment between the Mark Price and Index Price. However, there are instances when the Mark Price exceeds the Index Price, leading traders to purchase our index (SNV) at a higher cost or vice versa.
In order to rectify this difference and guarantee that the Mark Price aligns with the Index Price, the protocol employs a penalty system. This penalty applies to traders who hold long positions on SNV (buyers) when the Mark Price surpasses the Index Price. Similarly, it affects traders with short positions on SNV (sellers) when the Index Price exceeds the Mark Price. The resulting penalties are then redistributed to the corresponding counterparty traders. The extent of penalization depends on two key factors: the quantity of SNV held by the traders and the difference between the Mark Price and Index Price.
In essence, when the Mark Price exceeds the Index Price, long positions compensate for short positions, and vice versa. This intricate mechanism is known as Funding Delta and serves as a pivotal tool for maintaining the close alignment of Mark Price and Index Price on our platform.
Magin Usage quantifies the percentage of your total available margin that you have utilized for your trading activities.
It is calculated as:
As an example, if your margin account contains 100 WETH, and you've employed 50 WETH of it for your trading positions, this implies that you have utilized 50% of your available margin.
In essence, it's a numerical representation indicating how much of your wallet's funds are currently allocated to open trades.
It represents the change in your margin when you execute a trade.
Imagine you are presently using 50% of your available margin, and you opt to execute a trade that would require an additional 20% of your margin. In such a case, the New Margin Usage would depict an increase from your initial 50% to a new level of 70% in your margin utilization.
For a more detailed breakdown, consider that you possess 100 WETH in your margin account, and you've already assigned 50 WETH from it to your existing positions. Now, with the execution of this new trade, which consumes an extra 20 WETH, your margin utilization elevates to 70%.
In essence, New Margin Usage provides a clear picture of how your margin allocation changes when you execute a trade.
The Margin Ratio is a crucial metric used to measure the level of risk associated with a given position. It is calculated by dividing the escrowed value by the position notional value.
For example, if you deposit 10 WETH and go long on 5 SNV at a price of 20 ETH, your Margin Ratio would be 0.1 ((100-90)/100).
Here, the current position value, as per the Mark Price, stands at 100, reflecting the positive (5*20). The negative is the 90 that has been borrowed from the platform in the form of leverage.
However, as SNV prices fluctuate, so does the Margin Ratio.
For instance, if the price of SNV were to rise to 25 ETH, your unrealized profit would be 25 ETH, thus increasing the value of your collateral to 35 WETH. This would result in a new Margin Ratio of 0.28 ((125-90)/125). Here, the current position value, as indicated by the Mark Price, stands at 125, which is a positive (5*25). Conversely, the negative is the 90, which is a loan obtained from the platform through leverage. On the other hand, if the price of SNV were to decrease to 19 ETH, the value of your collateral would decrease to 5 WETH, resulting in a Margin Ratio of 0.052 ((95-90)/95). Here, the current position value, calculated based on the mark price, is 95, representing a positive (5*19). On the flip side, there is a negative associated with 90, which is a loan acquired from the platform through leverage.
Monitoring the Margin Ratio regularly is essential, as a low ratio may indicate a high level of risk for the position.
Buying power refers to the maximum amount you can go long or short on using the available balance in an account. NFTFN is currently offering leverage of 10x on SNV, which means that for every WETH deposited, you can buy up to 10 WETH worth of SNV.
Initial Buying Power
New Buying Power
For Limit Order,
a) No Side/Same Side
b) IQ < CQ Side Different
c) IQ < CQ Side Different
Where IQ -> Input Quantity, i.e., the user's value that is entered in the input field. CQ -> Current Position Quantity, i.e., the current position quantity of the user.
For Market Order,
a) Same Side
b) IQ < CQ Side Different
c) IQ < CQ Side Different
Where EP is the Expected Price / Execution Price. Further details on this is discussed later in the document.
For instance, if you deposit 10 WETH into your account, your buying power becomes 100 WETH (10 WETH x 10x leverage). This means you can now open a short position of 2 SNV at a price of 10 ETH. This would result in a new buying power of 80 WETH (100 - 20), as you have used a portion of your available balance to open the short position.
The price of a derivative in our native market is called Mark Price. To determine this value, we use a method known as an order book price discovery, which serves as the primary mechanism for price discovery.
In this scenario, imagine you have deposited 10 WETH and taken a long position of 5 SNV at a price of 20 WETH. Your initial account value would be 10 ETH. However, five days later, the value of SNV increases to 30 ETH, and you incur a funding fee of 0.0002 WETH. As a result, we would then calculate your account value as 10 ETH + [5 SNV * (30 ETH - 20 ETH)] - 0.0002 ETH = 59.998 WETH.
Risk Factor serves as an indicator of your susceptibility to liquidation in trading. To put it in perspective, let's say you face liquidation when your Margin Ratio (MR) touches 0.0625.
As you approach the 0.0625 MR threshold, your risk factor steadily increases. Conversely, when you are closer to an MR of 1, your risk factor is minimal.
It's important to note that the Margin Ratio can vary between 1 and 0, with your risk factor being at its lowest when MR is 1 and at its highest (100) when MR reaches 0.0625.
Imagine Trader X, whose Margin Ratio (MR) is currently 0.4. This MR reflects a relatively conservative level of risk. If the liquidation threshold is set at MR 0.0625, Trader X is comfortably below it. Consequently, Trader X's Risk Factor is low, perhaps around 15.6%. This indicates a low likelihood of liquidation, given their current trading portfolio. However, let's consider Trader Y, whose MR is 0.07, just slightly above the liquidation threshold. Trader Y's Risk Factor is higher, approximately 89.28%. This signifies a moderate to high level of risk and suggests that Trader Y needs to be cautious to avoid liquidation.
In summary, the Risk Factor quantifies the likelihood of a trader's position being liquidated based on their Margin Ratio, with lower values indicating higher risk and higher values indicating lower risk.
The New Risk Factor is a dynamic measure that reflects the probability of getting liquidated when you execute a trade.
To illustrate, let's consider Trader A whose current Risk Factor stands at 20%. This means that, at this moment, there is a 20% chance of Trader A's position being liquidated based on their current portfolio and trading activities
Now, Trader A has decided to initiate a new trade with a higher level of risk. After executing this trade, Trader A's Risk Factor undergoes a change, increasing to 30%.
This change signifies that the trade they are about to make has the potential to significantly impact their portfolio's risk profile. It raises the probability of liquidation to 30%, indicating a higher level of risk associated with this particular trade.
In essence, the New Risk Factor provides Trader A with a real-time assessment of how a new trade can influence the overall risk of their trading portfolio, helping them make informed decisions regarding their risk exposure.
The Health Factor serves as the complementary counterpart to the Risk Factor, reflecting the overall well-being and stability of your trading account. As mentioned earlier, the relationship between the Risk Factor and the Health Factor is such that when your Risk Factor is higher, your Health Factor is correspondingly lower, signifying a healthier account.
Consider Trader D, who has a Risk Factor of 80%. This indicates a relatively high level of risk in their trading account. Consequently, their Health Factor would be 20%, as it is the complement of the Risk Factor (100% - 80%).
In this case, a higher Risk Factor of 80% signifies a less healthy account with a higher risk of liquidation.
In essence, your Health Factor is a positive indicator of the robustness of your trading account and the reduced likelihood of liquidation. It's a simple yet powerful metric that showcases the health of your account, providing a reassuring measure of its stability.
The All Time Profit and Loss (PnL) serves as a comprehensive metric that provides an overview of your overall trading performance and efficiency.
For instance, consider a trader who has been actively making trades since T0 (the start of their trading journey). All Time PnL for this trader would encompass the sum of all the profits earned from T0 until the present moment, minus any losses incurred during that period.
For example, let's say Trader A began trading with an initial investment of 10 WETH at T0. Over time, they accumulated a total profit of 5 WETH from successful trades while incurring 2 WETH in losses. In this case, Trader A's All Time PnL would be 3 WETH, representing the net profit they have generated throughout their trading history.
Liquidation Price is a crucial metric that indicates the threshold at which your trading position becomes vulnerable to liquidation in the market. It's contingent on whether you are in a long or short position.
For a more detailed breakdown of Liquidation, refer to our Liquidation Section.
represents the summation symbol, signifying the need to sum the values for each order within the range from 1 to n.
corresponds to the quantity of the ith order in the series.
stands for the price at which the ith order was executed.
The value of your account, represented by the Is the sum of your Escrowed, Unrealized PnL and Cumulative Funding Value.