Docs / Public vs private
Inside Ordeo
Public ORDEO and private notes are two forms of the same token
ORDEO in a wallet is an ordinary, visible ERC-20 balance. ORDEO inside the pool is held as encrypted notes. Shielding and unshielding move value between the two.
Two forms
| Public ORDEO | Private notes | |
|---|---|---|
| Where it sits | A balance at your 0x address in the token contract | Commitments in the pool's Merkle tree |
| Who can see the amount | Everyone | Only the holder of the viewing key |
| Unit | Token units | Vault shares for ORDEO, wei for ETH |
| Earns vault yield | No | Yes, ORDEO notes only |
| How you move it | Any wallet, exchange or contract | A zero-knowledge proof built in your browser |
The token itself is unchanged by any of this. The pool is just a contract that holds ORDEO; your share of what it holds is written into notes only you can open.
Shielding
shield(asset, amount, ownerHash, encryptedNote) moves public value into one new note. For ORDEO you approve the pool first; for ETH you send the amount as the transaction value.
- The pool pulls the tokens and checks its balance rose by exactly the amount. A token that takes a fee on transfer is refused.
- It takes the shield fee, rounded up, and for ORDEO converts the rest into vault shares priced at that moment.
- It computes the commitment itself from what it received, so a shield can never claim more than it paid.
- Anyone may shield for any
ownerHash, so you can shield straight to someone else’s key.
Buying in the app is a shield too: the router shields everything it bought in the same transaction. See Shield and unshield.
Unshielding
unshield(proof, args, ext) spends notes and pays public ORDEO or ETH to any address. For ORDEO, the exit is given in shares and converted at the share price of that block. Out of that gross amount come the flat unshield fee and, if a bundler carries it, the bundler’s fee. The rest goes to the address in the proof.
Any address works as the destination, even a fresh one that has never held anything. Change goes back to you as a new note.
What each step shows
| Action | Visible on chain | Not visible |
|---|---|---|
| Shield from a wallet | That wallet and the amount | Which later spends use this note |
| Buy in the app | Your wallet, ETH paid, tokens bought, that a new note was made | What you do with the note afterwards |
| Register your keys | Your address linked to your public note key | Which notes belong to that key |
| Private send (by a bundler) | Two nullifiers, two commitments, the bundler's flat fee | Sender, recipient, amount |
| Unshield | Destination address and amount | Which notes were spent |
| Sale | ETH recipient and amount | Which notes were sold |
Practical notes
- Only shielded ORDEO earns. A public balance gets nothing from the vault.
- Sending ORDEO to the pool with a plain
transfercreates no note and cannot be recovered. Always useshield, the router or the app. - Shielding and then unshielding the same amount soon after links the two. Staying private explains how to avoid patterns like that.