Testnet · mainnet not launched · testnet ZFX has no monetary value

NEAR Intents integration

wZFX trades through NEAR Intents the same way any NEP-141 token does: users and solvers hold balances inside the official Verifier contract and settle by signing matching token_diff intents. Nothing in this integration is custom protocol; the custom parts are a solver that quotes wZFX and an adapter that talks to the Message Bus.

What runs where

component code local test real network
Verifier contract official near/intents release defuse/v0.4.2, fetched by bridge/intents/fetch_verifier.sh, SHA-256 checked against the release deployed in the NEAR sandbox intents.near (not touched by this repo)
Message Bus local implementation of the documented JSON-RPC (quote, publish_intent, get_status) and WebSocket (subscribe, quote_response, quote_status) 127.0.0.1:28810/28811 public relay solver-relay-v2.chaindefuser.com, needs a Partner JWT
test solver bridge/intents/zfx_intents/solver.py quotes wZFX against tUSDC (a test NEP-141) same code with --api-key JWT
adapter bridge/intents/zfx_intents/adapter.py intents.quote/submit/status same code, X-API-Key header

Protocol mapping

Solver risk rules

The solver quotes only when its Verifier inventory of the output token covers the trade, the trade is under max_trade_fraction of that inventory, and its price feed is younger than max_price_age_s. It never quotes from wallet balances outside the Verifier. Spread is configurable (--spread-bps).

Verified cases (tests/e2e/intents.py, bench/results/e2e_intents.json, 11/11)

  1. Verifier deployed from the pinned release with the published hash; tUSDC fixture deployed.
  2. Solver and user deposit bridged wZFX and tUSDC into the Verifier.
  3. wZFX to tUSDC: quote, NEP-413 token_diff, settled on-chain with a receipt.
  4. tUSDC to wZFX settles, using the solver's bridged wZFX as liquidity.
  5. Insufficient liquidity and a stale price produce no quotes; a fresh price quotes again.
  6. Duplicate fill rejected by the bus; on-chain nonce replay rejected by the Verifier.
  7. Expired quote refused by the bus; expired deadline refused by the Verifier.
  8. Cancellation: an unpublished quote never settles.
  9. Refund: a failed ft_withdraw to an unregistered receiver returns to the user's Verifier balance.
  10. Full loop: native ZFX, bridge to wZFX, swap both ways, bridge back to native ZFX; bridge books exact.
  11. Real public Message Bus probed: HTTP 403 without a Partner JWT. Recorded as EXTERNAL_BLOCKED, not as a pass of the real network.

External prerequisites for live Intents