> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enso.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Shield

> Simulate and validate any EVM transaction before signing to predict outcomes and prevent tampering.

export const date_0 = "2026-04-07"

Enso Shield is a transaction simulation and validation API. It works with transactions from **any source** — DEX aggregators, DeFi protocols, custom contracts, or Enso's own routing API. Simulate first to predict `amountOut` and `gas`, then validate before signing to ensure the transaction hasn't been tampered with.

<CardGroup cols={3}>
  <Card title="Quick Start" icon="rocket" href="/pages/shield/quick-start">
    Get a working simulate-then-validate flow in under 5 minutes.
  </Card>

  <Card title="Simulate Transactions" icon="flask" href="/pages/shield/guides/simulate">
    Predict output amounts and gas consumption for any EVM transaction.
  </Card>

  <Card title="Validate Transactions" icon="check-double" href="/pages/shield/guides/validate">
    Verify transaction integrity before signing with per-field validation checks.
  </Card>
</CardGroup>

## Why Shield?

<CardGroup cols={2}>
  <Card title="Source-Agnostic" icon="plug">
    Works with any EVM transaction — Uniswap, Aave, Enso, or your own contracts. No vendor lock-in.
  </Card>

  <Card title="Tamper Detection" icon="shield-halved">
    Compares every transaction parameter — calldata, target address, sender, value, and chain ID — to detect any modification between simulation and signing.
  </Card>

  <Card title="No Funds Required" icon="wallet">
    Simulate any transaction without needing the actual tokens in your wallet — test before you commit.
  </Card>

  <Card title="Exact Output Prediction" icon="bullseye">
    Get the precise `amountOut` you would receive if the transaction were executed on-chain right now.
  </Card>
</CardGroup>

## How It Works

<Steps>
  <Step title="Simulate" icon="flask">
    Send your transaction to the `/simulate` endpoint with `tokenIn`, `tokenOut`, and `amountIn`.

    You get back: `simulationId`, `amountOut`, `gas`, and `status`.
  </Step>

  <Step title="Validate" icon="check-double">
    Before signing, send the unsigned transaction with the `simulationId` to `/validate`.

    Shield checks every field — `data`, `to`, `from`, `value`, `chainId` — and returns per-field results.
  </Step>

  <Step title="Sign & Submit" icon="pen-nib">
    Once `valid: true`, sign and submit the transaction on-chain with confidence.
  </Step>
</Steps>

## Base URL

```
https://shield.api.enso.build
```

## Authentication

Shield uses the same Enso API key as the main Enso API. Pass it as a Bearer token in the `Authorization` header or as an `api_key` query parameter.

```bash theme={null}
# Bearer token
curl -H "Authorization: Bearer YOUR_API_KEY" https://shield.api.enso.build/api/v1/simulate

# Query parameter
curl https://shield.api.enso.build/api/v1/simulate?api_key=YOUR_API_KEY
```

To obtain an API key, see the [Authentication guide](/pages/build/get-started/authentication).

<div className="text-right text-xs gray-200 font-semibold w-full" style={{marginTop: '0'}}>
  <p style={{
        color: "#b2b2b2"  
    }}>Updated {date_0}</p>
</div>
