addedInput schema / properties / amm / description
Added value: +"Optional constant-product AMM swap parameters (reserveIn, reserveOut, amountIn required when included; evaluated independently of leverage; supply amm, leverage, or both)."
changedInput schema / properties / amm / properties / amountIn / description
Previous value: -"Swap input amount in atomic units"New value: +"Proposed swap input amount in atomic base units as a positive integer string (> 0)."
addedInput schema / properties / amm / properties / estimatedSandwichGasInTokenIn
Added value: +{
+ "default": "0",
+ "description": "Optional attacker gas cost in input token atomic units (>= 0) used to filter unprofitable sandwich attacks.",
+ "type": "string"
+}
addedInput schema / properties / amm / properties / feeBps / default
Added value: +30
changedInput schema / properties / amm / properties / feeBps / description
Previous value: -"Pool fee in basis points (default 30 = 0.30%)"New value: +"Pool fee in basis points (0-9999; 30 = 0.30%)."
addedInput schema / properties / amm / properties / feeBps / maximum
Added value: +9999
addedInput schema / properties / amm / properties / feeBps / minimum
Added value: +0
changedInput schema / properties / amm / properties / reserveIn / description
Previous value: -"Pool input token reserve in atomic units"New value: +"Pool input token reserve in atomic base units as a positive integer string (> 0)."
changedInput schema / properties / amm / properties / reserveOut / description
Previous value: -"Pool output token reserve in atomic units"New value: +"Pool output token reserve in atomic base units as a positive integer string (> 0)."
addedInput schema / properties / amm / properties / userSlippageBps / default
Added value: +100
changedInput schema / properties / amm / properties / userSlippageBps / description
Previous value: -"Proposed slippage tolerance in bps (e.g. 100 = 1%)"New value: +"Proposed slippage tolerance in basis points (0-9999; 100 = 1.00%)."
addedInput schema / properties / amm / properties / userSlippageBps / maximum
Added value: +9999
addedInput schema / properties / amm / properties / userSlippageBps / minimum
Added value: +0
addedInput schema / properties / leverage / description
Added value: +"Optional perpetual/margin position parameters for exact liquidation price and initial health factor (entryPrice required when included; evaluated independently of amm)."
changedInput schema / properties / leverage / properties / entryPrice / description
Previous value: -"Entry asset price (e.g. '2500.00')"New value: +"Position entry price as a positive decimal string with up to 18 decimals (e.g., '2500.00')."
addedInput schema / properties / leverage / properties / feeBufferBps
Added value: +{
+ "default": 10,
+ "description": "Fee buffer in basis points deducted from initial margin (0-9999; 10 = 0.10%).",
+ "maximum": 9999,
+ "minimum": 0,
+ "type": "integer"
+}
addedInput schema / properties / leverage / properties / leverage / default
Added value: +"1"
changedInput schema / properties / leverage / properties / leverage / description
Previous value: -"Leverage multiplier (e.g. '10')"New value: +"Leverage multiplier as a decimal string between '1' and '1000' (e.g., '10')."
addedInput schema / properties / leverage / properties / maintenanceMarginBps / default
Added value: +50
changedInput schema / properties / leverage / properties / maintenanceMarginBps / description
Previous value: -"Maintenance margin in bps (default 50)"New value: +"Maintenance margin threshold in basis points (0-9999; 50 = 0.50%)."
addedInput schema / properties / leverage / properties / maintenanceMarginBps / maximum
Added value: +9999
addedInput schema / properties / leverage / properties / maintenanceMarginBps / minimum
Added value: +0
addedInput schema / properties / leverage / properties / side / default
Added value: +"LONG"
addedInput schema / properties / leverage / properties / side / description
Added value: +"Position direction: LONG or SHORT."
addedInput schema / properties / leverage / required
Added value: +[
+ "entryPrice"
+]
addedInput schema / properties / tier
Added value: +{
+ "default": "FULL",
+ "description": "Billing & output depth: FULL ($0.15 USDC) returns exact amm and leverage structures; ESSENTIAL ($0.10 USDC) returns top-level action, signal, and savedCapitalEstimateUsd only.",
+ "enum": [
+ "FULL",
+ "ESSENTIAL"
+ ],
+ "type": "string"
+}
changedOutput schema / (root)
Previous value: -nullNew value: +{
+ "additionalProperties": true,
+ "properties": {
+ "action": {
+ "description": "Trade or margin risk gate decision.",
+ "enum": [
+ "PROCEED",
+ "ABORT_HIGH_MEV_RISK",
+ "ABORT_CRITICAL_LIQUIDATION_RISK"
+ ],
+ "type": "string"
+ },
+ "amm": {
+ "additionalProperties": true,
+ "description": "Exact BigInt swap metrics and optimal MEV sandwich profitability bounds (FULL tier only, when amm supplied).",
+ "type": "object"
+ },
+ "leverage": {
+ "additionalProperties": true,
+ "description": "Exact liquidation price, distance-to-liquidation %, and health factor (FULL tier only, when leverage supplied).",
+ "type": "object"
+ },
+ "proportionalRescueCommissionPolicy": {
+ "additionalProperties": true,
+ "description": "0.15% Pre-Flight swap and 5%-10% Safe-Harbor terms (FULL tier only).",
+ "type": "object"
+ },
+ "savedCapitalEstimateUsd": {
+ "description": "Estimated MEV or liquidation loss avoided.",
+ "type": "string"
+ },
+ "settled": {
+ "description": "Whether x402 USDC payment settled cleanly.",
+ "type": "boolean"
+ },
+ "signal": {
+ "description": "Traffic-light execution signal.",
+ "enum": [
+ "GREEN_LIGHT",
+ "RED_LIGHT"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "settled",
+ "action",
+ "signal",
+ "savedCapitalEstimateUsd"
+ ],
+ "type": "object"
+}