π«Isolated Margin (GMX)
Last updated
Last updated
This product is fully on-chain, sourcing liquidity directly from GMX v2. It currently has access to 21 underlying perpetual markets. In an upcoming product update, you will not only be able to open and close a Long/Short trade in 1 click with up to 50x leverage, but also mint every position as an NFT (ERC-721) giving full composability across DeFi
How does it work?
The user opens Pear Protocol's /trade
page. Choose to trade with Isolated Margin
.
Then, the user chooses a pair of assets to long and short.
The user confirms the collateral of USDC to use for the transaction, along with the amount in USDC (pre-approved).
Pear Factory contract takes an opening fee and stores in the smart contract to be withdrawn by the treasury (MPC address).
Pear Factory contract determines which Pear Adapter to use, and then deploys a proxy (ERC1967) with the selected Pear Adapter implementation.
Pear Factory contract calls the createPair
method from the smart contract, sending the original amount minus the open fee.
Depending on the implementation of the adapter and the external platform, a pair trade will be created there. The owner of the trades will be the proxy. The external platform may or may not take open fees
Depending on the external platform implementation, some more calls by our off-chain components may be needed
Pear Factory contract can mint an NFT (ERC721)
Closing a trade
Select Close Trade from the UI
Proxy closes trades, sends PnL minus fee to position owner
NFT will be burned (the image will remain in your dashboard)
When trading with Isolated Margin the UI will document the estimated liquidation price automatically. However, it is worth noting that each leg shall have its own individual entry and liquidation price.
When using high leverage it is likely that one leg can be individually liquidated without warning. Leaving just the opposing leg running.
The UI will show the Entry Price, Estimated Liquidation Price, Collateral, PnL, and Net Value of just the open leg once this has happened. Users will also get a description of this directly on their position list, indicating which side of the trade was liquidated and which one is still being tracked.
Users can monitor their individual liquidation prices by navigating to the hamburger menu (3 dots) for any given position and viewing their trade details.
Here they will be able to see the liquidation prices for each individual leg:
We have also built the functionality for users to manage their collateral and deposit or withdraw collateral accordingly.
Read more on GMX here.
It is therefore recommended to be careful with the leverage and size of trades when using the platform, thus avoiding potential loss of funds suddenly.