Simulation Endpoints
The CoW Protocol provides simulation endpoints that leverage Tenderly to test transaction bundles before on-chain execution. These endpoints deliver comprehensive insights into state modifications, balance adjustments, and gas consumption.
POST //simulation/simulateBundle
Simulates a bundle of transactions in sequence and returns detailed execution information.
Path Parameters
- chainId (string, required): The blockchain network ID (e.g.,
1, 100, 11155111)
Request Body
An array of transaction objects:
Response
Code Examples
Response Example
Notes
Use Cases
Simulations enable verification of:
- Sufficient balance and allowance for order execution
- Expected token transfers and balance changes
- Price impact and slippage before committing
- Multi-step operations like approve + swap sequences and flash loans
- Accurate gas estimates for complex transactions
Supported Networks
Tenderly-compatible EVM chains:
- Ethereum Mainnet (1)
- Gnosis Chain (100)
- Sepolia (11155111)
Important Limitations
- Simulations use current blockchain state; pending transactions are not included
- Network fluctuations, MEV, and sandwich attacks are not accounted for
- Gas estimates should include a safety buffer (+20%) when executing actual transactions
Tenderly Configuration
The simulation endpoint requires Tenderly credentials:
Error Handling
Best Practices
- Validate inputs: Ensure all transaction parameters are correctly encoded
- Add gas buffer: Use simulation gas + 20% for actual transactions
- Check balance diffs: Verify expected token movements before executing
- Use the Tenderly link: For detailed debugging of failed simulations
- Handle failures gracefully: Simulations may fail for valid reasons (insufficient balance, etc.)
Last modified on March 4, 2026