# APEX Trust Layer

Before you pay USDC on Arc, get a signed verdict. The scheme name is `apex-upto-v1`.

## One payee

`GET https://apexfaucet.xyz/api/arc-payee-check?payee=<0x>&payer=<your wallet>&amount=<USDC>`

Five free checks a day. After that, `/api/x402/arc-payee-check` is $0.005.

The answer is one of DO_NOT_PAY, CAUTION, NO_MATCH_IN_INDEX, or COULD_NOT_READ. NO_MATCH_IN_INDEX is not the word "safe". It means this index found no poisoning, lookalike, sanction, or blacklist hit.

## The voucher

A voucher is present only when all three are true: the verdict code is 0, `payer` is the wallet that will send, and `amount` is at least 0.01 USDC. The voucher is the same EIP-712 PayeeVerdict. It caps the payment at that amount until `expiresAt` (10 minutes), and PayGuard will accept it once.

Other verdicts set `voucher` to null and do not include a pay call.

## PayGuard

Contract `0x942e886e4aa48346dd8bc594596f662aab57efeb` on Arc (chain id 5042). It holds no funds and has no owner. When a voucher exists, `payGuard.approve.data` and `payGuard.pay.data` are the two calls. They are not sent for you. USDC is `0x3600000000000000000000000000000000000000`.

## Arc Mandate

New boxes (arc-mandate-2, factory `0x91957bd6e6da2880bf49174eaa4b5d36627af9d3`, box code `0x9684274bb3533fa89c6a42152303937492b0f548`) pay only on a clean PayeeVerdict whose payer is the box. `pay()` uses a verdict once. x402 can reuse one unexpired verdict on each free daily slot, and the daily count still applies. Pass `payer` as the box address. Boxes from the v1 factory `0x69e444f722666e13e171181efe054a93e0976b26` do not read the verdict. The v2 factory and the v2 implementation are Sourcify exact matches. Page: https://apexfaucet.xyz/arc/mandate/

## Where the same check is used

arc-send-guard folds the same check: DO_NOT_PAY is a stop, and the signed verdict is arc-payee-check. Our own payouts to an address a stranger chose (the X reward, jury pay, the hunter bounty, and buy-and-rate) refuse DO_NOT_PAY before USDC leaves. A first payment to a new address is still allowed.

## A batch

`GET https://apexfaucet.xyz/api/x402/arc-payee-batch?payees=<0x>,<0x>&payer=<0x>&amount=<USDC>`

Up to 20 payees, $0.02 for the batch. Each row is its own signature. The free door is `/api/arc-payee-batch` and each payee counts as one of the five free checks. A batch that does not fit is refused whole.

## Verify

Attester, domain, and types: `GET https://apexfaucet.xyz/api/arc-payee-check/attester`

Machine policy: `GET https://apexfaucet.xyz/.well-known/apex-trust.json`

Live poisoning counts, not a fixed number: `GET https://apexfaucet.xyz/api/arc-poison-stats`

MCP tool `arc_payee_check` is first at `https://apexfaucet.xyz/api/mcp`. `arc_payee_batch` is next to it. `duplicate_check` is next to those.

## Duplicate payment

`GET https://apexfaucet.xyz/check/duplicate?resource=<https URL>&payee=<0x>&amount=<atomic or decimal>&nonce=<0x and 64 hex>`

The fingerprint is resource + payee + amount + nonce. The window defaults to 600 seconds (clamped from 60 to 86400) and is part of the signed message. Verdicts are FRESH, DUPLICATE and COULD_NOT_RECORD. The signature TTL is 600 seconds, separate from the window.

Five free checks a day, on a counter of their own. After that, `/api/x402/check-duplicate` is $0.003. A batch of up to 20 is `/check/duplicate/batch` or `/api/x402/check-duplicate-batch` at $0.01. A batch of 21 is refused before anything is recorded. The same fingerprint inside one batch is FRESH once, then DUPLICATE.

Domain name "APEX DuplicateGuard", version "1", chainId 5042, no verifyingContract. Type DuplicateVerdict. The payee attester signs it. PayGuard does not read this type. A FRESH verdict is not a permission to pay.

The preflight for the official x402 client is `https://apexfaucet.xyz/trust/apex-trust.js` (`onBeforePaymentCreation`). It is not published on npm. The hook runs before the scheme creates the EIP-3009 nonce. If you do not supply that nonce, the duplicate half is skipped and the payee check still runs for an Arc address. It aborts on DO_NOT_PAY, COULD_NOT_READ and DUPLICATE. It does not abort on CAUTION or NO_MATCH_IN_INDEX.


## Pay preflight

`GET https://apexfaucet.xyz/pay-preflight?payee=<0x>`

Five free a day, on a counter of its own. After that, `/api/x402/pay-preflight` is $0.01. Pass `resource`, `nonce` and `amount` together to run the duplicate half. Without them the duplicate half is NOT_CHECKED and nothing is recorded. A bare integer amount is atomic units and is accepted only with that trio. The summary is DO_NOT_PAY, then DUPLICATE, then COULD_NOT_READ, then CAUTION, then NO_MATCH_IN_INDEX. The signatures are the existing ones. There is no new domain. An amount under 0.01 USDC is CAUTION on the payee half, because a voucher needs at least 0.01.

## Poison events

`GET https://apexfaucet.xyz/api/x402/poison-events` is $0.01 a page (up to 50 rows) of the live Arc USDC poison index: block, transaction, kind, victim, poisoner, the address it mimics, and the USDC amount. Pass `nextAfterBlock` and `nextAfterTx` together. Counts in the page come from the live index. Counts stay free at `GET /api/arc-poison-stats`.
