ArPay Protocol Documentation
# Overview
ArPay is an eco-incentive settlement protocol that bridges the gap between Web3 sustainability sponsors and local communities. It enables the seamless conversion of on-chain environmental grants (USDC) to local fiat currency (IDR) without requiring receiving communities to interact with any cryptocurrency infrastructure.
# The Problem
Funding for local green initiatives faces a fundamental mismatch:
- Local Communities operate exclusively within banking systems that recognize legal tender.
- Eco-sponsors & DePIN networks possess value in programmable, globally verifiable tokens.
- No direct settlement exists that satisfies both parties without forcing communities to understand crypto wallets or adopt the other's infrastructure.
Current Solutions Fall Short
❌ Centralized Exchanges
- • Require custody surrender
- • Mandatory KYC verification
- • Settlement delays (hours/days)
❌ Crypto POS Terminals
- • Communities bear regulatory exposure
- • Requires crypto knowledge
- • Near-zero adoption
❌ Grant Plugins
- • Communities must accept novel instruments
- • Complex integration
- • Limited community acceptance
# The ArPay Solution
ArPay resolves this asymmetry through protocol-level separation of concerns:
Sponsor-facing layer: Operates entirely on Solana blockchain
Community-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 grant signature to community bank credit in 3-6 seconds under nominal network conditions.
🔒 Non-Custodial & Trustless
- Sponsors maintain self-custody via standard Solana wallets
- Communities never touch crypto—receive only legal tender
- No intermediary can freeze or confiscate funds
🛡️ Atomic Settlement Guarantee
Formal guarantee: Either the community receives fiat OR the sponsor receives a full USDC refund. No intermediate state where funds are lost.
🏦 QRIS Native Integration
Leverages Indonesia's standardized QR settlement system (QRIS) with 30M+ community endpoints nationwide.
📊 Transparent & Auditable
All on-chain operations are publicly verifiable on Solana blockchain. Open-source smart contract code for ESG reporting.
# How It Works (Simplified)
sequenceDiagram
participant Sponsor
participant Wallet
participant Solana
participant Oracle
participant FiatAPI
participant Receiver
Sponsor->>Wallet: Scan community QRIS code
Wallet->>Sponsor: Show USDC grant amount
Sponsor->>Solana: Sign & submit grant transaction
Solana->>Solana: Lock USDC in PDA escrow
Solana->>Oracle: Emit SettlementRequested event
Oracle->>FiatAPI: POST /disbursements (IDR)
FiatAPI->>Receiver: Transfer IDR via BI-FAST
Receiver->>Receiver: Receive fiat reward in bank
Oracle->>Solana: Release USDC from escrow
# Technical Highlights
| Component | Technology | Purpose |
|---|---|---|
| Smart Contract | Rust + Anchor 0.29 | Type-safe, auditable grant escrow |
| Blockchain | Solana Mainnet | Sub-second finality, 65K+ TPS |
| Frontend | Next.js 14 PWA | Mobile-first, no app install required |
| Stablecoin | USDC (SPL Token) | Price-stable, regulated, liquid |
| Oracle | Pyth Network | First-party on-chain price feeds |
| Bridge | Python 3.11 + asyncio | Event listener & fiat dispatcher |
| Settlement Rail | BI-FAST | Indonesia instant transfer network |
| Fiat Disbursement API | Xendit API | Licensed OJK processor |
# Performance Metrics
Under nominal conditions on Solana Mainnet-Beta with premium RPC:
| Stage | P50 Latency | P99 Latency |
|---|---|---|
| QR Scan → Wallet Prompt | <500ms | <1,200ms |
| Wallet Sign → Block Confirmed | 400ms | 1,200ms |
| Block Confirmed → Event Received | 80ms | 400ms |
| Event → Fiat API Response | 300ms | 900ms |
| Fiat API → BI-FAST Credit | 800ms | 2,000ms |
| Total (End-to-End) | ~2.5s | ~6.0s |
# Target Market
Primary: Indonesia — 30M+ QRIS community endpoints, 270M+ population, high mobile penetration
Generalizable: Any market with:
- Standardized QR settlement scheme
- Licensed Fiat Disbursement API
- Instant fiat settlement network
# Use Cases
- DePIN Sensor Rewards — Solar or waste-tracking sensors automatically trigger fiat payouts to host communities.
- Carbon Credit Disbursements — Direct fiat incentives to individuals participating in recycling programs.
- NGO Grant Distribution — Transparent, on-chain tracking of volunteer operational funds.
- Eco-Tourism — Visitors sponsor local conservation efforts effortlessly via QRIS.
# Getting Started
👨💻 For Developers
Integrate ArPay, run the oracle, deploy smart contracts
🌿 For Communities
Accept green grants without touching crypto
🏗️ Architecture
Deep dive into tri-layer protocol design
🔐 Security
Fund safety, oracle manipulation, formal guarantees
# 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 eco-initiatives
- • Formal security audit of smart contract
- • DePIN hardware sensor integration
# Open Source
ArPay is open-source and contributions are welcome:
- Smart Contract: github.com/arpay/smart-contract
- Frontend: github.com/arpay/frontend
- Oracle Bridge: github.com/arpay/oracle-bridge
# Support & Contact
- Website: www.arpay.my.id
- Email: arshaka@zohomail.com
- Documentation: You're reading it! 📖
- Discord: Join our community
- Twitter: @ArPayProtocol
Arshaka Team, Malang, Indonesia 🇮🇩