Settlement Processor
What is a Settlement Processor?
A Settlement Processor (SP) is an off-chain service responsible for validating, queuing, and batch-executing payment mandate settlements.
It acts as the "clearing house" of the payment system.
Architecture Overview
┌──────────────────────────────────────┐
│ Settlement Processor (AVS) │
├──────────────────────────────────────┤
│ │
│ 📥 Mandate Ingestion │
│ Validate and enqueue mandates │
│ │
│ 🗃️ Payer Queues │
│ Payer A: [mandate_001, ...] │
│ Payer B: [mandate_003, ...] │
│ │
│ ⚙️ Settlement Engine │
│ Build batch settlement tx │
│ │
│ 📤 On-chain Execution │
│ Submit to smart contract │
│ │
└──────────────────────────────────────┘Settlement Process Flow
1. Enqueue Mandates
Payees submit verified payment mandates to the SP.
The SP performs:
- Signature verification
- Balance checking
- Duplicate detection
2. Maintain Payer Queues
The SP maintains a separate queue for each payer wallet, tracking:
- Current balance
- Queue balance (reserved for pending mandates)
- List of pending mandates
3. Batch Settlement
Within the settlement window, the SP:
- Collects mandates from multiple payers
- Builds batch settlement transactions
- Optimizes for gas efficiency
4. On-chain Execution
The SP calls the debit wallet smart contract to:
- Verify mandate signatures
- Check balances
- Execute transfers to payees
Extensible Settlement Mechanisms
The settlement mechanisms are extensible. Three examples are shown:
Debit Deferred Settlement (Default)
Settlement debits from payer's wallet, payee receives stablecoins immediately.
Payer Wallet → [Debit] → Payee WalletCredit Deferred Settlement
Payee extends credit to payer up to a limit, supporting scenarios like free trials.
Payer accumulates usage → Debit when limit exceededResult-Based Settlement
Payee can only settle after payer confirms service delivery.
Service completed → Payer approval → Execute settlementNext Steps
- Payment Mandate - Understand payment authorization
- Debit Wallet - Learn about wallet mechanisms
- Embedded Payment - See how mandates are embedded in protocols