Abstract
Margin trading is offered by Strike's Clearing House smart contracts. Clearing House collects and maintains the margin from traders and trades with AMM on behavior of traders. Strike will provide up to 5x leverage at the onset and allow changes based on future governance.
Leveraged Trading
Traders can only trade with Strike AMM through Clearing House, as shown in the example:
.svg)
- Bob opens an account in Clearing House.
- Bob deposits 100 DAIs to Clearing House.
- Bob takes a 5x long position of ETHDAI with 100 DAIs as collateral (fees ratio = 0 to simplify the math). The price of ETHDAI is determined by AMM: suppose the price of 1 ETHDAI is 500 DAIs, Bob can use his 5x leverage with 100 DAI to purchase 1 ETHDAI. For more details on AMM’s calculation, please see: Automated Market Maker on Strike Protocol.
- Bob checks his balance in Clearing House. Clearing House keeps records of open positions in smart contract. Bob’s current account balance is 1 ETHDAI。
- If Bob closes out his position, Clearing House would submit 1 ETHDAI to AMM and calculate current exchange rate. If current exchange rate of ETHDAI is 550 DAI, Bob would earn 50 DAIs and his account balance will be 150 DAIs after trading.
Liquidating Under-Collateralized Assets
Once trader's margin falls below the requirement threshold (15% - this could be updated by future governance), Keepers can liquidate the collaterals and earn fees.
$$
marginMaintenance = {margin + unrealizedPnL \over margin}
$$
Here is an example of how liquidation is operated:
.svg)