sBridge
Flow & Primitives
Deposit, withdrawal, and trustless swap flows: protocol primitive reference
Deposit (External → SBChain)
User sends BTC to gateway external address
↓
Gateway confirms on Bitcoin chain
↓
Gateway issues BRIDGE.BTC IOU to user's SBChain account
↓
User trades BRIDGE.BTC on SBChain DEXWithdrawal (SBChain → External)
User sends BRIDGE.BTC to gateway's SBChain account
↓
Gateway burns the IOU (asset_reserve_operation)
↓
Gateway releases BTC to user's Bitcoin address
↓
Transaction confirmed on Bitcoin chainTrustless Swap (HTLC)
Both parties agree on terms off-chain
↓
Alice locks SBChain tokens in HTLC (htlc_create_operation)
↓
Bob locks BTC in Bitcoin HTLC using same hash
↓
Alice reveals preimage → claims Bob's BTC
↓
Bob uses revealed preimage → claims Alice's SBChain tokens
↓
Swap complete — no intermediary requiredProtocol Primitives Summary
| Primitive | Protocol Operation | Purpose |
|---|---|---|
| Gateway IOU token | asset_create_operation + asset_issue_operation | Tokenise external assets on SBChain |
| HTLC | htlc_create_operation | Trustless atomic swap |
| Withdraw permission | withdraw_permission_create_operation | Automated recurring gateway payments |
| Memo encryption | memo_data on transfers | Encrypted instructions to gateway (destination address, network, etc.) |
Bridge Object IDs
| Object | ID Format | Description |
|---|---|---|
| HTLC | 1.16.x | Active hash time locked contract |
| Withdraw Permission | 1.12.x | Active withdrawal permission |