JefferyAkorful.sol

Work / contraflow

Contraflow

Cancels circular payables before any USDC moves.

  • Arc testnet
  • Payments
  • DeFi
  • Solidity
  • Foundry
  • TypeScript
  • USDC
// proof

Tests

$ forge test
tests
144
fuzz tests
9
invariants
9

Stateful invariant runs: 128 × depth 64, failing on any revert, through ContraflowHandler and NettingLedgerHandler.

  • invariant_ConservationOfValue
  • invariant_NeitherContractEverHoldsUsdc
  • invariant_StatusAlwaysMatchesRemainingAmount
  • invariant_WiringNeverChanges
  • invariant_StateMatchesLastSignedCommitment
  • invariant_CommitmentNeverReturnsToZero
  • invariant_InvalidCertificatesNeverApply
  • invariant_ValidCertificatesAlwaysApply
  • invariant_AppliedIdsStayApplied

Deployed

Arc testnet No mainnet deployment.

Counted from contraflow@7599c1e on 2026-10-05. Addresses from contracts/deployments/testnet.json, contracts/deployments/testnet-netting-ledger.json, each checked onchain; explorer verification checked 2026-10-05.

# contraflow// the record

Finds loops of debt between counterparties and nets them out: USDC invoices in one transaction on Arc, and obligations in any currency with one certificate everyone signs.

  1. 01

    All or nothing: every debt in the loop nets by the same amount in one step, or none do.

  2. 02

    Both sides sign an invoice with their own wallets before it is registered.

  3. 03

    A certificate, once applied on Arc, can never net the same debt twice.

  4. 04

    Every settlement has a receipt checkable on the Arc explorer. Contracts in Foundry.