Meshswap
  • Introduction
  • What is MESH?
    • MESH Allocation
    • MESH Tokenomics
    • MESH Redistribution Policy
  • Get started
    • Create a Wallet
    • Add Polygon Network & Tokens
    • How to move your assets to wallet
      • Transferring MATIC
        • [Binance, Kucoin, Gate.io] How to move MATIC from CEX to Wallet 1
        • [Coinbase, OKX, Upbit, Bithumb, Coinone] How to move MATIC to Wallet 2
        • [Polygon Bridge] How to move MATIC to Wallet 3
      • How to get WETH, MATIC, USDC, USDT, DAI
      • How to get oETH, oMATIC, oUSDC, oUSDT, oDAI
      • XRP: The Quickest and easiest way to transfer your asset
      • How to get oXRP in your KuCoin wallet and deposit in Meshswap
      • How to transfer BUSD from Binance to the Polygon network
      • Transferring TON
        • Create Wallets supporting TON network
        • How to transfer TON from wallet to Meshswap
        • How to transfer TON from Huobi to the Polygon network
  • More
    • Risk & Security
    • Privacy Policy
    • Contract & Audit
    • Contact & Team
    • Events
      • Early-bird MESH Airdrop Events(End)
      • Meshswap x Kucoin Partnership Giveaway Event(End)
  • PRODUCTS
    • Swaps
    • Lend
      • How to deposit your assets on Lending pools
      • The Detailed Policy of Lending Pool Deposit
    • Yield Farm
      • How to deposit your assets on Yield Farming pools
    • Leveraged Yield Farm
      • How to deposit your assets on Leveraged Yield Farming pools
      • Detailed Policy of Leverage Farm
    • Long/Short Margin Trading
      • Open and Close Long/Short Positions
        • Open Long Positions
        • Open Short Positions
        • Close Long Positions
        • Close Short Positions
      • Long/Short Margin Trading Details Policy
    • Interest rate
    • Stake
      • How to stake MESH
      • Staking Policy
    • Pool Voting
      • How to participate in Pool Voting with vMESH
    • Ecopot
    • Drops
    • Pool Airdrop
    • Governance
      • Governance Voting Policy
  • DEVELOPERS
    • Contract
      • MESH
      • MESHswapRouter
      • MESHSwapView
      • Factory
      • Exchange
      • PoolVoting
      • VotingMESH
      • Treasury
      • Distribution
      • Governor
      • SinglePool
      • SinglePool Factory
      • PlusPool
      • PlusPool Factory
      • EcoPotVoting
      • EcoPot
    • Airdrop
      • Set Airdrop Operator
      • Start Airdop
    • EcoPot
      • Set EcoPot
      • Start EcoPot
  • Meshswap Protocol
  • Orbit Bridge
Powered by GitBook
On this page
  • Detailed procedures for closing short positions
  • Step 1
  • Step 2
  1. PRODUCTS
  2. Long/Short Margin Trading
  3. Open and Close Long/Short Positions

Close Long Positions

PreviousOpen Short PositionsNextClose Short Positions

Last updated 2 years ago

Detailed procedures for closing short positions

The example above assumes that the MATIC 3x long position trader opened positions at 1 MATIC = 0.5 USDC, and after a year closed all positions at 1 MATIC = 0.8 USDC.

User's account status at the time of opening is as follows.

1) Price of MATIC at opening: 1 MATIC = 0.5 USDC

2) Earn USDC lending pool deposit interest on my asset 1,000 USDC (3.00% per year), Earn MESH reward

3) Earn MATIC lending pool deposit interest on position asset 5,982 MATIC (2.00% per year), Earn MESH reward

4) USDC borrowing cost for borrowed asset 3,000 USDC incurs (6.00% per year)

At the time of closing the position after 1 year, the account situation is as follows.

1) Price of MATIC at closing: 1 MATIC = 0.8 USDC

2) My Asset = 1,000 USDC *(1+0.03) = 1,030 USDC = $ 1,030.00

3) Position Asset = 5,982 MATIC*(1+0.02) = 6101.64 MATIC = $ 4,881.31

4) Borrowed Asset = 3,000 USDC*(1+0.06) =3,180 USDC = $ 3,180.00

Step 1

When requesting position close, the borrowed asset, USDC, is first returned using MATIC, a long position token deposited in a lending pool.

To return the borrowed 3,180 USDC, 3986.96088 MATIC has to be swapped for USDC from the MATIC/USDC pool.

[Reference] Calculation of the quantity of MATIC (x) needed to return 3,180 USDC

1MATIC = 0.8 USDC, 0.3% swap fee will incur during swap.

x = 3,180/((1-0.003)*0.8) = 3986.96088265 MATIC

Step 2

Close the position by returning the 3,180 USDC earned.

* Partially returning the assets lets the user decide how many positions to close.

The following assets will be distributed to the user who has completed depositing long positions as described above.

1) My Asset 1,030 USDC (Deposit interests + 30 USDC earned)

2) Position Profit + 1,701.31 USDC (=$4,881.31- $3,180.00)

3) Additional MESH rewards from USDC and MATIC pool