Sol.College

Full lesson

tidex6

Private stablecoin payments with disclosure by consent. The sender seals the amount and a memo into a note only the recipient can open, and decides who else may read it. One Groth16 circuit, live on Solana mainnet, Arc and EVM.

What it does

From the project README:

I grant access, not permission. Private stablecoin payments with disclosure by consent — one Rust codebase, live on Solana mainnet, on Arc and on EVM chains.
Original
koshak01/tidex6
SuperStack fork
Blockchains/tidex6 @ 34f661b
Stars
1
Last push (original)
2026-10-29
Languages
Rust, Solidity, JavaScript, Shell, CSS, Leo
Detected stack
Anchor
Categories
DeFiPayments
Licence
Apache-2.0
Homepage
https://tidex6.com

Architecture

285 source files. By extension: .rs ×252, .sol ×29, .jsx ×2, .py ×1, .tsx ×1.

Top-level directorySource files
crates168
stylus53
contracts29
programs22
examples9
brand2
style-guide1
docs1

On-chain programs: programs/tidex6-caller, programs/tidex6-confidential-amounts, programs/tidex6-confidential-pool, programs/tidex6-pool-v2, programs/tidex6-registry, programs/tidex6-tip-jar, programs/tidex6-verifier, programs/tidex6-verifier-v2

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/tidex6/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

Key code, explained

Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.

koshak01/tidex6 · programs/tidex6-wusdc-pool/src/lib.rs L181–204 @ 34f661b · Apache-2.0 · original
#[instruction(commitment: [u8; FIELD_ELEMENT_BYTES])]pub struct AppendMemo<'info> {    #[account(        mut,        seeds = [MemoAccount::SEED_PREFIX, &commitment],        bump = memo.bump,        has_one = depositor,    )]    pub memo: Account<'info, MemoAccount>,     pub depositor: Signer<'info>,} #[derive(Accounts)]#[instruction(    commitment: [u8; FIELD_ELEMENT_BYTES],    secret: [u8; FIELD_ELEMENT_BYTES],    nullifier: [u8; FIELD_ELEMENT_BYTES],    nullifier_hash: [u8; FIELD_ELEMENT_BYTES],)]pub struct Refund<'info> {    #[account(        mut,        close = depositor,
  1. Line 185 seeds = [MemoAccount::SEED_PREFIX, &commitment],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  2. Line 186 bump = memo.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  3. Line 187 has_one = depositor,: Checks that a stored pubkey field matches the passed account.
  4. Line 191 pub depositor: Signer<'info>,: Requires this account to have signed the transaction.
  5. Line 204 close = depositor,: Closes the account at the end of the instruction and refunds its lamports.
koshak01/tidex6 · programs/tidex6-pool-v2/src/lib.rs L313–335 @ 34f661b · Apache-2.0 · original
    // no later withdraw could prove against.    #[account(        seeds = [MemoAccount::SEED_PREFIX, &leaf],        bump = memo.bump,        has_one = depositor,    )]    pub memo: Account<'info, MemoAccount>,     #[account(        init,        payer = depositor,        space = NullifierRecord::ACCOUNT_SIZE,        seeds = [NullifierRecord::SEED_PREFIX, &nf],        bump,    )]    pub nullifier: Account<'info, NullifierRecord>,     #[account(mut)]    pub depositor: Signer<'info>,     pub token_program: Interface<'info, TokenInterface>,    pub system_program: Program<'info, System>,}
  1. Line 315 seeds = [MemoAccount::SEED_PREFIX, &leaf],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  2. Line 316 bump = memo.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  3. Line 317 has_one = depositor,: Checks that a stored pubkey field matches the passed account.
  4. Line 322 init,: Creates and pays for a new account. Space and payer must be specified.
  5. Line 331 pub depositor: Signer<'info>,: Requires this account to have signed the transaction.
koshak01/tidex6 · programs/tidex6-verifier-v2/src/lib.rs L289–312 @ 34f661b · Apache-2.0 · original
        bump,    )]    pub vault: UncheckedAccount<'info>,     /// The memo account opened at deposit. Closed on refund, rent back    /// to the depositor. `has_one = depositor` ties it to the signer.    #[account(        mut,        close = depositor,        seeds = [MemoAccount::SEED_PREFIX, &commitment],        bump = memo.bump,        has_one = depositor,    )]    pub memo: Account<'info, MemoAccount>,     /// The per-nullifier PDA. Created here so that after a refund the    /// note's nullifier_hash is permanently spent — a later withdraw of    /// the same note fails at `init`.    #[account(        init,        payer = depositor,        space = NullifierRecord::ACCOUNT_SIZE,        seeds = [NullifierRecord::SEED_PREFIX, &nullifier_hash],        bump,
  1. Line 289 bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  2. Line 294 /// to the depositor. `has_one = depositor` ties it to the signer.: Checks that a stored pubkey field matches the passed account.
  3. Line 297 close = depositor,: Closes the account at the end of the instruction and refunds its lamports.
  4. Line 298 seeds = [MemoAccount::SEED_PREFIX, &commitment],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  5. Line 308 init,: Creates and pays for a new account. Space and payer must be specified.
koshak01/tidex6 · programs/tidex6-confidential-pool/src/lib.rs L301–324 @ 34f661b · Apache-2.0 · original
        token::mint = mint,        token::authority = depositor,    )]    pub depositor_token: Account<'info, TokenAccount>,     #[account(        mut,        close = depositor,        seeds = [MemoAccount::SEED_PREFIX, &commitment],        bump = memo.bump,        has_one = depositor,    )]    pub memo: Account<'info, MemoAccount>,     #[account(        init,        payer = depositor,        space = NullifierRecord::ACCOUNT_SIZE,        seeds = [NullifierRecord::SEED_PREFIX, &nullifier_hash],        bump,    )]    pub nullifier: Account<'info, NullifierRecord>,     #[account(mut)]
  1. Line 308 close = depositor,: Closes the account at the end of the instruction and refunds its lamports.
  2. Line 309 seeds = [MemoAccount::SEED_PREFIX, &commitment],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  3. Line 310 bump = memo.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  4. Line 311 has_one = depositor,: Checks that a stored pubkey field matches the passed account.
  5. Line 316 init,: Creates and pays for a new account. Space and payer must be specified.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
.anchor buildcompile programs and generate IDLs
.anchor testlocal validator + test suite
.anchor run testecho 'Tests are written as Rust integration tests in crates/tidex6-verifier/tests/'
.cargo buildRust workspace build
.cargo testRust tests

What you could build from it