Remix.run Logo
lordnacho 7 hours ago

Sounds like you want to react to the market when you see a certain price in the incoming stream.

The trigger doesn't happen often, you when it does, the naive implementation incurs a misprediction penalty.

I wonder if the solution here might be to avoid the branch altogether?

Write some boolean logic monster that isn't an if condition. It unconditionally creates the reaction (new/cancel order), but if the trigger was not present, the payload is invalid and downstream processing will not let it out of your system onto the network.