Actors & Contracts
Actors
Key Components
peaq- Identity / registration —
register(agent-card.json)→ creates machine/agent identity (agent_id) - ClaimRegistry — creates/accepts claims, locks stakes, tracks status
- PaymentReceiver — receives LayerZero messages (
lzReceive) and updates peaq state - TransactionRegistry — records funding/release events (auditability)
- BaseEscrow — locks USDT, releases USDT to seller, emits cross-chain messages
Phase 1 — Identity registration on peaq
Goal: Both parties become on-chain actors on peaq.- Unitree → peaq:
register("unitree-agent-card.json")
peaq → Unitree:agent_id - Drone → peaq:
register("drone-agent-card.json")
peaq → Drone:agent_id
Phase 2 — Create & accept claim on peaq
Goal: Create a service purchase intent on peaq and have the seller accept it with stake.Buyer (Unitree)
- Ensure buyer has USDC on peaq for stake (mint if needed).
- Approve staking:
approve(ClaimRegistry, stake). - Ensure buyer has USDT on Base (mint if needed).
- Create the claim on peaq:
create_purchase_claim(seller=Drone, service_id, amount, deadline)
peaq → Unitree:claim_id - Share
claim_idto Drone (off-chain / manual in this diagram).
Seller (Drone)
- Fetch details:
get_claim(claim_id). - Verify claim + seller address (local checks).
- Ensure seller has USDC on peaq for stake (mint if needed).
- Approve staking:
approve(ClaimRegistry, stake). - Accept claim:
accept_claim(claim_id)
peaq: locks seller stake
peaq → Drone: statusAccepted.
Phase 3 — Cross-chain funding (Base → peaq)
Goal: Lock funds in Base escrow and mark the claim as Funded on peaq via LayerZero.- Unitree → peaq:
get_claim(claim_id)(to confirm deadline). - Unitree → Base:
approve(BaseEscrow, USDT amount). - Unitree → Base:
BaseEscrow.deposit(claim_id, amount, seller, deadline)
BaseEscrow: locks USDT. - Base → LayerZero: sends cross-chain “funded” message.
- LayerZero → peaq: delivers to PaymentReceiver.
- peaq.PaymentReceiver:
lzReceive()- updates TransactionRegistry
- updates claim status → Funded.
Phase 4 — Release payment on Base + finalize on peaq
Goal: Seller performs the service off-chain; buyer releases escrowed payment; peaq finalizes status and returns stakes.- Drone: Performs the real-world service (off-chain).
- Unitree → Base:
BaseEscrow.release(claim_id)
BaseEscrow: transfers USDT to Drone
Base → Drone: USDT received. - Base → LayerZero: sends “completed” message.
- LayerZero → peaq: delivers completion to PaymentReceiver.
- peaq.PaymentReceiver:
- updates TransactionRegistry
- updates claim status → Completed
- returns stakes to buyer & seller.
State machine (peaq claim status)
Created → Accepted → Funded → CompletedWhat to poll / verify
- Buyer & Seller poll on peaq:
get_claim(claim_id)to read status + deadline. - Funding truth lives on Base: USDT is locked/released by BaseEscrow.
- peaq is the coordination ledger: identity, claim lifecycle, audit trail, stake settlement.
- LayerZero is the sync bridge: delivers funding + completion events to peaq.
Outcome
A single claim ties together:- Identity + staking + lifecycle on peaq
- USDT custody + payout on Base
- Cross-chain state synchronization via LayerZero

