尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Net it out. Settle the whole circle in one move. A multilateral netting clearinghouse on Tempo.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Net it out. Settle the whole circle in one move.
Cinch is a multilateral netting clearinghouse on Tempo. Drop in who owes whom, and it collapses a tangle of debts into the fewest possible transfers — then settles the entire cleared circle as a single atomic transaction. Nobody goes first. Nobody is left short.
Live: https://cinch-tau.vercel.app
Everyday commerce creates inevitable circular obligations (A → B → C → A). Yet most businesses still settle bilaterally — paying every invoice in full, one transfer at a time. This leaves huge offsets on the table and creates severe drag:
To eliminate this friction, global banking and institutional markets rely on centralized multilateral netting:
Cinch brings institutional-grade multilateral netting to any open commercial network without the traditional gatekeepers:
A cleared round is a set of transfers, each from a net debtor to a net
creditor. Who signs depends on how many distinct debtors there are:
contracts/CinchClearing.sol). Each net debtor
signs two things off-chain, costing nothing and moving nothing:
permit granting the contract an allowance for their net
amount;Authorization binding them to the exact, whole leg set.Each payer signs with their own wallet — connect an existing one
(MetaMask/Rabby/EIP-6963) or use the built-in self-custodial Cinch account; both
produce the same EIP-712 signatures. Obligations may be denominated in several
Tempo stablecoins at once: the engine nets per token and a single clear()
settles the mixed-token legs together. If a payer owes in a stablecoin they
don't hold, Cinch offers a one-tap conversion through Tempo's enshrined
orderbook DEX (STABLECOIN_DEX): it quotes the live rate, then swaps the
payer's surplus stablecoin into the one they owe — as a single sponsored atomic
batch (approve + swap) — so the payment is funded before they authorize. See
src/lib/crossCurrency.ts.
The organiser then submits a single clear() that pulls every leg
debtor→creditor with transferFromWithMemo. Because each signature commits to
the hash of the entire ordered leg set, no amount and no recipient can be
altered after signing — and the whole circle settles in one transaction or
reverts. Nobody goes first; nobody is left short. The flow is proven
end-to-end against the live Moderato testnet in test/clearing.onchain.test.ts.
npm run contract:compile # solc -> src/lib/clearingArtifact.json
npm run contract:gen-deployer # a fresh root key to fund (faucet.tempo.xyz)
npm run contract:deploy # deploy + record NEXT_PUBLIC_CINCH_CLEARING_ADDRESS
npm run test:onchain # live multi-party clear() on Moderato
Set NEXT_PUBLIC_CINCH_CLEARING_ADDRESS (locally in .env.local, and in your
Vercel project env) to enable multi-party clearing in the app.
| Primitive | How Cinch uses it |
|---|---|
| Atomic batched transactions | The whole cleared circle settles as one transaction — the foundation of trust-free netting. |
transferWithMemo | Each leg carries the obligation references it discharges, so settlement is also reconciliation. |
transferFromWithMemo + EIP-2612 permit | The clearing contract pulls each debtor's pre-authorized funds, memo attached, so several parties settle atomically from one call. |
| Stablecoin-native fees | Fees are paid in the stablecoin being settled — no separate gas token to hold. |
| Fee sponsorship | A circle's organiser can sponsor the clearing round. |
| Enshrined stablecoin DEX | Obligations in different stablecoins net against one another. |
| Sub-second finality | A cleared circle is final in about half a second. |
Cinch defaults to the Moderato testnet (chain 42431) so nothing real moves
while you explore. Point it at mainnet (chain 4217) with
NEXT_PUBLIC_CINCH_NETWORK=mainnet.
The agent economy is coming: agents that book, buy, and hire other agents on our behalf. When one agent delivers a service, it bills the other, and that debt needs clearing. Cinch Agent watches the web of obligations, nets it, and settles the whole circle atomically — under policy, with receipts, and zero human babysitting.
Paid one-by-one, agent micro-debts stretch capital thin: every payment ties up funds in transit, fragments balances across dozens of counterparties, and burns fees at every hop. The more agents trade, the more of their capital is stuck in motion instead of doing work.
The contract's clearWithStanding is what makes autonomous settlement safe:
roundId must equal
keccak256(abi.encode(circleId, keccak256(abi.encode(legs)))), so the agent
cannot invent legs or pull funds outside the circle's deterministic netting
output.validUntil).Authorization — both paths can coexist in one round.cd agent
npm install
node src/index.js # watches the shared circle store, settles under policy
The agent exposes:
GET /status — what it's watching and its last decisionGET /log — the reasoning log (observe / propose / settle / hold)GET /stats — rounds settled, gross vs net volumePOST /demo/run — scripted agent commerce: four agents deliver services,
bill each other, sign standing policies, and the agent settles the round
atomically via clearWithStandingPOST /policy — register a participant's signed standing policy + permitThe demo is wired into the site at /agent (the "Live demo" panel). The agent
service is a separate process; set NEXT_PUBLIC_CINCH_AGENT_URL if it runs on
a different host than the web app. The agent pays gas with its own key
(CINCH_AGENT_KEY); generate one and fund it via the Tempo faucet.
Users grant the agent a standing policy on the /agent page: pick a
circle, set a max net debit per round, sign the standing authorization + permit
with your Cinch account or wallet, and the agent can settle that circle for you
without asking again.
External agents can register debts through the public API:
curl -X POST https://cinch-tau.vercel.app/api/agent/bill \
-H "Content-Type: application/json" \
-d '{
"circleId": "your-circle-id",
"debtor": "0x...",
"creditor": "0x...",
"amount": "20.00",
"reference": "data-feed-invoice-42"
}'
The obligation is appended to the circle in the shared store; the Cinch Agent then nets and settles it under standing policy. (Demo-grade endpoint — no auth yet; authenticate agents before production.)
test/clearing.onchain.test.ts proves the standing path against the deployed
contract on Moderato: two payers sign standing policies, the agent settles a
round with no per-round authorizations, balances move exactly, and the
round cannot be replayed. Run it with:
CINCH_ONCHAIN=1 npx vitest run test/clearing.onchain.test.ts
The core (src/lib/netting.ts) is pure, deterministic bigint logic:
It is covered by a full unit suite — run npm test.
npm install
npm run dev # http://localhost:3000
npm test # the netting engine + encoding suite
npm run build
Next.js (App Router) · TypeScript · wagmi + viem · Tempo. No backend, no custody — a circle lives in your browser and the only durable record of a settlement is the Tempo chain itself.