Skip to content
 
 

Repository files navigation

Corridor

CI

Portable proof of eligibility for cross-border payments. Do KYC once with a regulated issuer; prove you're cleared to any payment corridor — without re-uploading documents and without revealing who you are.

Corridor spans two networks by design:

  • Midnight holds the credential. A regulated issuer records a commitment; the holder keeps the attributes in their own confidential state.
  • Stellar / Soroban runs the corridors. Operators register a policy, the holder's zero-knowledge proof is verified on-chain (Protocol 25 primitives), a pass is attested, and payouts are gated on it.

A Noir → UltraHonk proof, generated on the holder's device, is the bridge.

See ARCHITECTURE.md for the full design and PROPOSAL.md for the pitch. Corridor is split across repos — see COMPONENTS.md. This repo is the hub (docs + the Midnight contract + the frontend).

Origin & participation

Corridor started as a project on Rise In — the "New Moon to Full" Midnight Builder Challenge — where the single-chain credential circuit and first frontend were built. It has since been re-scoped as a hybrid Midnight + Stellar product and will participate in the Stellar Drips Wave, where contributors earn from an SDF-funded pool by closing issues with merged PRs. See DRIPS.md.

Status

Pre-MVP. The on-chain layer is deployed and verified on Stellar testnet; the circuit compiles and its hashing is conformance-checked against the SDK and Soroban. See ROADMAP.md, HANDOFF.md, COMPONENTS.md.

Component Repo State
Soroban corridor_registry + corridor_attestation + verifier_mock corridor-contracts ✅ 14 host tests, deployed + verified end-to-end on testnet
Poseidon2 hash conformance (circuit ⇄ SDK ⇄ Soroban) contracts / circuits / sdk ✅ pinned vector matches across all three
Noir corridor_eligibility circuit corridor-circuits ✅ compiles + 3 tests (Noir 1.0.0-beta.26); ⏳ real Merkle fixtures pending
@corridor/verify SDK corridor-sdk getPolicy / isCleared / passes / buildWitness real (live testnet tests); prover + relayer clients pending
Root-sync relayer corridor-relayer ✅ Stellar read/write real; Midnight reader pending (M5)
Real UltraHonk Soroban verifier corridor-contracts ❌ M3 — mock in place
Midnight corridor.compact credential registry this repo (contracts/) ✅ compiles in CI; ⏳ simulator tests + Preprod deploy (M4)
Frontend rewrite this repo (src/) — live: corridor-pink.vercel.app ❌ still the single-chain UI — M6

Contract addresses

Network Contract Address
Stellar Testnet corridor_registry CB6LZV6TJN6YZ2O7FVLNRCJMRVBXCDG6JFFREHGY2BD5K4EYWJ6WKT2K
Stellar Testnet corridor_attestation CCAGXABIZWHNLA754LSQCFPA35VLJZEH24MD5OGJNIEMFQHZ7LWQD5AR
Stellar Testnet verifier_mock (placeholder — M3) CDT4ZVOIAI5JN4TC3WZYIBJ3NOJENZWKD2ZNOTSVVZBZBZ5GMOSNJEQP
Midnight Preview corridor.compact (legacy counter) 2883f006dcf296722ac6f0da3bf46578b4dfbbc2bebf915a0fb4e302d8a89a12

Full deployment record + smoke-test tx hashes: corridor-contracts/deployments/testnet.json. End-to-end verified on testnet: registerpost_rootenteris_cleared == true, replay rejected.

Repository layout

This hub repo:

contracts/   Midnight credential registry (Compact)
src/         React frontend (holder + operator UIs — mid-rewrite)
docs/        usage + design notes
*.md         architecture, proposal, roadmap, handoff, drips

Other repos: corridor-contracts (Soroban) · corridor-circuits (Noir) · corridor-sdk (TS). See COMPONENTS.md.

Privacy model

A Stellar observer sees: a pass was granted on corridor C, a tag index, an aggregate counter, a burned nullifier. Proofs are submitted via a fee-sponsored relayer so the holder's Stellar account is not linked.

A Midnight observer sees: issuer X recorded (or revoked) a credential at epoch N.

Nobody sees, on either chain: the holder's identity, documents, tier, expiry, the issuer↔holder link, or the holder's activity across corridors (nullifiers are per-corridor and mutually unlinkable).

A warranted auditor sees: only the {tier, issuer} for the specific passes they hold a warrant for.

Quickstart

# This repo — Midnight contract (needs the Compact compiler)
git clone https://github.com/Sconce-Labs/corridor.git && cd corridor
compact compile contracts/corridor.compact contracts/managed/corridor

# Stellar contracts
git clone https://github.com/Sconce-Labs/corridor-contracts.git
cd corridor-contracts && cargo test --workspace && cd ..

# Noir circuit  (needs noirup + bbup)
git clone https://github.com/Sconce-Labs/corridor-circuits.git
cd corridor-circuits/corridor_eligibility && nargo test

Contributing / Drips Wave

Corridor is built to be worked on in the open. See DRIPS.md for the issue map and how contributions are rewarded through the Stellar Drips Wave.

Tech stack

Midnight · Compact · Noir · UltraHonk · Stellar · Soroban (Rust, soroban-sdk 25) · Protocol 25 (BN254, Poseidon2) · React + Vite · TypeScript

License

Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages