lowerBoundTimestamp and upperBoundTimestamp. These parameters let you defer execution or enforce expiration on quotes, enabling powerful UX like scheduled actions, delayed bridging, market timing, and more.
Why Use Time Bounds?
- Scheduled execution (e.g. trigger after a certain amount of time)
- Custom expiry (e.g. keep trying to execute for five minutes, if simulation is error still - then discard)
- Sequential execution (e.g. execute a transaction every five minutes)
Setup
Instant Execution (Default Expiry)
Executes immediately and simulates until it passes or hits a default 3-minute timeout.Instant Execution with Custom Expiry
Runs immediately but expires 1 minute after quote creation if it still errors.Scheduled Execution
Quote won’t be eligible to run until 5 minutes from now.Bounded Window Execution
Will only attempt execution between 2 and 5 minutes from quote creation.Instruction-Level Time Bounds
In addition to setting globallowerBoundTimestamp and upperBoundTimestamp for the entire quote, MEE supports instruction-level time bounds. With this, you can define custom timing windows for each instruction, giving you granular control across multiple user operations and chains.
Why Use Instruction-Level Time Bounds?
- Custom time bounds for each user operation: Specify unique execution windows for every instruction.
- Different windows per chain: If your supertransaction spans multiple chains, set different timing strategies for each.
- Flexible multi-instruction orchestration: Chain together actions where some execute immediately, some wait, and some have stricter expiry.
How Does It Work?
Each instruction in yourinstructions: [] array can include its own lowerBoundTimestamp and/or upperBoundTimestamp. These timestamps override the global bounds for that instruction’s userOp.
When batching instructions on the same chain and some of them have custom instruction-level time bounds, the largest execution window is used for that chain’s batched user operation. This ensures that all instructions in the batch have the opportunity to execute.
Example
Suppose you want an ETH transfer on Optimism to run any time in the next 10 minutes, but a ETH transfer on Base should run only in the next 2 minutes.Benefits
- Fine-tuned orchestration for complex flows.
- Supports scenarios where actions on different chains require different timing guarantees.
- Enables advanced scheduling, retry, and expiry strategies on a per-instruction basis.
Developer Tips
- Timestamps are expected in seconds, not milliseconds.
- Quotes simulate continuously within the window. If execution fails for the full duration, they will revert.
- If both
lowerBoundTimestampandupperBoundTimestampare omitted, quotes execute immediately with a 2-minute fallback. - Use in combination with cleanup for robust, failure-tolerant flows.