Flow overview
Step 1: Platform A submits seller instruction
Platform A creates their side of the settlement:trade_reference:
Step 2: Share trade reference
Platform A shares the trade reference with Platform B through their own communication channels (API integration, OTC desk, email, etc.).Step 3: Platform B submits buyer instruction
Platform B submits the matching instruction with the same trade reference:status: "matched" and the new settlement_id.
Both platforms authenticate with their own M2M tokens. Each platform can only see and manage their own instructions.
Step 4: Compliance and autonomous execution
Once instructions match, the settlement is created on-chain with both parties confirmed. KeyStone handles compliance screening and attestation. After compliance clears:- Both parties deposit to escrow contracts using their deposit secrets (via their own custody provider)
- Contracts detect deposits complete, coordinator reveals recipient addresses and auto-executes the atomic swap
- Settlement auto-finalizes
Monitoring
Both platforms can track the settlement:Cancelling before match
If Platform A wants to cancel before Platform B submits:pending_match instructions can be cancelled. Once matched, the settlement follows its normal lifecycle.