# Twin Protocol

### Use case scenario

Traders in **Twin Protocol** PvP AMM can open long or short positions at the current spot price of the asset. They are required to pay a funding fee based on the ratio of longs to shorts. If the total profit and loss for traders is negative or close to zero, the system is functioning as expected. However, if there are periods where the total profit and loss is positive, the protocol needs a way to compensate for the difference. This is proposed to be done using an intermediary token called TLP.

Here is an example of how **Twin Protocol** PvP AMM exchange would work:&#x20;

1\) Jane opens an ETH long position of size $10,000 and deposits 1000 USDC as collateral, which mints 1000 TLP tokens and keeps them in the pool.&#x20;

2\) Tom opens an ETH short position of size $20,000 and deposits 2000 USDC as collateral, which mints 2000 TLP tokens and keeps them in the pool.&#x20;

3\) The pool now holds a total of 3000 USDC and 3000 TLP tokens, with the price of 1 TLP token being 1 USDC.&#x20;

4\) If the price of ETH increases by 5%, and both Jane and Tom close their positions, Jane will have 1500 TLP tokens, while Tom will have 1000 TLP tokens.&#x20;

5\) The pool still has 3000 USDC, but there are now 2500 TLP tokens in existence, and the price of 1 GD token is now 1.20 USDC.&#x20;

6\) In this scenario, Jane has made a profit of 800 USDC, compared to a profit of 500 USDC if she were using a regular trading platform. Tom has made a loss of 800 USDC, compared to a loss of 1000 USDC if he were using a regular trading platform. This is due to traders making a loss on average, though with funding fees to balance the sides, the difference would likely be less.&#x20;

7\) If the price of ETH decreases by 5% instead, Jane will have 500 TLP tokens, while Tom will have 3000 TLP tokens. In this case, there will be 3000 USDC in the pool and 3500 TLP tokens, resulting in the price of 1 GD being around 0.857. The value of Jane's TLP tokens will be 428.50 USDC, resulting in a loss of 571.50 USDC for Jane, while Tom will have made a profit of 571.50 USDC. This asymmetric payoff for Jane should further incentivise users to take on the minority side, especially if they can hedge the position, and would help to keep the longs and shorts balanced.



### Fees

The **Twin Protocol** will charge a fee for certain actions involving opening position, such as funding rate and closing the position. This fee is also charged during the liquidation process. The fee is converted into USDC, and a percentage is distributed as rewards to users staking $TWIN through the Master Vault. The purpose of this fees is to help support the operation and maintenance of the Twin Protocol.
