Technical docs
End to end
End to end flows
Payment attribution, private withdrawal, USDC bridge, and compliance analysis.
The four core flows below cover collecting a private payment, withdrawing from the pool, bridging USDC across chains, and running an AI compliance analysis.
1. Payment link & private attribution
Link stored
amount, currency, unique memo, pool address
Customer opens /pay/[id]
connects Freighter
Yes, sponsored
prepare-pay → SHA-256 memo hash
Payer signs inner tx
Sponsor fee bumps & submits
sponsor pays network fee
No, classic
Payer signs & submits
Classic payment to pool
memo attributes the link
Horizon event detected
relayer / status poll
PoolManager.commit(secret, nullifier, amount)
Poseidon leaf stored
Virtual balance updated
- 1CustomerPay page
Open link, connect Freighter
- 2Pay pageAPI
POST prepare-pay → memo hash
- 3Pay pagePool
Submit XLM/USDC payment (memo)
- 4APIAPI
Detect Horizon payment, match memo
- 5APISoroban
commit(secret, nullifier, amount, token)
- 6SorobanAPI
CommitResult { leaf, root }
- 7APIDashboard
Update virtual balance → Paid ✓
2. Private withdrawal
- 1BusinessAPI
Request withdrawal (amount, recipient)
- 2APIAPI
Validate virtual balance, select nullifiers
- 3APISoroban
withdraw(recipient, nullifiers, proof, root)
- 4SorobanSoroban
Mark nullifiers spent (double spend guard)
- 5SorobanAPI
ok
- 6APIRelayer
Route payout via ephemeral wallet(s)
- 7RelayerRecipient
Final transfer (unlinkable, jittered)
3. Cross chain USDC bridge (CCTP)
- 1UserSource chain
Approve USDC spend
- 2UserSource chain
Burn USDC → emit message
- 3Source chainCircle
Message observed
- 4CircleSource chain
Attestation (~1 to 5 min)
- 5UserDest chain
Submit attestation → mint native USDC
- 6Dest chainUser
USDC received
4. AI compliance analysis
- 1DashboardAPI
Upload context → /api/compliance-agent/analyze
- 2APIAgent workflow
Proxy multipart with session guard
- 3Agent workflowMongoDB
Retrieve RegIntel chunks (RAG)
- 4Agent workflowOpenAI
Analyze with gpt-4o / gpt-4o-mini
- 5OpenAIAgent workflow
Roadmap, licenses, controls
- 6Agent workflowDashboard
Structured compliance report