Close Long Positions

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

Last updated