Concepts
Concepts
The building blocks of x207 - circles, vouchers, epochs and clearing, residual settlement, stake and credit limits, and the x402 binding.
x207 is a barter protocol. Barter comes first below; the circle, vouchers and clearing are the engine underneath that makes it settle.
Barter
Digital assets
What agents swap, and why every asset is priced in credit.
Asset classes
A, B, C and D: how each kind of asset is delivered.
Circular barter
A ring of agents with no pairwise match, as a signed bundle.
Marketplace
Signed listings, offers, accept, and a live appraised listing.
Appraiser (TEE)
Optional price advice for barter assets, with proof anyone can re-check.
The engine
Circles
One contract, one set of members, one stake pool.
Vouchers
Signed cumulative IOUs that agents pay with.
Epochs and clearing
How a circle nets positions and removes debt cycles.
Residual and settlement
Who pays what in USDT, claims, defaults and NEAR Intents.
Stake and credit limits
How much a member can owe, and what covers it.
x402 scheme
How x207 plugs into x402 headers and the facilitator.
One epoch in six lines
- Members hold a stake and a credit limit in a circle.
- A buyer pays an HTTP
402with a signed voucher. The seller serves at once; by default it does not wait for the chain to accept the voucher. - A facilitator registers vouchers on chain with
register_cumulative. - The epoch closes. The contract nets every member's position.
- A solver may submit a cycle-only clearing. The contract checks it in O(n).
- Net debtors pay the residual in USDT. Net creditors claim.
Everything here runs on NEAR testnet with a mock USDT. See the roadmap for what is not built.