Automated Market Maker (AMM) is the core constituent of Strike. Strike's AMM has following properties:
The first release of Strike offers AMM in Perpetual Futures Swap, the workflow for AMM is presented below:
Strike DAO will call Contract Factory’s createMarket function at the beginning of every derivatives contract and create a new AMM based on the following parameters:
BaseAsset
The tokens used for settlement. Strike uses DAI as BaseAsset on the first release. Other stable coins like USDC can also be used as BaseAsset in the future.
Note that BaseAsset is not an ERC-20 token and no tokens are deposited into AMM. It's a record in AMM to keep track of the pricing model.
QuoteAsset
The derivatives contract, e.g. BTCH20, ETHH20, BTCDAI, ... etc.
Note that QuoteAsset is not an ERC-20 token and no tokens are deposited into AMM. It's a record in AMM to keep track of the pricing model.
BaseAssetAmount
The initial amount of BaseAsset in AMM.
$$ BaseAssetAmount = {TotalValueOfLiquidityReserves \over CollateralizationRatio} $$
QuoteAssetAmount
The initial amount of the QuoteAsset in AMM.
$$ \mathit{QuoteAssetAmount = {BaseAssetAmount \over TWAP}} $$
TWAP is the 60 minutes (or longer, this can be updated by governance) Time-Weighted Average Price of underlying asset from Oracle.
SpreadRatio
The spread in percentage. The spread is positive when purchasing long positions and negative when purchasing short positions. This rate can be set through governance.
FeeRatio
The transaction fees in percentage. This rate can be set through governance.
Expiration
The expiration time of this contract. Expiration is set to nil if this is a Perpetual Contract.
Like Uniswap, Strike's AMM uses a Constant Product Curve to set prices automatically. Since Futures Swap differs from Token Swap, A Spread is added on Constant Product Curve to compensate the possible losses and make the AMM market neutral.