Skip to content
anew
03 · Documentation

Architecture

The whole system on one page: the rail, the site's three API routes, the browser, and the order states.

Anew is one website on one rail. The website asks for quotes, reports statuses and keeps fresh keys in your browser, and NEAR Intents moves the value. Anew runs no contract, no server wallet and no database anywhere on the road.

The road

 Zcash                 NEAR Intents (1Click)          Robinhood Chain (4663)
 +---------------+     +----------------------+       +----------------------+
 | your shielded |     | one-time deposit     |       | your receiving       |
 | balance       |---->| address (t1...)      |------>| address              |
 +---------------+     +----------------------+       +----------------------+
   a deshield of          a solver fills                 native ETH, paid
   X ZEC                  the intent                     by the solver
                                 ^
                                 |  live quote: recipient = your address
                                 |              refundTo  = your t1 or t3 address
                       +---------+----------+
                       | Anew API routes    |  quote, status, deposit, rails
                       | (store nothing)    |
                       +---------+----------+
                                 ^
                                 |
                       +---------+----------+
                       | your browser       |  fresh keys, orders; reads chain
                       |                    |  4663 from the public RPC
                       +--------------------+

The rail

NEAR Intents is a network where solvers fill swap requests. 1Click is its API: you ask for a quote, you receive a deposit address, and once the deposit arrives a solver pays the output on the destination chain.

  • Anew asks for ZEC (nep141:zec.omft.near) in and native ETH on Robinhood Chain (nep141:hood.omft.near) out, exact input, with recipient set to your address and refundTo set to your transparent Zcash address.
  • A dry quote prices the trip and creates nothing. A live quote returns a one-time transparent deposit address and a deadline.
  • 1Click watches Zcash for the deposit, runs the fill and reports the status by deposit address.
  • Observed on 2026-09-23: a time estimate of 454 to 456 seconds, and 0.1 ZEC to about 0.0597 ETH. The rate moves with the market; the calculator on the home page prints the live one.

The order flow uses this direct rail alone. A hop through a second chain would need someone to hold the ETH between the two legs and to sign the second transaction, and Anew leaves that party out. Relay, which carries ETH from Arbitrum One to Robinhood Chain, appears on the site as a fallback price and carries no orders. Rails covers the statuses, the timing and the fees.

The site

The site is a Next.js 16 application on the App Router. It runs on Vercel, deployed 2026-09-23 from web/, and the same build runs on a local machine for development.

Page Purpose
/ The road, a live calculator built on dry quotes, the state of the rails.
/start The Start page: address, amount, refund address, deposit screen, order status.
/hold The Hold page: balances of fresh addresses and a connected wallet, transfers signed in the browser.
/stats The Stats page: rail prices, the chain's head block and gas price, numbers from your own browser.
/docs, /whitepaper, /terms Reading.

The site loads no analytics scripts, and Anew sets no cookies. Its Content Security Policy lets the page connect to itself, to the Robinhood Chain RPC and to the hosts that Privy and WalletConnect need, and to nothing else.

The API routes

Route Upstream Returns Keeps
POST /api/quote 1Click POST /v0/quote a dry price, or a deposit address with its deadline, amounts and fees nothing
GET /api/status?d= 1Click GET /v0/status the status, amounts, refund data, transaction hashes, and the recipient NEAR Intents recorded nothing
POST /api/deposit 1Click POST /v0/deposit/submit an acknowledgement that NEAR Intents has the Zcash transaction id nothing
GET /api/rails two 1Click dry quotes, the 1Click token list, one Relay quote prices for 0.1 ZEC on both roads, ZEC and ETH prices, the fee setting a sixty-second cache

The routes exist so that the optional 1Click partner key (ONECLICK_JWT) and the fee recipient stay on the server. A limiter in each server instance caps quotes at thirty a minute per connection; it counts in memory and writes nothing to disk. The API page has the request and response shapes.

The browser

The browser carries every part that touches your keys and your records.

  • It asks /api/status about the order every ten seconds until the order reaches a final state, and compares the recipient and asset that NEAR Intents recorded with the ones you chose.
  • It reads Robinhood Chain from the public RPC https://rpc.mainnet.chain.robinhood.com, with no Anew server in between: balances, nonce, code, block height and gas price.
  • It makes fresh keys with viem and keeps them in localStorage under anew.keys, next to the orders under anew.orders.
  • It checks the refund address as base58check with the Zcash mainnet prefixes (t1 = 0x1CB8, t3 = 0x1CBD) and the double SHA-256 checksum, and refuses shielded and TEX addresses with an explanation.
  • It holds the Start page to amounts between 0.01 and 2 ZEC per trip.
  • It draws the deposit QR code and signs the Hold page's transfers with the fresh key.
  • It links transactions and addresses to the explorer at https://robin.etherscan.io.

Privy, optional

Privy connects a wallet when you choose My wallet or the sign-in button in the header. Anew uses the Privy React SDK with the App ID alone: no App Secret exists anywhere in Anew, and Anew calls no Privy server API. The SDK's default and only chain is Robinhood Chain, 4663.

The SDK loads on the Start and Hold pages, when you hover over, focus or click the sign-in button in the header, and on any page once this browser holds a Privy session from an earlier sign-in. Anew uses it to fill in the receiving address, to show the connected wallet's ETH on chain 4663, and to ask the wallet to switch to Robinhood Chain or add it.

Order states

PENDING_DEPOSIT -> KNOWN_DEPOSIT_TX -> PROCESSING -> SUCCESS

Other statuses from 1Click:  INCOMPLETE_DEPOSIT, REFUNDED, FAILED
The page's own label:        EXPIRED (the deadline passed with no deposit)

SUCCESS, REFUNDED, FAILED and EXPIRED are final, and the page stops asking once it sees one. Each status reaches the page through /api/status, and the page saves the latest one with the order in localStorage.

What runs where

Component Runtime State
Pages and API routes Next.js 16 on Vercel no records of trips; a sixty-second rails cache and per-connection quote counts in memory; the host's standard request logs
Your browser your machine anew.orders, anew.keys, and the backup file you downloaded
NEAR Intents 1Click NEAR Intents the quote, the deposit address, the swap
Robinhood Chain chain 4663 your address and its ETH
$ANEW Robinhood Chain, planned nothing yet