Ghosts
A ghost is an address with no past, derived from one signature of your wallet. When the app acts as a ghost, every order is signed by it, and your main wallet does not appear in the trade.
How ghost keys are made
Your wallet signs one fixed message, once. The message names Ghostdex, says what the signature is for, and ends with your address. Ghostdex hashes the signature into a root, and every ghost key comes from that root and a number.
root = keccak256(signature of the Ghostdex message)
key(i) = keccak256(root ‖ uint256(i)) // ghost 1, ghost 2, ghost 3, ...
address = the Ethereum address of key(i)
// in the 1-in-2^128 case where key(i) is not a valid key, it is hashed againAll of this happens in your browser. The signature is not a transaction, costs no gas and is not sent anywhere. The keys are never sent anywhere either, to Ghostdex or to anyone else.
Where the keys live
- The root stays in memory and in this tab's session storage, so a reload does not ask for a new signature. Closing the tab forgets it. Lock ghosts on this tab forgets it at once.
- Ghost keys are derived from the root when they are needed and kept in memory only.
- Names and numbers (Ghost 01, an agent's name, which ghost you were acting as, how each was funded) are kept in this browser's local storage, per owner wallet. They are not secret; they let the list look the same when you come back.
- A check: the address of ghost 1 is stored with the names. If a later signature produces a different ghost 1, Ghostdex stops and says so instead of showing you an empty set of ghosts.
The same ghosts on another device
Most wallets sign deterministically (RFC 6979): the same wallet signing the same message always produces the same signature. With those wallets, signing on another device gives the same root, and therefore the same ghosts. Ghost number n is always the same address.
Names and agents stay in the browser where you set them. On a new device the list starts with ghost 1, and the next ghosts you add come back in order, with their funds.
Some smart wallets and hardware setups sign differently each time. The stored check catches that before you act on the wrong set. If your wallet is one of them, save the backup key.
The backup key
The backup key is the root itself: 64 hexadecimal characters, shown on the Ghosts page while your ghosts are open. Entering it on any device restores every ghost without a signature. Whoever has it can spend from every ghost, so store it like a recovery phrase, offline, and never paste it into another site.
Acting as a ghost
The Acting as menu at the top of the app switches between your main wallet and your ghosts. While a ghost is active, a bar says so, and every order the app builds (swaps, baskets, deposits, loans, launches) is signed by that ghost. Each transaction opens the same confirmation sheet as the Ghostdex wallet, with the ghost's name on it.
A ghost signs with a key held in your tab, not with your wallet extension. Its transactions reach the chain through the Ghostdex relay. See Ghost mode.
Creating, naming and hiding
- A new ghost is free and instant. Nothing exists on chain until you fund it.
- You can rename a ghost at any time. The name stays in this browser.
- Hiding a ghost removes it from the list on this device. Nothing moves on chain, so move its funds out first if it holds anything.
- Each agent gets a ghost of its own, listed apart from your trading ghosts. See Agents.
Gas
A ghost pays its own gas in ETH. Make sure it receives some ETH when you fund it, or its first order cannot be sent. When you move funds out, Max keeps a little ETH behind for gas.
Your ghosts are as recoverable as the wallet that owns them. Keep that wallet's recovery phrase safe and, for a wallet that does not sign deterministically, the backup key too. Ghostdex cannot recover either.