How Ghostpay works
Ghostpay is stealth payments on Elysium, following ERC-5564 (scheme 1, secp256k1 with view tags). Every payment goes to a one-time address that only the receiver can link to themselves and spend from.
What it is
On a normal chain, receiving money means publishing one address. Everyone who pays you, and everyone who looks at the explorer, then sees every payment you ever got and every place you sent it.
Ghostpay separates the two things. You publish a meta-address: two public keys, or a short name that points to them. A sender uses it to make a brand new address for each payment. The payment lands there, and a short public note lets you, and only you, find it.
Your keys
Open Receive and sign one fixed message with your wallet. The signature is hashed into two private keys:
s = keccak256(sig[0:32]) mod n spending key v = keccak256(sig[32:64]) mod n viewing key S = s·G, V = v·G published as the meta-address (66 bytes)
The keys are made in your browser and never sent anywhere. Signing the same message with the same wallet always gives the same keys, so any device can open your inbox. Signing costs nothing and sends no transaction.
Sending
- The sender types a name. The app reads the meta-address from the contract.
- The browser picks a random key
rand computes the shared secret with the receiver's viewing key:h = keccak256(r·V). - The one-time address is the address of
S + h·G. Only the holder ofscan make its private key. - The payment goes through the contract in one transaction: the fee to the treasury, the rest to the one-time address, and a note with
R = r·Gand the first byte ofhas a view tag.
For a token payment the sender also attaches 0.0002 HYPE, which goes to the same one-time address untouched, so it can pay its own gas later.
Finding payments
The inbox reads every note from the contract's history and checks it against your viewing key, all in your browser:
h' = keccak256(v·R) if h'[0] != viewTag: skip (255 of 256 notes stop here) if address(S + h'·G) == stealth: it's yours, its key is (s + h') mod n
Nothing about this check leaves your browser. The page talks to public Elysium RPCs only.
Collecting
Collect moves what a one-time address holds to an address you choose. Each payment is signed with its own one-time key, so your main wallet signs nothing. Tokens are sent first, then the HYPE that is left after gas.
If you collect several payments into the same address, anyone can see those payments land together. To keep them apart, collect each one to a different fresh address.
Names
A name is 3 to 20 characters: a to z, 0 to 9 and underscore. The first wallet to claim a name owns it and can point it at a new meta-address later. Nobody else can change it. Claiming costs only gas.
A name points to your public keys, not to your wallet. The wallet that claims it is visible on chain, so claim from a wallet you don't mind showing, or from a fresh one.
Fees
Each payment pays a fee to the treasury, taken out of the amount. It starts at 0.25% and can never be more than 0.5%. The note announces the amount after the fee.
| You send | Fee at 0.25% | Arrives |
|---|---|---|
| 1 HYPE | 0.0025 HYPE | 0.9975 HYPE |
| 250 KNTQ | 0.625 KNTQ | 249.375 KNTQ, plus 0.0002 HYPE for gas |
Protocol fees are used to buy back and burn $GHPAY. Gas on Elysium is paid separately in HYPE.
Contract
function setName(string name, bytes meta) function lookup(string name) view returns (address owner, bytes meta) function payNative(address stealth, bytes ephemeralPubKey, bytes1 viewTag) payable function payToken(address token, uint256 amount, address stealth, bytes ephemeralPubKey, bytes1 viewTag) payable function feeBps() view returns (uint256) function feeOf(uint256 amount) view returns (uint256)
The contract never holds funds after a call: it forwards the payment and the fee in the same transaction. A receiver that refuses HYPE makes the whole payment revert, so nothing gets stuck.
Events
Announcement(uint256 indexed schemeId, address indexed stealthAddress, address indexed caller, bytes ephemeralPubKey, bytes metadata) metadata = viewTag (1) | selector (4) | token (20) | amount after fee (32) NameSet(bytes32 indexed nameHash, string name, address indexed owner, bytes metaAddress)
Owner limits
The owner can change the fee between 0% and 0.5%, change the treasury address and hand ownership over. That is all. There is no pause, no upgrade and no function that moves anyone's money.
Risks
- The contract is not audited. It is short and tested; start small.
- Privacy is broken by your own patterns: collecting many payments into one address, or paying exact odd amounts that can be matched.
- The sender's side is public: the wallet that pays is visible. Ghostpay hides who receives.
- Losing the wallet that made your keys means losing access to payments not yet collected.
FAQ
Can I receive without claiming a name?
Yes. Share the meta-address from Receive. A name is only a shortcut.
Does the sender need Ghostpay keys?
No. Any Elysium wallet can send.
What if a token payment arrives without gas money?
Send a little HYPE to that one-time address from any wallet, then collect.
Addresses
| Network | Elysium, chain id 99901 |
| Ghostpay | Published at launch |
