The Formulas
This page shows the formulas used in mimo protocol.
Automated Market Making
In each trade, traders trade certain amount of a particular token for certain amount of another token with the price defined by a formula. There is no orderbook and waiting for fulfillment.
Based on the famous AMM equation
Pricing based on the inputs
or in code,
or in code,
where /
in above equations denotes divToInteger
, which means divide with rounding to floor of the results.
Price impact
or
in code,
Note that the price impact is always between -1
and 0
.
Cross-Trading Price Impact
If there are no direct trading pairs between two tokens, like in V1 where we only support IOTX/token pairs, traders need to use one token, such as IOTX, as a bridge to trade among two tokens.
In this case, the price impact would be
or in code,
where
Last updated