Limit Orders

Limit orders on the Switch utilize the native AMM as a liquidity and inventory provider. Due to this, limit orders can cause substantial or minimal slippage on limit orders based on the volume of the order and depth of the liquidity on the pair being traded. Regardless if a limit order causes a 10% slippage on the AMM pair being traded, the limit order owner still receives the amount the order was placed for. For limit orders to work, there is a free market of market making bot(s) that scan and execute trades based on their strategy and fees. A visualization: A limit order is made to purchase token X with 1 ETH. That order is created and approved so that once the AMM can support that purchase with no loss to the market making bot(s), the order is filled. With the nature of smart contracts, there are no 'automatic' executions of manually placed events such as a limit order. So as such, a free market of bot(s) continually scan limit orders to see if there are any that can be filled with any additional fees the bots want to charge. This is a free market, so any completion to these trades will mean fees should be low. Bot fees do not affect what the limit order receives, only the price of which the trade is executed at on the AMM level. If your order cannot execute without creating a 10% slippage because liquidity on the native pair is low in comparison to the trade, the trade will be executed once token X is trading at a minimum of -10% of your purchase price. This is because the limit order being executed will increase the the AMM pair price by 10% and to be able to fill the limit order with the amounts being asked for, this is the minimum deviation that needs to occur for that order to fill successfully. Although the AMM pair is affected with slippage here, the limit order is filled at the price it requested. There is also the opportunity for inventory based market making without needing to use the Switch native AMM module as a liquidity provider. Design specs, examples, and market making bot(s) coming soon.

Last updated

2023 mute.io