ArPay Protocol Documentation

# Overview

ArPay is a peer-to-fiat settlement protocol that bridges the gap between cryptocurrency holders and traditional merchants. It enables seamless conversion of on-chain USDC to local fiat currency (IDR) without requiring merchants to interact with any cryptocurrency infrastructure.

# The Problem

Commerce between digital asset holders and traditional merchants faces a fundamental mismatch:

  • Merchants operate exclusively within banking systems that recognize legal tender
  • Crypto holders possess value in programmable, censorship-resistant tokens
  • No direct settlement exists that satisfies both parties without forcing one to adopt the other's infrastructure

Current Solutions Fall Short

❌ Centralized Exchanges

  • • Require custody surrender
  • • Mandatory KYC verification
  • • Settlement delays (hours/days)

❌ Crypto POS Terminals

  • • Merchants bear regulatory exposure
  • • Requires crypto knowledge
  • • Near-zero adoption

❌ Payment Plugins

  • • Merchants must accept novel instruments
  • • Complex integration
  • • Limited merchant acceptance

# The ArPay Solution

ArPay resolves this asymmetry through protocol-level separation of concerns:

User-facing layer: Operates entirely on Solana blockchain

Merchant-facing layer: Operates entirely within existing domestic banking

Bridge: Cryptographically-verified Python daemon connects both layers

# Key Features

⚡ Lightning Fast Settlement

Complete settlement cycle from transaction signature to merchant bank credit in 3-6 seconds under nominal network conditions.

🔒 Non-Custodial & Trustless

  • Users maintain self-custody via standard Solana wallets
  • Merchants never touch crypto—receive only legal tender
  • No intermediary can freeze or confiscate funds

🛡️ Atomic Settlement Guarantee

Formal guarantee: Either the merchant receives fiat OR the user receives a full USDC refund. No intermediate state where funds are lost.

🏦 QRIS Native Integration

Leverages Indonesia's standardized QR payment system (QRIS) with 30M+ merchant terminals nationwide.

📊 Transparent & Auditable

All on-chain operations are publicly verifiable on Solana blockchain. Open-source smart contract code.

# How It Works (Simplified)

sequenceDiagram
    participant User
    participant Wallet
    participant Solana
    participant Oracle
    participant Gateway
    participant Merchant

    User->>Wallet: Scan QRIS code
    Wallet->>User: Show USDC amount
    User->>Solana: Sign & submit transaction
    Solana->>Solana: Lock USDC in PDA escrow
    Solana->>Oracle: Emit SettlementRequested event
    Oracle->>Gateway: POST /disbursements (IDR)
    Gateway->>Merchant: Transfer IDR via BI-FAST
    Merchant->>Merchant: Receive fiat in bank
    Oracle->>Solana: Release USDC from escrow

# Technical Highlights

ComponentTechnologyPurpose
Smart ContractRust + Anchor 0.29Type-safe, auditable escrow logic
BlockchainSolana MainnetSub-second finality, 65K+ TPS
FrontendNext.js 14 PWAMobile-first, no app install required
StablecoinUSDC (SPL Token)Price-stable, regulated, liquid
OraclePyth NetworkFirst-party on-chain price feeds
BridgePython 3.11 + asyncioEvent listener & fiat dispatcher
Payment RailBI-FASTIndonesia instant transfer network
Payment GatewayXendit APILicensed OJK processor

# Performance Metrics

Under nominal conditions on Solana Mainnet-Beta with premium RPC:

StageP50 LatencyP99 Latency
QR Scan → Wallet Prompt<500ms<1,200ms
Wallet Sign → Block Confirmed400ms1,200ms
Block Confirmed → Event Received80ms400ms
Event → Gateway API Response300ms900ms
Gateway → BI-FAST Credit800ms2,000ms
Total (End-to-End)~2.5s~6.0s

# Target Market

Primary: Indonesia — 30M+ QRIS merchants, 270M+ population, high mobile penetration

Generalizable: Any market with:

  • Standardized QR payment scheme
  • Licensed Payment Gateway API
  • Instant fiat settlement network

# Use Cases

  1. Cross-border remittances — Send USDC globally, receiver gets local fiat instantly
  2. Crypto spending — Use crypto holdings for everyday purchases without merchant onboarding
  3. Tourism — Visitors pay with crypto, merchants receive local currency
  4. Freelancer payments — Receive crypto wages, spend as fiat instantly
  5. Merchant adoption — Zero-risk crypto acceptance for traditional businesses

# Getting Started

# Project Status

✅ Completed

  • • Solana smart contract deployed on mainnet
  • • PWA frontend with Solana Pay integration
  • • Oracle bridge with WebSocket event listener
  • • Xendit API integration for fiat disbursement
  • • End-to-end testing on Solana devnet

🚧 In Progress

  • • Mainnet beta testing with pilot merchants
  • • Formal security audit of smart contract
  • • Mobile app (iOS/Android native)

# Open Source

ArPay is open-source and contributions are welcome:

# Support & Contact


ArPay, Indonesia 🇮🇩