Learn Shell

Shell is a private pool for Robinhood stock tokens. Inside it, the chain records hashes. It does not record who holds what. This page explains what that means, and what it does not mean.

Notes

Your balance in Shell is a set of notes. A note records an amount, a token, a label inherited from your deposit, and your key. The chain never sees the note. It sees a commitment, which is a hash of those fields and a random number, and a copy of the note encrypted so that only your viewing key can open it.

On your devicenoteamounttokenlabelyour keyOn the chaincommitmentone Poseidon hashrootthe pool's tree
A note stays with you. The chain holds its hash as one leaf of a tree, under a single public root.

There are three things you can do with notes.

  • Shield. You deposit a stock token from your wallet. The contract adds a commitment to its tree. This transaction is public: anyone can see your address, the token and the amount.
  • Send. You spend one or two of your notes and create two new ones, one for the recipient and one for your change. The chain sees two spent-note markers, called nullifiers, and two new commitments. It does not see who sent, who received, which token or how much.
  • Unshell. You spend one or two notes and pay a public amount to an address you choose. The chain sees the recipient, the token and the amount. It cannot tell which deposit the funds came from.

A note can be spent once. Its nullifier is a hash of your nullifying key and the note's position in the tree. The contract rejects a second spend without learning which note was spent.

If you spend two notes in one proof, you also name an association set that both deposits are in. That is the same check an unshell makes. Association sets are explained below.

Every send and unshell is a Groth16 proof made in your browser, from the circuit in circuits/. Before it proves, the app checks the circuit and the proving key it downloaded against the hashes fixed by the trusted setup. After it proves, it checks that the proof says what you asked. The relayer that submits it sees the proof and your IP address, nothing else.

Keys

Everything starts from a 12-word recovery phrase. It exists only on your device, encrypted with your password. Three keys come from it:

  • a spending key, which proves you own a note when you send or unshell;
  • a nullifying key, which makes nullifiers, so spends can be detected;
  • a viewing key, which decrypts notes sent to you.

Your Shell address is 134 characters long and holds two public keys. Anyone with it can send to you. Nobody can spend with it.

You can export a viewing key. It holds the nullifying key and the private viewing key. A device with it can see every note you hold and every spend you make. It can never spend. Give it to an accountant, or to yourself on another device. It cannot be revoked. If you need to take it back, make new keys and move your notes.

If you lose the phrase and the device, your notes are gone. Shell has no accounts and no recovery.

What the issuer can still do

Stock tokens are contracts controlled by their issuer, Robinhood Assets (Jersey) Limited. Shell hides holders from the chain. It does not change what the issuer can do.

The issuerpauseblock listburnupgradeThe stock tokenthe issuer's contract,with the issuer's rulesShellholds the tokenrecords hashesanswers to nobodyno owner, no upgrade
The issuer's powers reach the token, and through it the pool's balance. They stop at Shell itself, which has no owner.
  • Pause every transfer of a token. While a token is paused, shields and unshells of that token fail.
  • Block any address on every transfer. If the pool's address is blocked for a token, nothing of that token can leave the pool until it is unblocked. If your recipient is blocked, your unshell fails and your note stays spendable.
  • Burn tokens from any holder, including the pool. If that happens, the last notes in that token cannot be redeemed in full.
  • Upgrade the token contract, which can change any of the above.

Shell itself has none of these powers and no owner. Nobody can pause it, upgrade it or take from it. That is also true of its bugs.

Relayers

A relayer is a server with a funded key. It submits your proof to the chain, so your own wallet never signs an unshell. It sees the proof, the recipient and your IP address. It cannot spend your notes, change the recipient or change the amount. All of that is fixed inside the proof.

Your browsermakes the proofnothing else leavesproofA relayerchecks it, submits itpays gas, keeps a feetransactionThe chainverifies the proofpays the recipientyour wallet: never signs
An unshell: the proof is made on your device, carried by a relayer and checked by the contract. Your wallet never signs.

A relayer can refuse or delay your transaction. It takes a fee you agree to before you prove. Anyone can run one, and the app accepts any relayer URL.

Association sets

When you unshell, you also prove that your deposit is in a set of deposits that a provider has published. You do not say which deposit. The set's root and the provider's address go on chain with the withdrawal.

A provider publishes a list of deposit labels and posts the list's root on chain. The relayer in the repo publishes one: every deposit, minus a deny list, minus addresses the issuer has blocked. Which provider to trust is between you and whoever receives the funds.

A send inside the pool that spends a single note needs no set. A send that merges two notes does, so that the merged note has a clean history.