{
  "markdown": "<p align=\"center\">\n  <img alt=\"tidex6\" src=\"brand/logo/hat-solana.svg\" width=\"220\">\n</p>\n\n<h1 align=\"center\">tidex6</h1>\n\n<p align=\"center\">\n  <strong>I grant access, not permission.</strong><br>\n  <em>The Rust-native privacy framework for Solana.</em>\n</p>\n\n---\n\ntidex6 is a Rust-native, open-source framework that lets Solana developers add full transaction privacy to their Anchor programs through a small SDK surface. Transactions are private by default — sender, receiver, and amount are hidden. Privacy comes in **two layers**: a Groth16 shielded pool hides the *link* between sender and receiver, and a Token-2022 Confidential Transfers layer (wUSDC / wUSDT hidden-amount pools, live on mainnet and devnet) hides the *amount* itself. Users can optionally share a viewing key with someone they trust (an accountant, an auditor, a family member) to selectively disclose history, on their own terms.\n\n**Status:** full MVP product stack **live on Solana mainnet**. The privacy-core verifier program at [`CSDD31Zmm3pRMHAMB8c3TBqsj9mbmH2rXBzV7jrsJhcd`](https://solscan.io/account/CSDD31Zmm3pRMHAMB8c3TBqsj9mbmH2rXBzV7jrsJhcd) is OtterSec-verified and immutable (upgrade authority renounced). The full feature stack — deposit, ZK withdraw (Groth16 `WithdrawCircuit<20>` verified via `alt_bn128` syscalls), per-nullifier double-spend PDA, recipient-binding front-run protection, **unlinkable withdraw via reference relayer** at [`relayer.tidex6.com`](https://relayer.tidex6.com), opaque hex notes + **post-quantum ML-KEM-768 encrypted memos in a dedicated on-chain account**, **stealth payments** (the recipient is never handed the note — they scan the chain with their own ML-KEM secret) and **per-deposit revoke**, **client-side proof generation in the browser via WebAssembly** (`tidex6-prover-wasm`, ~1.7 s per proof, secret never leaves the user's tab), user-facing `tidex6` CLI, `tidex6-client` SDK, web app at [tidex6.com](https://tidex6.com), the flagship `examples/private-payroll` three-binary demo, and a **third-party CPI integration example** (`tidex6-tip-jar`, ~30 lines of Rust to add privacy to any Anchor program — deployed and OtterSec-verified on mainnet at [`5WohQRRzC31SkFMSWgEqJC9p2KvNhGkQbzUSsNUi9b9x`](https://solscan.io/account/5WohQRRzC31SkFMSWgEqJC9p2KvNhGkQbzUSsNUi9b9x) in April 2026, demo deployment since closed) — all validated end-to-end on mainnet. MVP shipped for the **Colosseum Frontier hackathon (2026-05-11)**; development continues — since then the **hidden-amount pools** (Token-2022 Confidential Transfers, wUSDC [`AYTRKmF8VBdqRWGZr9c6Mx582SRm2tbUEwMesFMhcPcU`](https://solscan.io/account/AYTRKmF8VBdqRWGZr9c6Mx582SRm2tbUEwMesFMhcPcU) and wUSDT [`QGPYpwyMnWhJUPGieXyJU5jhAkKsKuU7iGN53VCWPz2`](https://solscan.io/account/QGPYpwyMnWhJUPGieXyJU5jhAkKsKuU7iGN53VCWPz2)), a configurable **per-operation fee** paid on top by the sender and **collected privately** as a stealth note (ADR-016), and the live **public trusted-setup ceremony** at [ceremony.tidex6.com](https://ceremony.tidex6.com) (ADR-017) have shipped.\n\n> **DEVELOPMENT ONLY.** Pre-audit, single-contributor trusted setup, hackathon-grade trust assumptions. Verifier `upgrade-authority` has been renounced with `solana program set-upgrade-authority --final` — the program is immutable. Do not use to secure real funds. A **public multi-party trusted-setup ceremony is live** at [ceremony.tidex6.com](https://ceremony.tidex6.com) (publicly verifiable transcript, see [CEREMONY.md](docs/release/CEREMONY.md)); the on-chain VK is replaced only when the ceremony finalizes and a fresh immutable verifier ships. See [`docs/release/security.md`](docs/release/security.md).\n\n---\n\n## What builds from a clean clone\n\nEverything in this repository builds with `cargo build --release` after a plain\n`git clone`, and the on-chain programs build reproducibly in Docker via\n`solana-verify build`. Three crates are deliberately outside the workspace and\nbuild on their own terms:\n\n| crate | how to build it | why it is separate |\n|---|---|---|\n| `crates/tidex6-prover-wasm` | `wasm-pack build` | targets `wasm32-unknown-unknown` and pulls browser-only crates |\n| `crates/tidex6-ct-lab` | `cargo build --manifest-path crates/tidex6-ct-lab/Cargo.toml` | pinned to newer `spl-token-2022` / `solana-*` than the workspace |\n| `crates/tidex6-mcp` | `cargo build --manifest-path crates/tidex6-mcp/Cargo.toml` | **needs a checkout of our internal core (`forge`) next to this repo**, so it cannot build for anyone else |\n\nThe last one is worth stating plainly rather than leaving to be discovered: the\nhosted MCP server depends on a private crate outside this repository. While it\nwas a workspace member, `cargo build` failed in a clean clone for everybody who\ndoes not have that checkout — which is everybody but us — and for the same reason\na program verifier could not build the repository on its own machine. It is now\nits own workspace. Nothing else here depends on it: the payment protocol, the\nprograms, the SDK, the CLI and the local MCP server (`crates/tidex6-mcp-local`)\nare all self-contained.\n\n---\n\n## Quick start — stablecoins (USDC / USDT)\n\nThe pools in production move **USDC and USDT with the amount hidden on chain**.\nTwo ways in, neither of which needs this repository built from source:\n\n**In a browser** — [tidex6.com](https://tidex6.com), any Solana wallet. The\nproof is generated inside your tab; the secret never leaves it.\n\n**From an AI agent or the command line** — the local MCP server signs with a\nkey that stays on your machine, under limits enforced in code:\n\n```bash\ncargo install tidex6-mcp-local\n```\n\n```json\n{ \"mcpServers\": { \"tidex6\": { \"command\": \"tidex6-mcp-local\", \"args\": [] } } }\n```\n\nTools: `send`, `payments`, `collect`, `audit`, `whoami`. Full description in\n[`crates/tidex6-mcp-local/README.md`](crates/tidex6-mcp-local/README.md).\n\n## Quick start — the original SOL pool\n\nThe `tidex6` CLI below talks to the **v0.1 fixed-denomination SOL pool**, which\npredates the stablecoin pools and remains available — it carries no issuer\n`freeze_authority`, which is the reason to keep it. Amounts there are visible on\nchain; only the link between sender and recipient is hidden. For hidden amounts\nuse the stablecoin path above.\n\n```bash\n# Generate a tidex6 identity (spending + viewing key).\ncargo run --release -p tidex6-cli -- keygen\n\n# Make a private 0.5 SOL deposit to the shielded pool.\ncargo run --release -p tidex6-cli -- deposit \\\n    --amount 0.5 --note-out parents.note\n\n# Redeem the note into any recipient wallet. The CLI rebuilds\n# the offchain Merkle tree from on-chain history via the\n# indexer, generates a Groth16 withdraw proof, and submits it\n# to the verifier program.\n#\n# Default is the direct path — the user signs their own tx.\n# For full unlinkability (ADR-011) add `--relayer` to delegate\n# the tx to a relayer service that signs and pays on the user's\n# behalf:\n#   --relayer https://relayer.tidex6.com \\\n#   --relayer-pubkey <relayer_hot_wallet_pubkey>\ncargo run --release -p tidex6-cli -- withdraw \\\n    --note parents.note --to <recipient_pubkey>\n```\n\n## Quick start — SDK\n\nIntegrate a shielded pool into your own Rust app in a handful\nof lines using the `tidex6-client` builder API:\n\n```rust\nuse anchor_client::Cluster;\nuse tidex6_client::PrivatePool;\nuse tidex6_core::note::Denomination;\n\n# fn demo(\n#     payer: &solana_keypair::Keypair,\n#     recipient: anchor_client::anchor_lang::prelude::Pubkey,\n# ) -> anyhow::Result<()> {\nlet pool = PrivatePool::connect(Cluster::Mainnet, Denomination::OneSol)?;\n\n// Deposit side: keep the note locally — with stealth payments the recipient\n// is never handed the note; they discover the deposit by scanning the chain\n// with their own ML-KEM secret.\nlet (deposit_sig, note, _leaf_index) = pool.deposit(payer).send()?;\nstd::fs::write(\"parents.note\", note.to_text())?;\n\n// Withdraw side: rebuild the tree, prove, submit.\n// Default direct path — user signs the tx themselves.\nlet withdraw_sig = pool\n    .withdraw(payer)\n    .note(note)\n    .to(recipient)\n    .send()?;\n\n// Full unlinkability via the reference relayer (ADR-011): the\n// user's keypair never signs the withdraw tx, the relayer pays\n// fees and becomes the on-chain payer. Circuit binds the specific\n// relayer so a front-runner cannot swap them in mempool.\n// let withdraw_sig = pool\n//     .withdraw(payer)\n//     .note(note)\n//     .to(recipient)\n//     .via_relayer(\"https://relayer.tidex6.com\", relayer_hot_wallet_pubkey)\n//     .send()?;\n# drop((deposit_sig, withdraw_sig));\n# Ok(())\n# }\n```\n\n## Try the flagship demo\n\n[`examples/private-payroll`](examples/private-payroll/) is the\nfull story of Lena sending monthly support to her parents, with\nher accountant Kai producing a tax report from a shared scan\nfile. Three binaries — `sender`, `receiver`, `accountant` —\nhit live mainnet.\n\n```bash\ncd examples/private-payroll\n./scripts/run_demo.sh\n```\n\nThe script splits one terminal into three tmux panes and runs\nthe whole flow side by side — deposit → rebuild → prove →\nwithdraw → report — in under a minute.\n\n---\n\n## Architecture at a glance\n\n- **Groth16** zero-knowledge proofs on the **BN254** curve, verified onchain via native Solana `alt_bn128` syscalls in under 200,000 compute units per proof.\n- **Poseidon** hash function, parameter-aligned between offchain (`light-poseidon`) and onchain (`solana-poseidon`) components.\n- **Offchain Merkle tree** (depth 20, ~1M capacity) with an onchain root ring buffer.\n- **Hidden amounts** — a Token-2022 Confidential Transfers layer (wUSDC / wUSDT wrapped-mint pools, live on mainnet and devnet) hides the transferred amount itself on top of the Groth16 link-privacy pool. Two layers: the pool hides *who↔whom*, confidential transfers hide *how much*.\n- **Per-deposit selective disclosure** via post-quantum ML-KEM-768 auditor tags — users choose who sees what, per transaction.\n- **Shielded memos** — post-quantum ML-KEM-768 encrypted notes stored in a dedicated on-chain account (separate from the deposit event), readable only by the viewing-key holder. Supports **stealth payments** (the recipient scans the chain with their own ML-KEM secret rather than receiving the note) and **per-deposit revoke**.\n- **Non-upgradeable verifier** — the core proof verifier is locked after deployment, so users do not have to trust the deployer forever.\n- **Relayer unlinkability** — ADR-011: a reference HTTPS service at `relayer.tidex6.com` signs and submits withdraw transactions so the user's wallet never appears on-chain as the payer. The proof commits to the specific relayer (public input) so front-runners cannot redirect the fee. The in-circuit `relayer_fee` policy for the reference service is zero; anyone may run their own relayer with any fee. Separately, deposits carry a configurable per-operation fee (ADR-016): the sender pays it on top (it may be zero), it is shown before signing, and it is collected privately — as a stealth note to the operator inside the same shielded pool.\n- **Client-side proof generation** — `tidex6-prover-wasm` compiles the Rust prover to WebAssembly. The browser parses the deposit note locally, derives `commitment` and `nullifier_hash` via in-WASM Poseidon, and runs Groth16 entirely on the user's machine in ~1.7 s on M-series CPUs. The user's `secret` and `nullifier` never reach our server, the relayer, or anyone else — formally provable by inspecting `WebAssembly.Module.imports(...)` of the deployed `.wasm` artefact, which contains zero `fetch` / `XMLHttpRequest` / `WebSocket` symbols. Sandbox is the proof.\n- **Composable as a CPI primitive** — any Anchor program can route SOL through `tidex6_verifier::deposit` and inherit the full privacy stack. The reference example [`tidex6-tip-jar`](https://solscan.io/account/5WohQRRzC31SkFMSWgEqJC9p2KvNhGkQbzUSsNUi9b9x) shows the pattern in ~30 lines of Rust (built and OtterSec-verified against the historical v1 verifier — re-point it at the current verifier before reuse); payroll, royalty splitters, subscription protocols, and dark-pool DEX hooks follow the same pattern.\n- **Built with Anchor 1.1.2.**\n\nFull technical detail: [docs/release/PROJECT_BRIEF.md](docs/release/PROJECT_BRIEF.md).\n\n---\n\n## Technical stack\n\n**Onchain (Anchor 1.1.2 program):**\n- `anchor-lang = \"=1.1.2\"`\n- `groth16-solana = \"0.2\"` — Groth16 verifier via `alt_bn128` syscalls\n- `solana-poseidon = \"4\"` — native Poseidon syscall\n\n**Offchain (client and prover):**\n- `arkworks 0.5.x` — `ark-bn254`, `ark-groth16`, `ark-crypto-primitives`, `ark-r1cs-std`, `ark-relations`, `ark-ff`, `ark-ec`, `ark-serialize`, `ark-ed-on-bn254`\n- `light-poseidon = \"0.4\"` — circom-compatible Poseidon, byte-for-byte equivalent to the onchain syscall\n- `ml-kem = \"0.2\"`, `chacha20poly1305 = \"0.10\"` — post-quantum ML-KEM-768 memo encryption\n- `anchor-client = \"1.0\"`, `solana-sdk = \"4.0\"`\n\n---\n\n## Philosophy\n\nClosed by default. Open by user choice. The protocol enforces nothing about who uses it — it builds rails where honest behaviour is the shortest path. Users who choose to prove their legitimacy do so to someone *they* picked, through a key *they* hold. There is no backdoor, no key escrow, no recovery service. The architecture has a strong opinion about *how* the tool can be used; it has no opinion about *who* uses it.\n\nFull manifesto: [docs/release/THE_LEGEND.md](docs/release/THE_LEGEND.md).\n\n---\n\n## Documentation\n\nPublic documentation lives in [`docs/release/`](docs/release/):\n\n- **[THE_LEGEND.md](docs/release/THE_LEGEND.md)** — mission, philosophy, design principles.\n- **[PROJECT_BRIEF.md](docs/release/PROJECT_BRIEF.md)** — technical brief: architecture, data flow, workspace layout, developer experience.\n- **[ROADMAP.md](docs/release/ROADMAP.md)** — now / next / later, shipping milestones.\n- **[security.md](docs/release/security.md)** — threat model, known limitations, vulnerability classes and mitigations.\n- **[CEREMONY.md](docs/release/CEREMONY.md)** — the public trusted-setup ceremony: how to contribute, how to verify the chain, how finalization works.\n- **[PR_CHECKLIST_PROOF_LOGIC.md](docs/release/PR_CHECKLIST_PROOF_LOGIC.md)** — Fiat-Shamir discipline checklist for every PR that touches proof logic.\n- **[adr/](docs/release/adr/)** — Architecture Decision Records (seventeen ADRs covering commitment scheme, Merkle tree storage, nullifier storage, ElGamal implementation, non-upgradeable verifier, builder pattern vs macros, killer features, pool isolation, proving time budget, memo transport, relayer architecture, opaque note format, browser-side proof generation, post-quantum ML-KEM memo in a dedicated account, the two-layer confidential-amount architecture, configurable fee with private collection, and public ceremony finalization).\n\n**Russian translations** of all of the above are available in [`docs/release/ru/`](docs/release/ru/).\n\n---\n\n## Workspace layout\n\n```\ntidex6/\n├── crates/\n│   ├── tidex6-core/             — commitments, nullifiers, Merkle tree, keys, Poseidon, DepositNote, pqc (ML-KEM-768)\n│   ├── tidex6-circuits/         — arkworks R1CS: DepositCircuit, WithdrawCircuit<20> with relayer binding\n│   ├── tidex6-indexer/          — offchain Merkle tree rebuild from on-chain DepositEvent logs\n│   ├── tidex6-client/           — Rust SDK with builder pattern API (PrivatePool, DepositBuilder, WithdrawBuilder direct + via_relayer)\n│   ├── tidex6-cli/              — developer CLI: `tidex6 keygen | deposit | withdraw | accountant`\n│   ├── tidex6-prover-wasm/      — ADR-013: Rust prover compiled to WebAssembly (~1.7 s in-browser proof, secret never leaves the tab); excluded from workspace, built via wasm-pack\n│   ├── tidex6-notifier-client/  — bitcode IPC client for the Telegram notifier microservice (shared between tidex6-web and the relayer service)\n│   ├── tidex6-ui-shared/        — shared brand/css/template assets embedded via include_dir!; single source of truth for tidex6-web and the relayer status pages\n│   └── tidex6-day1/             — Day-1..15 mainnet flight harnesses (Day-1 gates, Day-5 deposit, Day-11 withdraw, Day-12 negative, Day-13 accountant)\n├── programs/\n│   ├── tidex6-verifier/         — singleton non-upgradeable Anchor verifier program (deployed at CSDD31Zm…sJhcd)\n│   ├── tidex6-tip-jar/          — ADR-013 reference CPI integration example (deployed + OtterSec-verified Apr 2026, deployment since closed)\n│   ├── tidex6-confidential-amounts/  — early v0.3 Token-2022 Confidential-Transfers exploration (not on mainnet yet)\n│   └── tidex6-caller/           — test CPI caller used by Day-1 gate 4\n├── examples/\n│   ├── private-payroll/         — flagship example: sender, receiver, accountant binaries\n│   └── confidential-amount-demo/  — companion to programs/tidex6-confidential-amounts (v0.3 exploration)\n├── brand/                        — logo assets, brandbook, Solscan PNGs\n└── video/                        — pitch, demo, and weekly progress scripts\n\nExternal repos (sibling path-deps, not part of this workspace):\n  - tidex6-web        — production website at tidex6.com (5-microservice IPC architecture)\n  - tidex6-relayer    — production relayer at relayer.tidex6.com (Axum HTTPS service, ADR-011)\n\nPlanned for v0.2, not yet in the workspace:\n  - Proof of Innocence circuit + Association Set Provider (ADR-007 v2)\n  - Relayer hardening: HSM keypair, multi-sig cold wallet, federated discovery\n  - Ergonomic proc macros (`#[private_withdraw]` etc.) layered over the builder API (ADR-006)\n  - Auditor key lifecycle — BIP32-style HD derivation for forward secrecy (extends ADR-014)\n```\n\n---\n\n## License\n\nDual licensed under either **MIT** or **Apache-2.0** at your option.\n\nNo token, no SaaS tier. The Groth16 verifier is a permissionless, immutable primitive anyone can integrate; the hidden-amount pools are operated deployments with a configurable (possibly zero) per-operation fee.\n\n---\n\n## Contact\n\nIssues and pull requests on GitHub.\n\n*tidex6.rs — I grant access, not permission.*\n",
  "bytes": 17939,
  "sha": "fc9de521baeb07276b51edf5b23daa15c56214761ef758fe4f77be2a738ffe46",
  "repo_slug": "koshak01/tidex6",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_koshak01_tidex6_mcp_local_8f369414/readme"
}