Settle the net, not every payment. Multilateral netting for anchors, payment providers and agents on Stellar.
Simulate netting in your browser →
Participants who owe each other all day shouldn't each pre-fund their entire outflow. SetOff collects obligations in windows and settles only net positions. On chain, a settlement contract guarantees settlement can never fail: a member's net debit must always be covered by its collateral.
| Repository | Language | What it does |
|---|---|---|
| setoff-contracts | Rust / Soroban | Collateral, debtor-authorized obligations, guaranteed netted settlement |
| setoff-engine | Rust | Reference netting algorithm, plan CSV output, and cross-language test vectors |
| setoff-clearing | Go | Clearing service and setoff CLI: windows, SEP-10 sign-in, camt.053 statements, on-chain settlement plans |
From obligations to settlement: participants post what they owe to the
clearing service (signing in with their Stellar accounts), see their own side
of the window, and the operator or a schedule closes it. setoff soroban turns
a closed window into the contract calls that settle it, submitting the netted
plan rather than every payment, and setoff report produces ISO 20022 camt.053
statements for treasury systems.
Guarantees, tested: randomised tests check after every step that tokens held equal balances, positions sum to zero and every debit is covered; a resource test keeps the largest window inside one transaction's limits; and no operator action can trap a member's available funds.
Proven on testnet: a three-party cycle of 30 XLM gross obligations settled with nothing moving, and one participant took part with no collateral at all (contract).
Contributing: we take part in the Stellar Wave program; issues are labeled by complexity. Read CONTRIBUTING first, and report security issues privately as described in SECURITY.