Futures
Unlike general swaps, indefinite futures trading is possible through Orderbook. Futures trading is when a buyer purchases an underlying asset at a predetermined price on a specific future date. In order to predict and respond to changes in the asset's value in the future, the buyer can execute the contracted transaction at the price at the time of the transaction at a desired time in the future.
Positions
In trading, there are two primary types of positions: long and short.
Long
A long position is taken when an investor anticipates that the price of the underlying asset will increase over time. This position entails buying the asset with the expectation of selling it at a higher price in the future, thereby profiting from the price appreciation. When opening a long position, the investor buy base tokens using quote tokens. Subsequently, upon closing the position, the investor sells the base tokens acquired earlier, ideally at a higher price, thereby realizing a profit. For instance, initiating a long position in the ETH/DAI market involves paying DAI initially. Upon closing the position, if the price of ETH has appreciated, the investor will receive more DAI than initially paid, thus realizing a profit.
Short
A short position is taken when an investor anticipates that the price of the underlying asset will decrease over time. This position entails selling the asset with the expectation of buying it at a lower price in the future, thereby profiting from the price decline. When opening a short position, the investor get quote tokens by selling base tokens. Subsequently, upon closing the position, the investor buy the base tokens acquired earlier, ideally at a lower price, thereby realizing a profit. For instance, initiating a long position in the ETH/DAI market involves paying ETH initially. Upon closing the position, if the price of ETH has declined, the investor will receive more ETH than initially paid, thus realizing a profit.
Order
Open
When opening a futures trade, the position is opened immediately with the amount paid through a market order. Once the position is opened, the trader is provided with an OrderNFT, where the status of the position is displayed. For trades that have not been liquidated, they are marked as 'Open', And the profit or loss associated with the position will be displayed in its OrderNFT.
Close
Closing an open futures trade involves settling profits and losses. This action can only occur in positions that have not yet been liquidated, meaning the margin hasn't been exhausted.
To close a position, the assets purchased at the predetermined price during the opening of the futures trade are sold back to the market. This action realizes profits, which are settled by executing a market order as a reverse trade. It's important to note that the amount assessed on the OrderNFT and the amount obtained when selling in the actual market may differ slightly due to market liquidity and price slippage.
Closing a position is also related to the liquidity status of the market. If there is not enough liquidity in the market to close the position, so the return amount is not enough to repay the loan amount (leverage) at least, during the reverse trade for settlement, the position cannot be closed.
When close a opened position successfully, traders can earn 1 credit score, Also the closing of positions means selling the trading amount at market prices through the execution of market orders for settlement. As part of this process, traders receive a cashback of 0.33% in MECA from the 1% transaction fee deducted from the order amount.
Margin
Margin in futures trading refers to the collateral or funds that traders are required to deposit in order to open and maintain leveraged positions. So to open a position with leverage, traders are required to deposit a portion of the position's value as collateral, known as margin. But It's important to note that losses can exceed the initial investment, leading to a margin call or liquidation of the position. When it occurs, there could be losses in all the margin funds.
Leverage
Futures trading offers leverage, allowing traders to control large positions with relatively small amounts of capital. It allows trades of sizes ranging from 1x made entirely of the trader's assets only to larger, including leverage. While leverage can amplify profits, it also increases the potential for losses. Traders should use risk management strategies to protect against adverse price movements.
Lender
Lenders facilitate trading with leverage by providing loans of funds to traders. They participate in the ecosystem as lenders through Lender Pools or can be it building Smart Contracts for Lending (custom implementations). When a trader provides collateral as a margin, the lender adds a loan amount and executes orders on behalf of the trader. This is a process that ensures that the loan amount can be used to open a position right away, and even if the Lender places the order on his/her behalf, the trader remains the owner of the order. When participating as a lender through a separate contract, it's possible to set collateral ratios and interest rates for the loans.
Liquidation
The liquidation threshold for futures trading is 85%. Liquidated futures trades are marked as Liquidated in OrderNFT. This means that in futures trading, if the value of the paid margin falls by more than 85% based on 100% at the time of payment, the position will be automatically liquidated due to insufficient margin. If the futures contract is liquidated, you may lose the entire margin paid.
When a position is liquidated, the margin, excluding leverage, is divided between the vault, liquidator, and lender, 1/3 each. In the case of a lender, if a separate interest rate is set, the interest rate is included in that above amount. So, depending on the interest rate, the liquidation period of the position becomes faster, and the faster the liquidation occurs, the faster the lender can make a profit.
Coinmeca DEX is an Orderbook DEX based on a non-oracle system. Therefore, it uses its own order book prices to estimate the value fluctuation of the collateral. In the Market, two types of assets are traded, and the direction of the corresponding token in the Orderbook can manifest in two ways: one asset's value increases or decreases more than the other's. Consequently, in margin value estimation, we narrow down to these two possibilities, aligning with movements in the Orderbook, and thereby deriving a fixed liquidation price. This mechanism facilitates precise liquidation at a specific time point. In simpler terms, if the anticipated number of opposing tokens obtainable from selling the margin at the current time is less than 15%(100 - 85) of the initial quantity compared to the number of opposing tokens obtainable from selling the margin paid at the position's opening, liquidation will occur.
Liquidate
The liquidation process can be triggered by anyone, including the position owner or other traders, for positions that are targeted for liquidation. So, also the trader who owns the position can liquidate their position. Even in such cases, they are eligible to receive compensation through the position settlement process, And this compensation amounts to one-third of the collateral in MECA. This mechanism encourages the swift settlement of unsettled positions.
Liquidator
Through the NFT Marketplace, anyone can publicly verify positions that have been liquidated. When the status of a specific order is marked as 'Liquidated', it becomes the subject of the actual liquidation process to settle funds. By identifying the Key or TokenId of the order available through the OrderNFT of the liquidated order, one can attempt to "claim" the position, thereby initiating its liquidation. When a position is liquidated, the liquidator(claimant) can receive compensation in MECA equivalent to one-third of the collateral at the prevailing MECA exchange rate. Since the collateral at the time of liquidation is converted to base for long positions and to quote for short positions, its value fluctuates with market movements. Consequently, the compensation for the liquidator may vary depending on the MECA exchange rate at the time of liquidation.
When liquidate a position, traders can earn 2 credit score.
Risk
Due to the amplified risk of leverage trading, risk management is crucial because traders can lose all of the funds. It's essential to have a clear understanding of the risks involved and only trade with funds that can be comfortably risked.