MeteraDOCS
Request access

Live todayLive

Gates

A gate answers should this swap happen at all? before any transaction exists. Use it when your agent is deciding; use Preflight when it already holds the bytes to sign.

evaluate_gate

Internally a gate runs two verified checks and then applies your policy:

  1. solana.swap_quote on the trade.
  2. solana.token_risk on the mint the quote itself resolves as the real output, never a mint you typed. The response names it in evaluatedOutputMint.

Both are billed exactly as if you had called get_verified_data for each. There is no extra gate fee. Your policy and the verdict are never stored; only the two underlying checks are logged.

ParameterTypeRequiredDescription
poolstringyesRaydium CPMM or Meteora DAMM V2 pool. Any other AMM is refused cleanly.
payerstringyesThe trader account the swap would run as.
inputTokenAccountstringyesToken account paying in.
outputTokenAccountstringyesToken account receiving.
amountInstringyesInput amount, base units.
policy.maxPriceImpactBpsnumberyesNo external floor to default to.
policy.maxRiskScorenumbernoOmit to exclude token risk from the decision entirely.
policy.maxSlotsStalenumbernoDefault 2.
policy.minLevellevelnoApplies to solana.swap_quote only. token_risk is single-source by design today, so enforcing a level there would always refuse. Omit it to treat a degraded quote as a caveat, not a refusal.
json
// tool: evaluate_gate
{
  "pool": "<METEORA_DAMM_V2_POOL>",
  "payer": "<YOUR_WALLET>",
  "inputTokenAccount": "<YOUR_USDC_ATA>",
  "outputTokenAccount": "<YOUR_WSOL_ATA>",
  "amountIn": "250000000",
  "policy": { "maxPriceImpactBps": 50, "maxRiskScore": 40 }
}

Verdicts are the same three as Preflight. A source with no data is never called safe: it surfaces as allow_with_caveat, a real third state, not a passing grade.