Protocol Architecture & Topology
A technical deep dive into BotPay transaction pathways, batch settlement mechanisms, zero-knowledge credentials verification, and automated netting engines.
Unified System Topology
BotPay coordinates transactions between three distinct environments: client-side Web3 browsers, server-side bot microservices, and on-chain registries.
Access Bot Lifecycle Phase
Payer initiates connection and requests specialized task execution specifications.
Step-by-step lifecycle: (1) Payer accesses the bot. (2) Bot requests a unique Payment Intent. (3) Bot returns details to browser. (4) Payer sends native USDC directly to the contract. (5) On-chain events trigger webhooks. (6) Bot performs service and claims accrued funds linearly.
Netting Engine Topology
Rather than claiming streams one-by-one (incurring separate transaction fees), BotPay utilizes an off-chain Netting Engine that compiles multi-agent allocations and submits a unified settlement receipt:
Active Linear Streams
BotPay.sol Escrowed BalanceTelemetry Listener
Telemetry Engine ServerNetting Calculation
Off-chain Netting EngineNettingSettler.sol
On-chain Batch Settlement ContractNetting optimization: The off-chain engine listens to state parameters, matches opposing balance streams (e.g. Bot A owes Bot B 10 USDC, Bot B owes Bot A 8 USDC), calculates net settlement requirements (Bot A pays Bot B 2 USDC), and executes a single write call on the `NettingSettler.sol` smart contract.