Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
Cinch은 Tempo 기반의 다자간 순자산 청산소입니다
Cinch is a multilateral netting clearinghouse on Tempo. When a group owes each other back and forth, it accumulates who owes whom, nets the whole tangle down to the fewest possible transfers, and sett
금융TypeScript · JavaScriptGitHub @NSEVEjk0온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기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.