gitwtfhub

wtf is arc-netting?

wodesiku/arc-netting — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

A demo that nets out chains of B2B debts off chain and settles only the leftover balance in USDC on a test blockchain.

Mindmap

mindmap
  root((ArcNetting))
    What it does
      Nets B2B debts
      Settles only residual
      Cuts liquidity needed
    Tech stack
      Solidity contract
      TypeScript engine
      React frontend
    Use cases
      Learn netting concepts
      Study on chain plus off chain design
      Reference settlement demo
    Audience
      Blockchain developers
      Fintech curious readers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study how off chain netting math can reduce the number of on chain transfers needed to settle debts.

REASON 2

Deploy the NettingHub contract on a testnet to see multilateral settlement work end to end.

REASON 3

Use the TypeScript netting engine as a reference for computing minimum-transfer settlement plans.

What's in the stack?

TypeScriptSolidityReactViteWagmiViemFoundry

How it stacks up

wodesiku/arc-netting0xkinno/astraea0xkinno/halcyon
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardhard
Complexity3/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Needs Node.js, pnpm, and Foundry installed, plus a testnet wallet key to deploy.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

ArcNetting is a project built for the Arc Testnet that tackles a simple but expensive problem in business to business payments. When companies owe each other money in a chain, like A owes B, B owes C, and C owes A, settling each debt separately means moving the full gross amount every time, which ties up a lot of cash. This project nets those obligations together first, so only the leftover balance actually moves. In the example used by the project, three payments worth 280 USDC total get reduced to a single 20 USDC transfer, a savings of almost 93 percent. The system has two main parts. A smart contract called NettingHub, written in Solidity and deployed on the Arc Testnet, keeps track of who owes what and requires both sides of a debt to confirm it before it counts. It does not do the actual math of figuring out the smallest set of payments needed. That work happens off chain in a TypeScript engine that looks at all the obligations, matches the biggest debtors against the biggest creditors, and works out the minimum number of transfers needed to settle everyone up. An operator then submits that result to the contract, which checks it and moves the final USDC amounts. The repository also includes a frontend built with Vite, React, and libraries called Wagmi and Viem for connecting to blockchains, giving users a way to register obligations, confirm them, and watch settlements happen. There is a working demo already live on the Arc Testnet showing three parties settling a real cycle of debts on chain, along with the test suite, deployment scripts, and documentation needed to reproduce it. This project would be useful to someone curious about how netting reduces the amount of money that has to move between businesses, or to a developer wanting a small working example of combining an on chain settlement contract with an off chain calculation engine. The code is open source under the MIT license, and setup instructions cover building and testing the contracts, running the netting engine, and deploying both the contract and the frontend.

Yoink these prompts

Prompt 1
Walk me through how the NettingHub Solidity contract confirms and settles obligations.
Prompt 2
Explain the greedy netting algorithm in netting-engine/src/netting.ts and how it picks transfers.
Prompt 3
Help me deploy this project's contracts to a testnet using the Foundry script provided.
Prompt 4
Show me how the frontend in this repo connects to the NettingHub contract using Wagmi and Viem.

Frequently asked questions

wtf is arc-netting?

A demo that nets out chains of B2B debts off chain and settles only the leftover balance in USDC on a test blockchain.

What language is arc-netting written in?

Mainly TypeScript. The stack also includes TypeScript, Solidity, React.

What license does arc-netting use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is arc-netting to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is arc-netting for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.