Compute Optimal Execution
compute_optimal_executionKKT water-filling multi-pool split solver, Almgren-Chriss volatility-adjusted tranching, and MEV sandwich profitability bound with optimal slippage ceiling.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"token_in": "<token_in>",
"token_out": "<token_out>",
"amount_in": "<amount_in>",
"amount_in_usd": "<amount_in_usd>"
},
"name": "compute_optimal_execution"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Target blockchain network | |
| token_in | Yes | Input token address or mint | |
| amount_in | Yes | Input amount in base units (wei / lamports) | |
| token_out | Yes | Output token address or mint | |
| amount_in_usd | Yes | Approximate input trade value in USD | |
| sender_address | No | Optional sender wallet address for live aggregator quotes | |
| max_slippage_bps | No | User maximum slippage tolerance in basis points |