Trading Flow
Last updated
Last updated
The following figure illustrates an example trade of someone opening a 10x long on ETH with 100 USDC of collateral. For the examples throughout this document, we assume an ETH price of 100 USDC to make the math simple.
In a single transaction, the trader would send in 100 USDC to the Futureswap ETH/USDC exchange. The 100 USDC becomes the trader’s collateral.
The trader specifies how much leverage they want to go long with. In this example it’s 10x, which means that they would open a 10 x $100 = $1,000 position on ETH.
Internally, Futureswap has reserves for both ETH and USDC. Because this trade is a long on ETH they would borrow 900 USDC from the reserves and use that USDC plus 100 USDC collateral for the Uniswap trade (900 USDC borrowed + 100 USDC collateral = 1,000 USDC).
1,000 USDC is sold on Uniswap v3 for ETH, with the cost in USDC becoming the trader’s debt and the asset their equity. For the sake of this example, assume that the Uniswap v3 average price for ETH was $100. The trader got 10 ETH, and a debt of $900 to the exchange ($1,000 minus the $100 of collateral).
Debt must always be paid back, even if the trade is losing up to the point where the trader has no more collateral.
This newly purchased ETH will be returned to the Futureswap exchange and used for future liquidity.
Now the trader has exposure to the asset and the liquidity providers have earned fees while maintaining little risk to the price movement of ETH.
To close the trade, the trader sells their position assets into Uniswap and gets back stable.
If they receive more stable than their 900 USDC debt, they keep that as profit because ETH appreciated in value.
If they receive less stable than debt, they will need to cover the loss with their collateral.
In a single transaction, the trader would send in 100 USDC to the Futureswap ETH/USDC exchange.
The trader specifies how much asset they want to short.
That amount of asset is sold on Uniswap v3 for stable, and the asset becomes the trader's debt and the stable their equity.
Debt must always be paid back even if the trade is a loser, up to the point where the trader has no more collateral.
This newly purchased stable will be returned to the Futureswap exchange and used for future liquidity.
Now the trader has negative exposure to the asset and the liquidity providers have earned a fee while maintaining little risk to the price movement of ETH.
To close the trade, the trader sells their position stable into Uniswap and gets back the asset.
If it takes less stable to buy their debt amount of asset, the remainder is their profit.
If they cannot buy back their debt asset with the amount of stable they purchased, they will need to use their collateral to be able to afford the full asset debt.