For traders, it could be a significant cost and convenience improvement if they could place orders that where the price constantly updates according to some oracle.
We could imagine that there is a price feed available on Ethereum for the €/$ rate. A trader might want to reference this price feed and just define a spread. Another example would be the rate between DAI/CHAI or DAI und cDAI. Those rates can be queried from the blockchain.
So a first idea could be that you could define the price as an arbitrary function call on Ethereum (with e.g a 30k gas limit) However - we must always assure that once a batch closes the state of the batch is 100% defined and can be accessed by a solver for the next 4 minutes without any risks of state changes/ race conditions. A function could, of course, return a different value at different times.
However - we could have “price-slots” that can have an owner (EOA or a contract) which would always store 2 values; a current one that can be altered by the owner and a “last batch” value that can no longer be changed. An order could reference those values (in both buy and sell amount)
Example given:
There could be such a slot that contains the number of how much DAI you could currently get for 10^19 CHAI.
An order that want to express selling 10,000 CHAI at market rate minus a 0.01% spread could look like
sell_amount = 10000 * 10^18
buy_amount = 9999 * SLOT
The owner of this slow could be a simple contract that can be “pinged” by anyone and then would simply update the value to the current rate it gets from the CHAI contract.