Skip to content
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.


On this page

Two forms

Public ORDEOPrivate notes
Where it sitsA balance at your 0x address in the token contractCommitments in the pool's Merkle tree
Who can see the amountEveryoneOnly the holder of the viewing key
UnitToken unitsVault shares for ORDEO, wei for ETH
Earns vault yieldNoYes, ORDEO notes only
How you move itAny wallet, exchange or contractA 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

ActionVisible on chainNot visible
Shield from a walletThat wallet and the amountWhich later spends use this note
Buy in the appYour wallet, ETH paid, tokens bought, that a new note was madeWhat you do with the note afterwards
Register your keysYour address linked to your public note keyWhich notes belong to that key
Private send (by a bundler)Two nullifiers, two commitments, the bundler's flat feeSender, recipient, amount
UnshieldDestination address and amountWhich notes were spent
SaleETH recipient and amountWhich 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 transfer creates no note and cannot be recovered. Always use shield, 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.