Market Making
Anyone is welcome to provide liquidity on a level playing field. There are no advantages given to any specific parties. Market trades, limit order placement, and limit order cancelation all emit events containing the price, size, maker, and id if applicable. Individual limit order fills do not emit an event, the market trade which fills the order emits one instead. To place limit orders, the registerUser function must be first called on each pair, note that this is not necessary for regular traders using the router. The fallback function of each order book pair is designed as a gas-optimized endpoint for market makers, featuring order batching with reduced calldata size. Market orders placed using the fallback function automatically self-refer to receive both the maximum fee discount and fee rebate, and do not disqualify the user from any incentive programs. The creation of a referral code is not necessary to take advantage of this feature.
Calculating Limit Price
The limit price is equal to the quote asset in its smallest denomination multiplied by the scale factor divided by the base asset amount in its smallest denomination. For example, with an ETH/USDC market with a scale factor of 10^13, the price of 3,001.1 USDC per ETH would be represented as 30,011, as ETH has 18 decimals and USDC has 6, so (3,001.1 * 10^6) * 10^13 / (1 * 10^18) = 30,011.
For any questions or clarifications, feel free to contact our team through our Discord.
Last updated