Skip to main content

Overview

RWA settlement handles off-chain service execution with on-chain payment settlement. Services register with SLA terms, agents request execution, providers submit proofs, and settlement occurs based on SLA compliance.

Settlement Flow

1

Service Registration

Provider registers service with SLA terms:
await rwaAgent.registerService({
  name: 'shipping-verification',
  serviceType: 'logistics',
  pricePerCall: '5.00',
  sla: {
    maxLatencyMs: 3000,
    requiredFields: ['tracking', 'signature', 'timestamp'],
    proofFormat: 'signed'
  }
});
2

Execution Request

Agent requests execution with escrow lock:
const request = await rwaAgent.requestExecution(
  serviceId,
  sessionId,
  agentAddress,
  { shipmentId: '12345' }
);
3

Off-Chain Execution

Provider performs real-world service (shipping, verification, etc.)
4

Proof Submission

Provider submits cryptographic proof:
await rwaAgent.submitProof({
  serviceId,
  requestId,
  timestamp: Date.now(),
  result: { tracking: 'DELIVERED', signature: '0x...' },
  signature: '0x...',
  providerAddress
});
5

SLA Verification

System verifies proof against SLA terms:
  • Latency within limits
  • All required fields present
  • Valid signature
  • Within validity period
6

Settlement

If SLA met: release payment to provider If SLA violated: refund to requester

SLA Terms

interface SLATerms {
  maxLatencyMs: number;
  requiredFields: string[];
  proofFormat: 'json' | 'signed' | 'hashed';
  refundConditions: string[];
  validityPeriodSeconds: number;
}

Service Types

  • logistics - Shipping and delivery verification
  • compliance - KYC and regulatory checks
  • oracle - Real-world data feeds
  • audit - Third-party audits
  • verification - Identity and document verification

Next Steps