A-Pay Protocol Logo
A-PAY PROTOCOL
Official Protocol Specification

A-Pay Protocol Technical Whitepaper

The Universal Machine-to-Machine (M2M) & Human-to-Machine (H2M) Micropayment Rail on Base Layer 2.

Published: October 2026•Version: 1.0 (Base Mainnet Genesis)•Base Mainnet: 8453
Abstract

As autonomous Artificial Intelligence (AI) agents proliferate across the internet, the web faces two unprecedented structural crises: (1) The Unmetered Scraping Crisis, where commercial LLM crawlers exhaust server compute without compensating website owners; and (2)The AI Financial Disenfranchisement Crisis, wherein autonomous agents lack legal identities, bank accounts, and credit card credentials necessary to pay for proprietary data and tools.

A-Pay Protocol solves this dilemma by introducing an open-source, RFC-compliant HTTP 402 (Payment Required) protocol integrated with Base Layer 2. A-Pay enables real-time, sub-second micropayments through EIP-712 cryptographic authorization, budget-capped session escrows (`EscrowVault.sol`), and a deflationary 100,000,000 fixed-supply utility token (`$APAY`), while allowing normal human visitors to browse 100% free with zero paywalls.

1

The Three Architectural Pillars

Pillar 1: M2M AI Paywall

Drop-in middleware (FastAPI, Next.js, Cloudflare, WordPress) that detects automated AI bots and prompts HTTP 402 challenge headers. Bots pay micro-cents per query via Base L2 vouchers; human browsers pass through completely free ($0.00).

Pillar 2: Agent Session Escrows

Non-custodial smart contract (`EscrowVault.sol`) enabling multi-agent swarms (LangChain, CrewAI, AutoGen, Claude Desktop) to operate with ephemeral, budget-capped sub-wallet session keys. Master treasuries are 100% immune to prompt injection drain.

Pillar 3: Web3 Checkout Gateway

A 46KB standalone JavaScript checkout widget (`v1.js`) delivering 2-second on-chain settlement for physical e-commerce and digital SaaS. 0% chargebacks, low fees, and instant merchant non-custodial receipt.

2

$APAY Tokenomics & Deflationary Flywheel

Total Supply
100,000,000
100M Fixed (No Minting)
Token Standard
ERC-20
18 Decimals on Base L2
Buyback & Burn
30%
Of all protocol fees
Human Tax
$0.00
100% Free Browsing

The Automated 30% Deflationary Burn Flywheel

Every time an autonomous AI crawler pays for an API call or a customer checks out through an A-Pay gateway, a nominal protocol fee (1.0%) is processed by `APayRouterV2.sol`. 30% of this collected fee is programmatically routed to Aerodrome DEX on Base Mainnet to execute continuous market buybacks of `$APAY` tokens, which are then permanently sent to the Ethereum dead burn address (`0x000000000000000000000000000000000000dEaD`).

Because the supply of `$APAY` is hard-capped at 100,000,000 with zero mint functions in bytecode, increased M2M transaction volume induces structural, continuous supply deflation.

3

Verified Base Mainnet Infrastructure (Chain ID: 8453)

All core protocol contracts are deployed, open-source, and verified on BaseScan:

$APAY Token ContractFixed 100M supply ERC-20
0x8dd4ff9035c7d4e0bef30aa64fc30d128a4066c3
EscrowVault (Multi-Agent Session Keys)Non-custodial ephemeral budget enforcement
0xd08c8a337e5339d1c083e06d74a9265956ceea16
APayRouterV2 (Enterprise Router & Buyback Engine)Automated 30% Aerodrome DEX buyback routing
0x452eb7d4e7ccbf76ecf511829880b5fbcb24e854
StakingVault (Agent Collateral & Slashing)Anti-spam agent bond staking
0x3e35a9e802627a3d9a86d6554e72b1c446e34aaf
Aerodrome Finance DEX Liquidity PoolActive on-chain swap pair ($APAY / WETH)
0x6933dd2B7D72d8561005E475AFa147E47A3c7777
4

Protocol Leadership & Core Governance

Sagar Yadav - Founder of A-Pay Protocol

Sagar Yadav

Verified Founder & Architect
Protocol Founder & Lead Architect • Base L2 Smart Contracts & Machine-to-Machine Systems

Lead architect of A-Pay Protocol. Architect of RFC-compliant HTTP 402 micro-settlement gateways, non-custodial session key escrow vaults for autonomous agent swarms, and open-source developer tooling for the decentralized AI economy.

Ready to Integrate A-Pay Protocol?

Integrate M2M paywalls with 1 command (`npx apay protect`) or install SDK packages.