Technical Whitepaper · v1.0

Valence:
NFC Tap-to-Pay
Crypto-Fiat Gateway

A technical whitepaper detailing the architecture, settlement protocol, and security model for NFC-based crypto-fiat payments on the Solana blockchain.

Published: August 2026·Rendey Ltda.·valence.rendey.store
01

Executive Summary & Core Objective

Valence is an institutional-grade mobile NFC payment gateway built by Rendey that bridges traditional fiat payment channels — including PIX (Brazil's instant payment system), credit/debit cards, and SEPA transfers — with instantaneous, low-cost stablecoin settlement on the Solana blockchain.

Mission Statement

“Eliminate friction in cross-border and local merchant payments by unifying contactless NFC payments with instant stablecoin settlement — powered by non-custodial programmable wallets.”

Why We Are Building Valence

Traditional payment gateways suffer from three critical inefficiencies that cost merchants billions annually:

Settlement Delays

Conventional processors (Stripe, PagSeguro) settle in T+2 to T+7 business days, creating cash flow pressure for SMBs.

Excessive Fees

Merchant discount rates (MDR) of 2–5% per transaction, plus hidden FX conversion charges for cross-border payments.

Fragmented UX

Users navigate separate apps for banking, crypto wallets, and payment terminals — with no unified interface.

Valence solves this by providing a single, elegant interface where merchants accept contactless NFC payments (or dynamic QR codes), and customers' fiat is instantly converted to USDC on Solana — settling in under 10 seconds with near-zero network fees (~$0.01). The merchant receives stablecoins in a non-custodial wallet managed via Circle's Programmable Wallets API, ensuring zero platform custody risk.

< 10s

Settlement Time

$0.01

Avg. Network Fee

0.5%

Target MDR

24/7

Operational Hours

02

Architecture & Technical Components

Valence is built on a modular, event-driven architecture that separates concerns across four distinct layers: Presentation (POS Terminal UI), Gateway (Fiat Onramps), Wallet (Circle Programmable Wallets), and Settlement (Solana Blockchain).

System Topology

Merchant Terminal

NFC Tap / QR Code

Gateway Layer

Money.ramp (PIX) · Stripe

Circle Wallet API

Programmable Wallets

Solana Settlement

USDC · < 10s finality

Component Breakdown

Presentation Layer — POS Terminal

Next.js 16 · React · Tailwind CSS · lucide-react

Mobile-first NFC Tap-to-Pay interface. Renders the charge amount input, NFC listener with pulse animations, payment state machine (idle → listening → processing → success), and real-time settlement ledger. Communicates with backend API routes via fetch().

Gateway Layer — Fiat Onramps

Money.ramp SDK v4 · Stripe Crypto Onramp

Handles fiat-to-crypto conversion. Money.ramp processes BRL via PIX with instant settlement; Stripe processes card/bank payments via its Crypto Onramp session API. Both gateways are abstracted behind a unified interface — the POS Terminal triggers either path based on user selection.

Wallet Layer — Circle Programmable Wallets

Circle W3S API · Web3 Developer Portal

Non-custodial Solana wallets are generated via Circle's /v1/w3s/developer/wallets endpoint. Each merchant receives a unique wallet tied to a Circle user token. Private keys are managed by Circle's MPC (Multi-Party Computation) infrastructure — Valence never has access to raw key material.

Settlement Layer — Solana Blockchain

@solana/web3.js · Solana Devnet / Mainnet

USDC transfers execute as native SPL token instructions on Solana. Block finality in ~400ms, full settlement in < 10 seconds. Network fees are sub-cent ($0.00025 per transaction). Balance verification uses Connection.getBalance() against configurable RPC endpoints (Devnet for staging, Mainnet for production).

Environment Configuration

# Circle Web3 Developer API

CIRCLE_API_KEY=your_circle_api_key

# Stripe (Crypto Onramp)

STRIPE_SECRET_KEY=sk_live_...

NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...

# Solana RPC

NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com

03

End-to-End Process Flows

Every payment processed through Valence follows a four-step flow from initiation to final settlement. Each step is auditable, idempotent, and designed for graceful degradation in case of network or gateway failures.

01

Contactless Initiation

The customer initiates a payment by tapping their smartphone (NFC) or scanning a dynamic QR code presented by the merchant's POS terminal.

  • →Merchant enters the charge amount in BRL (or any supported fiat currency) on the Valence POS Terminal.
  • →Terminal generates a dynamic Solana Pay QR code encoding the merchant's wallet address, amount, and network (Devnet/Mainnet).
  • →Customer taps their NFC-enabled phone (Apple Pay, Google Pay, or Solana-compatible wallet) or scans the QR code.
  • →NFC listener uses the Web NFC API (or simulated polling for demo) to detect the card/phone tap event.
  • →Terminal transitions from 'Ready to Tap' → 'Listening' → 'Payment Detected' state.
02

Fiat Processing & Risk Screening

The detected payment is routed through the appropriate regulated onramp (Money.ramp for PIX, Stripe for cards) with automated compliance checks.

  • →Payment payload is serialized and forwarded to the selected gateway: Money.ramp (BRL/PIX) or Stripe (USD/cards).
  • →The gateway performs automated KYC/AML screening on the customer's identity in the background.
  • →Risk scoring is applied: transactions below R$ 50,000/day pass automatically; larger amounts trigger manual review.
  • →Fiat authorization is confirmed — the gateway locks the BRL amount and initiates the conversion pipeline.
  • →Valence receives a webhook/confirmation with the authorized amount and conversion rate.
03

Programmatic Stablecoin Conversion

Authorized fiat is converted to USDC via the gateway's internal liquidity pools, with the output routed to the merchant's Circle Programmable Wallet.

  • →The gateway converts BRL → USDC at the locked exchange rate (e.g., 1 USD = R$ 5.72).
  • →Network fee for Solana settlement is deducted (~$0.01 — orders of magnitude lower than traditional rails).
  • →Circle's W3S API receives a 'credit wallet' instruction targeting the merchant's non-custodial Solana wallet.
  • →The USDC mint instruction is queued in Circle's secure enclave for on-chain execution.
  • →Conversion receipt is logged with: timestamp, exchange rate, fee breakdown, and Circle transaction ID.
04

Non-Custodial On-Chain Settlement

USDC is transferred to the merchant's wallet on Solana with sub-second finality. Full cryptographic audit trail is generated.

  • →Circle's MPC infrastructure signs and broadcasts the USDC transfer transaction to Solana.
  • →Transaction confirms in ~400ms (single block finality on Solana).
  • →The merchant's POS Terminal receives a settlement confirmation with the on-chain transaction hash.
  • →Balance is refreshed via Connection.getBalance() — the merchant sees updated USDC/SOL balances in real-time.
  • →A structured audit entry is appended to the Transaction Ledger with: TX ID, timestamp, BRL amount, USDC amount, method, and Solana confirmation status.

Complete Flow Diagram

1

NFC Tap / QR Scan

Customer initiates payment

2

Fiat Authorization

Money.ramp (PIX) or Stripe (Card) processes BRL

3

Compliance Screen

Automated KYC/AML risk scoring

4

USDC Conversion

BRL → USDC at locked rate via gateway

5

Circle Wallet Credit

USDC routed to non-custodial wallet

6

Solana Settlement

On-chain transfer confirmed in < 10s

7

Audit Log Entry

Structured ledger record with TX hash

04

Security, Compliance & Non-Custodial Guarantee

Security and regulatory compliance are foundational to Valence's architecture. The platform is designed to meet institutional-grade standards while maintaining the self-custodial principles of decentralized finance.

Zero Platform Custody

Core Principle: At no point does Valence hold, control, or have access to merchant or customer funds. All wallets are non-custodial — private keys are managed by Circle's Multi-Party Computation (MPC) infrastructure. Valence's application code never sees raw key material, making platform-level fund theft architecturally impossible.

Security Framework

🔐

MPC Key Management

Private keys are sharded across Circle's secure enclaves using Threshold Signature Scheme (TSS). No single party ever holds the complete key.

📋

Encrypted Audit Trail

Every transaction generates a cryptographically signed audit entry with immutable timestamps, on-chain TX hashes, and structured metadata.

✅

KYB/AML Compliance

Merchant onboarding includes full KYB (Know Your Business) verification. Money.ramp and Stripe handle customer-side KYC/AML screening automatically.

🛡️

Network Isolation

Staging environment uses Solana Devnet with sandbox API keys. Production routes are isolated with environment-specific configuration.

Regulatory Alignment

Valence is designed to operate within existing regulatory frameworks for digital asset service providers (VASPs) in Brazil and internationally:

  • →Central Bank of Brazil (BCB) — Compliant with Resolution No. 331/2022 on virtual asset service providers.
  • →PIX Integration — Operates through licensed payment institutions (Money.ramp holds CBUPI authorization).
  • →Stripe Crypto Onramp — Leverages Stripe's existing Money Transmitter Licenses (MTLs) in applicable jurisdictions.
  • →GDPR/LGPD — User data is processed minimally; wallet addresses are pseudonymous on-chain identifiers.
  • →Travel Rule — Circle's Programmable Wallets API supports FATF Travel Rule compliance for transfers above threshold amounts.

Technical Security Measures

// Environment Security

• API keys stored server-side only (no NEXT_PUBLIC_ prefix for secrets)

• .env.local excluded from version control via .gitignore

• Environment variables injected at build time, never exposed to client bundle

// Input Validation

• Base58 regex guard: /^[1-9A-HJ-NP-Za-km-z]{32,44}$/ before PublicKey instantiation

• Server-side request body validation on all API routes

• Idempotency keys on wallet generation to prevent duplicate creation

// Runtime Safety

• Graceful fallback to mock data when external APIs are unreachable

• Error boundaries on all async operations (fetch, Connection, sign)

• Zero runtime crashes from malformed wallet addresses

This whitepaper is published by Rendey Ltda. for informational purposes.

© 2026 Valence by Rendey · Solana · Circle · Stripe