wink.
back
/docs · protocol

The protocol
behind the wink.

The rails are free. The names are the business. 0% platform fee; monetization = premium handles, private zones, and enterprise payroll. Live on mainnet.

§ 01 · architecture
                    ┌────────────────────────────────────────────┐
   guest / fan ───▶ │  /wink/<handle>  /wall/<slug>  /pay/<...>  │
   customer   ───▶ │        public surfaces (SSR + polling)     │
   worker     ───▶ │  /request/<handle>  /payroll  /dashboard   │
   AI agent   ───▶ │        /api/mpp/*   (HTTP 402 / MPP)       │
                    └──────────────────┬─────────────────────────┘
                                       │ prepare → sign → confirm
                    ┌──────────────────▼─────────────────────────┐
                    │            Next.js 15 API routes           │
                    │  zod validation · session HMAC · drizzle   │
                    └───────┬───────────────────────┬────────────┘
                            │                       │
                ┌───────────▼─────────┐   ┌─────────▼──────────────┐
                │  Postgres (drizzle) │   │   Tempo (viem/tempo)   │
                │  users · handles ·  │   │  pathUSD TIP-20        │
                │  transfers · ledger │   │  transferWithMemo      │
                │  events · payCodes  │   │  on-chain verification │
                │  payRequests        │   │  explorer              │
                └─────────────────────┘   └────────────────────────┘
§ 02 · what we promise
The money loop

prepare → sign → confirm. Resolve @handle to recipient wallet, create a pending transfer with memo, payer signs in their wallet, we verify on-chain and append to the ledger. Same loop everywhere — tips, checkout, payroll.

Verification oaths + custody

We never trust client success — re-checked on Tempo 4217 before confirmed. Wink Wallet: encrypted on our server so same email restores same address. We can decrypt them. Connected wallets are actually non-custodial. Full threat model in /security — same sentence as /send, /claim, /wallet.

TIP-20 memos

Every transfer carries a 32-byte reconciliation memo (wk_<transferId> for wink flows, merchant + invoice for sales). The memo tells the story; the chain is the receipt.

Cross-chain by default — sender pays fees

We use EXACT_OUTPUT: merchant gets full amount, sender pays Relay fee + $0.008 network. $1 Base → $1.00 pathUSD on Tempo, sender pays ~$1.033. $10 → $10.00, sender pays ~$10.09. Quote shown before sign. 13 chains, chain id 4217 mainnet.

All chains in, Tempo out

Recipient gets pathUSD on Tempo 4217 — hold, send to another @handle, or send out to any wallet. 13 chains in, one chain out. Chain id 4217 mainnet.

§ 03 · stack
framework
Next.js 15 (App Router, TypeScript)
data
Drizzle ORM + Postgres
chain
viem/tempo · chain 4217 · pathUSD
auth
session HMAC · injected EIP-1193 wallet
fees
0% platform · $0.008 Tempo + Relay quote (sender pays, merchant gets full)
§ 04 · quickstart
local dev
# clone & install
git clone https://github.com/Arinzaay007/wink
cd wink && npm install

# env (DATABASE_URL, SESSION_SECRET, TEMPO_NETWORK=mainnet, RESEND_API_KEY)
cp .env.example .env

# schema → postgres
npm run db:push

# run
npm run dev                          # app on :3000
npm test                             # 60 automated tests
npm run build                      # production build
§ 05 · live proof · merchant gets full, sender pays fees
Base → Tempo · merchant gets full $1.00

EXACT_OUTPUT: merchant gets exact amount, sender covers Relay fee + $0.008 network. Verified independently on both chains — chain is truth. Quote shown before sign.

Base mainnet · sender pays $1.033 total
0x343d518fef74e26ddaf7c789e745609a7ecca17cd8ce525d52974b72b6d24298
$1.00 + $0.025 Relay (2.5% on $1) + $0.008 = $1.033 paid by sender
View on BaseScan ↗
Tempo mainnet · merchant gets $1.00 full
0x113e6430a6fe77054ac2506059780632c98cd42cc643689626e04d3bb0e9dada
Block 41099471 · 1000000 micro pathUSD = $1.00 full · verified
View on Tempo ↗
$1 → $1.00 full, sender pays $1.033. $10 → $10.00 full, sender pays $10.09. $50 → $50.00 full, sender pays $50.41 (0.8%). Quote breakdown shown in send flow before sign.
Claim your @handle
live on mainnet · tempo · pathUSD · 0% platform fee