Ghost Labs: Private USDC on Solana Without SOL, and Our First Week on Mainnet
Ghost Labs (Source: Ghost Labs) Disclosure: I founded Ghost Labs, the project this article describes. The implementation is open source under the MIT license. What follows is a technical walkthrough of a problem we kept hitting on Solana, and how the current mainnet pilot is built. It is not financial advice. On Solana, a private USDC payment has two leaks, not one. The first is obvious: a normal…
Ghost Labs, a project founded by the author, has developed a solution to address two privacy leaks on the Solana blockchain concerning private USDC payments. The first leak occurs when a normal transfer publishes the payer, balance, and counterparties. The second leak is revealed later when a fresh wallet cannot move the stablecoin until someone funds it with SOL, creating a public line back to the funder.
To resolve this issue, Ghost Labs introduced a privacy pool called Shield, which unlink the withdrawal from a deposit, and a product called Gas, which allows prepaid USDC to be sent without any public SOL handoff. This combination enables wallets with zero SOL to send transactions without revealing the payer on the blockchain.
Shield operates as a fixed-denomination zero-knowledge pool for USDC. Users deposit exactly 1 USDC and receive a Ghost Note, which is a bearer secret that allows them to withdraw later. The deposit is made on the user's device, and the transaction details are kept private. When a user wants to withdraw, they provide the Ghost Note and choose a recipient. The browser creates a Groth16 proof that the user knows the opening of some commitment in the pool without revealing which one.
The withdrawal process involves the Ghost relayer paying the network fee, debiting 0.01 USDC from the note, and crediting the recipient with the USDC amount. The transaction is broadcast, and if it fails, the debit is refunded. The protocol ensures that the same note cannot be spent twice by using a nullifier hash recorded on-chain as a publicly-accessible data-availability (PDA) account.
Gas is another product offered by Ghost Labs, allowing users to send USDC or other allowlisted tokens without being funded with SOL first. When a user sends a token to Ghost, they receive a gas note back. A 1% protocol fee is deducted from the credit, and a transfer is only considered valid if it meets certain criteria within 15 minutes of the transfer. Once validated, the transfer is processed, and the tokens are sent to the recipient without any SOL handoff.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to