Zum Inhalt
HALOWERK

Defiwerk

mev / risk

Takes chain, token pair, input amount and slippage tolerance, finds the pool the trade would most likely use and reads its live state. The maximum the caller can lose is arithmetic and exact: the gap between the quoted output and the minimum output their own tolerance permits. The attacker profit is an estimate and labelled as one — the profit-maximising front-run size is searched for inside a constant-liquidity pool model, bounded by the largest front-run the caller own tolerance still.

POST https://defi.halowerk.com/mev/risk

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
chainstringJa
token_instringJa
token_outstringJa
amount_instringJaInput amount in whole token units as a decimal string.
slippage_bpsintegerNein
routestringNeinOptional pool address to assess instead of the automatically chosen one.
scan_historybooleanNeinScan past Swap events for actual sandwiches. Costs time; switch off for a faster answer.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "chain",
    "token_in",
    "token_out",
    "amount_in"
  ],
  "additionalProperties": false,
  "properties": {
    "chain": {
      "type": "string",
      "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon"
      ]
    },
    "token_in": {
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "token_out": {
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "amount_in": {
      "type": "string",
      "pattern": "^[0-9]+(\\.[0-9]+)?$",
      "description": "Input amount in whole token units as a decimal string."
    },
    "slippage_bps": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5000,
      "default": 50
    },
    "route": {
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "Optional pool address to assess instead of the automatically chosen one."
    },
    "scan_history": {
      "type": "boolean",
      "default": true,
      "description": "Scan past Swap events for actual sandwiches. Costs time; switch off for a faster answer."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "chain": "base",
  "token_in": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "token_out": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "amount_in": "0",
  "slippage_bps": 50,
  "scan_history": true
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →