Skip to Content
x207x207 Docs
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

The engine

One epoch in six lines

  1. Members hold a stake and a credit limit in a circle.
  2. A buyer pays an HTTP 402 with a signed voucher. The seller serves at once; by default it does not wait for the chain to accept the voucher.
  3. A facilitator registers vouchers on chain with register_cumulative.
  4. The epoch closes. The contract nets every member's position.
  5. A solver may submit a cycle-only clearing. The contract checks it in O(n).
  6. Net debtors pay the residual in USDT. Net creditors claim.
Stake and credit limitBuyer pays 402 withvoucherFacilitator:register_cumulativeEpoch closes, positionsnettedSolver: cycle-only clearingDebtors pay residual inUSDTCreditors claim

Everything here runs on NEAR testnet with a mock USDT. See the roadmap for what is not built.

Source

Edit on GitHub

On this page