Skip to content

Instantly share code, notes, and snippets.

@MdSadiqMd
Created May 2, 2026 10:41
Show Gist options
  • Select an option

  • Save MdSadiqMd/e47e59412c78d1ab4772a3b9d3f12eab to your computer and use it in GitHub Desktop.

Select an option

Save MdSadiqMd/e47e59412c78d1ab4772a3b9d3f12eab to your computer and use it in GitHub Desktop.

To understand project and architecture, please see this README - https://github.com/MdSadiqMd/TraceZero

  1. How to solve small user base

    • If 3 users buy credits at 14:00, 14:05, 14:10, and 3 deposits arrive via Tor at 14:30, 14:35, 14:40, the relayer has a strong timing correlation. With a small user base it can be easily trackable
    • And when there are two users in the pool it means there is 50% of chance of tracing the person, narrowing it down, how many users in the anonymity set is safe, and how to make sure the first user is not exposed ?
  2. The deposit wallet needs SOL to fund pool deposits. Where does that SOL come from?, currently relayer operator periodically transfers funds from treasury → deposit wallet (off-chain), but this transfer is on-chain. How is the deposit wallet funded without creating an on-chain link to the treasury?

  3. The client generates a new ephemeral X25519 key per deposit request. But the relayer's ECDH key is a StaticSecret generated once at startup and reused for ALL sessions. If the relayer's ECDH private key is compromised (memory dump, swap file, core dump), an attacker can decrypt all historical deposit requests, how to solve this ?

  4. Relayer uses a Solana RPC endpoint (RPC_URL). This RPC provider sees ALL transactions the relayer submits. how to tackle this ?

  5. I'm using stealth one-time addresses, but it's generation implies BN254 feild reduction, it means first 3 bits of every stealth address are zero. Normal Solana addresses have uniformly distributed first bytes. Any address with first_byte & 0xE0 == 0 is likely a TraceZero stealth address. Can the field reduction be done differently to avoid this fingerprint?

  6. This is the deployment i'm using, see this and tell me if i'm missing something

    • solana cluster - program live on-chain
    • frontend(vercel?) it's tanstack so can ignore
    • relayer(aws ?) - server, not serverless, might migrate in future, as serverless makes more sense to me
    • other two tor gateways, in docker, on ecr
    • currently relying on aws

Less Important ones:

  1. I thought fixed denominations will solve the anonymity set fragmentation? But as per analysis, it did not. but as there are only 7 fixed denominations, the anonymity set fragmentation is not that big of a deal?

  2. Is there a single point of failure with the relayer? If the Tor daemon is down, no deposits or withdrawals can be processed. What is the architecture of the relayer?

  3. Why is the relayer's ECDH key static rather than ephemeral per-session? Is the ECDH private key stored in memory only, or does it persist to disk? What happens when the relayer restarts — is it a new key? (yes, but old sessions become undecryptable, which is the point. However, during a single runtime, all sessions use one key.) Is memory locked (mlock) to prevent the ECDH key from being swapped to disk?

Product Questions:

  1. The Process is too long, user need to go theough 4 steps, is it ok that i keep all in the background like, buy credits and transfer it and i can assume this is the credit he wanna use, rather than asking user to select which credit to use, i kept this step to make sure, user can use the credits whenever he wants? is it too much?

  2. is ui okish ? or gives too flashy cringe vibes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment