submitNextPriceOrder
: Stores an order to be executed at the next price update. Only one order can be stored per asset at a time. A certain amount of fees are deducted from the account on submission: the keeper and the commitment fee. A portion of the commitment fee will be refunded if the order is executed successfully. The keeper fee will be paid to the keeper executing the order. The commitment fee is a proportional fee and is equal to the exchange fee that would be charged for a regular order. The keeper fee is equal to the minimum keeper fee (5 sUSD). The purpose of the commitment fee is to make cancellations cost as much as a regular trade to prevent free optionality, which would mean that the decision to trade is taken when next price is known, which reduces its effectiveness.cancelNextPriceOrder
: a stored order can be canceled by the account itself at any time. It can also be canceled by any other account (e.g. keeper) after the confirmation window passes (the window during which the order can be executed). If an order is canceled, the keeper fee is paid to whoever submitted the cancellation transaction, and the commitment fee is paid to the fee pool.executeNextPriceOrder
: the order can be executed by the keeper during the confirmation window (initially a minimum of 1 oracle update and a maximum of 2 price rounds). If the order executes successfully, the difference between the commitment fee and the next price fee is refunded to the account. The keeper fee is paid to whoever submitted the transaction. If the confirmation window is over, or if the order cannot be executed (reverts), the order will be canceled instead and the keeper fee will be paid to the entity canceling the stale order & the commitment fee is forfeited.This mechanism allows lower exchange fees (taker and maker) for such orders, the fees will be set to the following fee schedule below. The dynamic fee will still be added according to the dynamic fee conditions during the execution round (to prevent circumventing the dynamic fee mechanism).